From 10c070465a75c497c14d29edc17cc2edfe3d2834 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Sun, 23 Jun 2019 11:15:05 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20JX=E2=80=99s=20target.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Jump to where the register is pointing in RAM, not to the register. --- README.md | 3 +-- data/languages/xtensaInstructions.sinc | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 31156c3..5668a9f 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,7 @@ Or download a pre-built release and unzip it to `Ghidra/Processors`. # Bugs -* Some calculations are wrong, causing Ghidra to miscalculate a jump target. -* Probably a lot of others in instructions I did not yet happen to encouter. Pull requests +* Probably a lot in instructions I did not yet happen to encouter. Pull requests appreciated. # TODO diff --git a/data/languages/xtensaInstructions.sinc b/data/languages/xtensaInstructions.sinc index 2f22a73..1647f43 100644 --- a/data/languages/xtensaInstructions.sinc +++ b/data/languages/xtensaInstructions.sinc @@ -521,7 +521,7 @@ macro extract_bit(val, bit, result) { # JX - Uncoditional Jump Register, pg. 368. :jx as is op2 = 0 & op1 = 0 & ar = 0 & as & u2_6.7 = 0b10 & u2_4.5 = 0b10 & op0 = 0 { - goto as; + goto [as]; } # L8UI - Load 8-bit Unsigned, pg. 369.