Skip to contentSkip to conversation

microblaze: translate.c: Fix swaph decoding

PATCH In review Peter Crosthwaite 2 participants 2 messages Nov 8, 2012 – Nov 9, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 microblaze: translate.c: Fix swaph decoding

The swaph instruction was not decoding correctly. s/1e1/1e2 on the 9 LSBs on the instruction decode.

---
 target-microblaze/translate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
target-microblaze/translate.c +1 -1
index 7d864b1..6f27c24 100644
@@ -840,7 +840,7 @@ static void dec_bit(DisasContext *dc)
             LOG_DIS("swapb r%d r%d\n", dc->rd, dc->ra);
             tcg_gen_bswap32_i32(cpu_R[dc->rd], cpu_R[dc->ra]);
             break;
-        case 0x1e1:
+        case 0x1e2:
             /*swaph */
             LOG_DIS("swaph r%d r%d\n", dc->rd, dc->ra);
             tcg_gen_rotri_i32(cpu_R[dc->rd], cpu_R[dc->ra], 16);
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 14 lines · Peter Crosthwaite

The swaph instruction was not decoding correctly. s/1e1/1e2 on the 9 LSBs on the instruction decode.

---
 target-microblaze/translate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
target-microblaze/translate.c +0 -0
index 7d864b1..6f27c24 100644

target-microblaze/translate.c static void dec_bit(DisasContext *dc) · line 843

Quoted 5 lines
target-microblaze/translate.c +1 -1
@@ -840,7 +840,7 @@ static void dec_bit(DisasContext *dc)
             LOG_DIS("swapb r%d r%d\n", dc->rd, dc->ra);
             tcg_gen_bswap32_i32(cpu_R[dc->rd], cpu_R[dc->ra]);
             break;
-        case 0x1e1:
+        case 0x1e2:

Ouch.. I've applied the fix, thanks.

David, was this the bug that was causing the recent errors with the rebased GCC port?

Cheers,
Edgar