aboutsummaryrefslogtreecommitdiff
path: root/sim/sh64
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2009-11-23 09:37:09 +0000
committerDoug Evans <dje@google.com>2009-11-23 09:37:09 +0000
commit62836bf48e1a5312afa895ec7730a332e0928e0a (patch)
treed5e21158d4a16c6f3cfdc5c1e88d00b1e83b87b9 /sim/sh64
parentc90188f694a64cb2b97cb9db99fe0c11aaba43d6 (diff)
downloadgdb-62836bf48e1a5312afa895ec7730a332e0928e0a.zip
gdb-62836bf48e1a5312afa895ec7730a332e0928e0a.tar.gz
gdb-62836bf48e1a5312afa895ec7730a332e0928e0a.tar.bz2
* cgen-engine.h (EXTRACT_MSB0_SINT): Renamed from EXTRACT_MSB0_INT.
(EXTRACT_LSB0_SINT): Renamed from EXTRACT_LSB0_INT. plus regenerate cgen files
Diffstat (limited to 'sim/sh64')
-rw-r--r--sim/sh64/ChangeLog2
-rw-r--r--sim/sh64/decode-compact.c18
-rw-r--r--sim/sh64/decode-media.c58
-rw-r--r--sim/sh64/defs-compact.h12
-rw-r--r--sim/sh64/defs-media.h28
5 files changed, 60 insertions, 58 deletions
diff --git a/sim/sh64/ChangeLog b/sim/sh64/ChangeLog
index 982e649..09cca05 100644
--- a/sim/sh64/ChangeLog
+++ b/sim/sh64/ChangeLog
@@ -6,6 +6,8 @@
* decode-compact.h: Regenerate.
* decode-media.c: Regenerate.
* decode-media.h: Regenerate.
+ * defs-compact.h: Regenerate.
+ * defs-media.h: Regenerate.
2009-11-03 Doug Evans <dje@sebabeach.org>
diff --git a/sim/sh64/decode-compact.c b/sim/sh64/decode-compact.c
index d762b3d..5a64edc 100644
--- a/sim/sh64/decode-compact.c
+++ b/sim/sh64/decode-compact.c
@@ -2855,7 +2855,7 @@ sh64_compact_decode (SIM_CPU *current_cpu, IADDR pc,
#define FLD(f) abuf->fields.sfmt_bf_compact.f
SI f_disp8;
- f_disp8 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (4))));
+ f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) << (1))) + (((pc) + (4))));
/* Record the fields for the semantic handler. */
FLD (i_disp8) = f_disp8;
@@ -2878,7 +2878,7 @@ sh64_compact_decode (SIM_CPU *current_cpu, IADDR pc,
#define FLD(f) abuf->fields.sfmt_bf_compact.f
SI f_disp8;
- f_disp8 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (4))));
+ f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) << (1))) + (((pc) + (4))));
/* Record the fields for the semantic handler. */
FLD (i_disp8) = f_disp8;
@@ -2901,7 +2901,7 @@ sh64_compact_decode (SIM_CPU *current_cpu, IADDR pc,
#define FLD(f) abuf->fields.sfmt_bra_compact.f
SI f_disp12;
- f_disp12 = ((((EXTRACT_MSB0_INT (insn, 16, 4, 12)) << (1))) + (((pc) + (4))));
+ f_disp12 = ((((EXTRACT_MSB0_SINT (insn, 16, 4, 12)) << (1))) + (((pc) + (4))));
/* Record the fields for the semantic handler. */
FLD (i_disp12) = f_disp12;
@@ -2967,7 +2967,7 @@ sh64_compact_decode (SIM_CPU *current_cpu, IADDR pc,
#define FLD(f) abuf->fields.sfmt_bra_compact.f
SI f_disp12;
- f_disp12 = ((((EXTRACT_MSB0_INT (insn, 16, 4, 12)) << (1))) + (((pc) + (4))));
+ f_disp12 = ((((EXTRACT_MSB0_SINT (insn, 16, 4, 12)) << (1))) + (((pc) + (4))));
/* Record the fields for the semantic handler. */
FLD (i_disp12) = f_disp12;
@@ -3766,7 +3766,7 @@ sh64_compact_decode (SIM_CPU *current_cpu, IADDR pc,
f_dn = ((EXTRACT_MSB0_UINT (insn, 32, 4, 3)) << (1));
f_rm = EXTRACT_MSB0_UINT (insn, 32, 8, 4);
- f_imm12x8 = ((EXTRACT_MSB0_INT (insn, 32, 20, 12)) << (3));
+ f_imm12x8 = ((EXTRACT_MSB0_SINT (insn, 32, 20, 12)) << (3));
/* Record the fields for the semantic handler. */
FLD (f_imm12x8) = f_imm12x8;
@@ -3797,7 +3797,7 @@ sh64_compact_decode (SIM_CPU *current_cpu, IADDR pc,
f_rn = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
f_dm = ((EXTRACT_MSB0_UINT (insn, 32, 8, 3)) << (1));
- f_imm12x8 = ((EXTRACT_MSB0_INT (insn, 32, 20, 12)) << (3));
+ f_imm12x8 = ((EXTRACT_MSB0_SINT (insn, 32, 20, 12)) << (3));
/* Record the fields for the semantic handler. */
FLD (f_dm) = f_dm;
@@ -4405,7 +4405,7 @@ sh64_compact_decode (SIM_CPU *current_cpu, IADDR pc,
INT f_imm20;
f_rn = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
- f_imm20_hi = EXTRACT_MSB0_INT (insn, 32, 8, 4);
+ f_imm20_hi = EXTRACT_MSB0_SINT (insn, 32, 8, 4);
f_imm20_lo = EXTRACT_MSB0_UINT (insn, 32, 16, 16);
f_imm20 = ((((f_imm20_hi) << (16))) | (f_imm20_lo));
@@ -5022,7 +5022,7 @@ sh64_compact_decode (SIM_CPU *current_cpu, IADDR pc,
f_rn = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
f_rm = EXTRACT_MSB0_UINT (insn, 32, 8, 4);
- f_imm12x4 = ((EXTRACT_MSB0_INT (insn, 32, 20, 12)) << (2));
+ f_imm12x4 = ((EXTRACT_MSB0_SINT (insn, 32, 20, 12)) << (2));
/* Record the fields for the semantic handler. */
FLD (f_imm12x4) = f_imm12x4;
@@ -5053,7 +5053,7 @@ sh64_compact_decode (SIM_CPU *current_cpu, IADDR pc,
f_rn = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
f_rm = EXTRACT_MSB0_UINT (insn, 32, 8, 4);
- f_imm12x4 = ((EXTRACT_MSB0_INT (insn, 32, 20, 12)) << (2));
+ f_imm12x4 = ((EXTRACT_MSB0_SINT (insn, 32, 20, 12)) << (2));
/* Record the fields for the semantic handler. */
FLD (f_imm12x4) = f_imm12x4;
diff --git a/sim/sh64/decode-media.c b/sim/sh64/decode-media.c
index c08dc77..a56596a 100644
--- a/sim/sh64/decode-media.c
+++ b/sim/sh64/decode-media.c
@@ -1587,7 +1587,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp10 = EXTRACT_MSB0_INT (insn, 32, 12, 10);
+ f_disp10 = EXTRACT_MSB0_SINT (insn, 32, 12, 10);
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -1675,7 +1675,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_tra;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_imm6 = EXTRACT_MSB0_INT (insn, 32, 16, 6);
+ f_imm6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6);
f_tra = EXTRACT_MSB0_UINT (insn, 32, 25, 3);
/* Record the fields for the semantic handler. */
@@ -2127,7 +2127,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp10x8 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (3));
+ f_disp10x8 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (3));
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -2158,7 +2158,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp10x8 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (3));
+ f_disp10x8 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (3));
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -2190,7 +2190,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp10x4 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (2));
+ f_disp10x4 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (2));
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -2499,7 +2499,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp10x8 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (3));
+ f_disp10x8 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (3));
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -2530,7 +2530,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp10x4 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (2));
+ f_disp10x4 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (2));
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -2660,7 +2660,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp6 = EXTRACT_MSB0_INT (insn, 32, 16, 6);
+ f_disp6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6);
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -2746,7 +2746,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp10 = EXTRACT_MSB0_INT (insn, 32, 12, 10);
+ f_disp10 = EXTRACT_MSB0_SINT (insn, 32, 12, 10);
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -2777,7 +2777,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp10x4 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (2));
+ f_disp10x4 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (2));
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -2808,7 +2808,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp10x8 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (3));
+ f_disp10x8 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (3));
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -2839,7 +2839,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp10x2 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (1));
+ f_disp10x2 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (1));
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -2870,7 +2870,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp6 = EXTRACT_MSB0_INT (insn, 32, 16, 6);
+ f_disp6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6);
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -2901,7 +2901,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp6 = EXTRACT_MSB0_INT (insn, 32, 16, 6);
+ f_disp6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6);
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -2932,7 +2932,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp6 = EXTRACT_MSB0_INT (insn, 32, 16, 6);
+ f_disp6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6);
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -2963,7 +2963,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp6 = EXTRACT_MSB0_INT (insn, 32, 16, 6);
+ f_disp6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6);
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -3217,7 +3217,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
INT f_imm16;
UINT f_dest;
- f_imm16 = EXTRACT_MSB0_INT (insn, 32, 6, 16);
+ f_imm16 = EXTRACT_MSB0_SINT (insn, 32, 6, 16);
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -3259,7 +3259,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_imm10 = EXTRACT_MSB0_INT (insn, 32, 12, 10);
+ f_imm10 = EXTRACT_MSB0_SINT (insn, 32, 12, 10);
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -3288,7 +3288,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
DI f_disp16;
UINT f_tra;
- f_disp16 = ((((EXTRACT_MSB0_INT (insn, 32, 6, 16)) << (2))) + (pc));
+ f_disp16 = ((((EXTRACT_MSB0_SINT (insn, 32, 6, 16)) << (2))) + (pc));
f_tra = EXTRACT_MSB0_UINT (insn, 32, 25, 3);
/* Record the fields for the semantic handler. */
@@ -3373,7 +3373,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp6 = EXTRACT_MSB0_INT (insn, 32, 16, 6);
+ f_disp6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6);
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -3490,7 +3490,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp10 = EXTRACT_MSB0_INT (insn, 32, 12, 10);
+ f_disp10 = EXTRACT_MSB0_SINT (insn, 32, 12, 10);
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -3521,7 +3521,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp10x4 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (2));
+ f_disp10x4 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (2));
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -3552,7 +3552,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp10x8 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (3));
+ f_disp10x8 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (3));
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -3583,7 +3583,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp10x2 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (1));
+ f_disp10x2 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (1));
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -3614,7 +3614,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp6 = EXTRACT_MSB0_INT (insn, 32, 16, 6);
+ f_disp6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6);
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -3645,7 +3645,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp6 = EXTRACT_MSB0_INT (insn, 32, 16, 6);
+ f_disp6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6);
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -3676,7 +3676,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp6 = EXTRACT_MSB0_INT (insn, 32, 16, 6);
+ f_disp6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6);
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -3707,7 +3707,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_disp6 = EXTRACT_MSB0_INT (insn, 32, 16, 6);
+ f_disp6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6);
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
@@ -3923,7 +3923,7 @@ sh64_media_decode (SIM_CPU *current_cpu, IADDR pc,
UINT f_dest;
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6);
- f_imm6 = EXTRACT_MSB0_INT (insn, 32, 16, 6);
+ f_imm6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6);
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6);
/* Record the fields for the semantic handler. */
diff --git a/sim/sh64/defs-compact.h b/sim/sh64/defs-compact.h
index f5a60ae..7090703 100644
--- a/sim/sh64/defs-compact.h
+++ b/sim/sh64/defs-compact.h
@@ -207,7 +207,7 @@ struct scache {
#define EXTRACT_IFMT_BF_COMPACT_CODE \
length = 2; \
f_op8 = EXTRACT_MSB0_UINT (insn, 16, 0, 8); \
- f_disp8 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (4)))); \
+ f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) << (1))) + (((pc) + (4)))); \
#define EXTRACT_IFMT_BRA_COMPACT_VARS \
UINT f_op4; \
@@ -216,7 +216,7 @@ struct scache {
#define EXTRACT_IFMT_BRA_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
- f_disp12 = ((((EXTRACT_MSB0_INT (insn, 16, 4, 12)) << (1))) + (((pc) + (4)))); \
+ f_disp12 = ((((EXTRACT_MSB0_SINT (insn, 16, 4, 12)) << (1))) + (((pc) + (4)))); \
#define EXTRACT_IFMT_BRAF_COMPACT_VARS \
UINT f_op4; \
@@ -366,7 +366,7 @@ struct scache {
f_rm = EXTRACT_MSB0_UINT (insn, 32, 8, 4); \
f_sub4 = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
f_16_4 = EXTRACT_MSB0_UINT (insn, 32, 16, 4); \
- f_imm12x8 = ((EXTRACT_MSB0_INT (insn, 32, 20, 12)) << (3)); \
+ f_imm12x8 = ((EXTRACT_MSB0_SINT (insn, 32, 20, 12)) << (3)); \
#define EXTRACT_IFMT_FMOV9_COMPACT_VARS \
UINT f_op4; \
@@ -385,7 +385,7 @@ struct scache {
f_11_1 = EXTRACT_MSB0_UINT (insn, 32, 11, 1); \
f_sub4 = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
f_16_4 = EXTRACT_MSB0_UINT (insn, 32, 16, 4); \
- f_imm12x8 = ((EXTRACT_MSB0_INT (insn, 32, 20, 12)) << (3)); \
+ f_imm12x8 = ((EXTRACT_MSB0_SINT (insn, 32, 20, 12)) << (3)); \
#define EXTRACT_IFMT_FTRV_COMPACT_VARS \
UINT f_op4; \
@@ -410,7 +410,7 @@ struct scache {
length = 4; \
f_op4 = EXTRACT_MSB0_UINT (insn, 32, 0, 4); \
f_rn = EXTRACT_MSB0_UINT (insn, 32, 4, 4); \
- f_imm20_hi = EXTRACT_MSB0_INT (insn, 32, 8, 4); \
+ f_imm20_hi = EXTRACT_MSB0_SINT (insn, 32, 8, 4); \
f_imm20_lo = EXTRACT_MSB0_UINT (insn, 32, 16, 16); \
f_imm20 = ((((f_imm20_hi) << (16))) | (f_imm20_lo));\
f_sub4 = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
@@ -474,7 +474,7 @@ struct scache {
f_rm = EXTRACT_MSB0_UINT (insn, 32, 8, 4); \
f_sub4 = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
f_16_4 = EXTRACT_MSB0_UINT (insn, 32, 16, 4); \
- f_imm12x4 = ((EXTRACT_MSB0_INT (insn, 32, 20, 12)) << (2)); \
+ f_imm12x4 = ((EXTRACT_MSB0_SINT (insn, 32, 20, 12)) << (2)); \
#define EXTRACT_IFMT_MOVW4_COMPACT_VARS \
UINT f_op8; \
diff --git a/sim/sh64/defs-media.h b/sim/sh64/defs-media.h
index 91b95e4..03deb1f 100644
--- a/sim/sh64/defs-media.h
+++ b/sim/sh64/defs-media.h
@@ -194,7 +194,7 @@ struct scache {
length = 4; \
f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
- f_disp10 = EXTRACT_MSB0_INT (insn, 32, 12, 10); \
+ f_disp10 = EXTRACT_MSB0_SINT (insn, 32, 12, 10); \
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
@@ -211,7 +211,7 @@ struct scache {
f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
- f_disp6x32 = ((EXTRACT_MSB0_INT (insn, 32, 16, 6)) << (5)); \
+ f_disp6x32 = ((EXTRACT_MSB0_SINT (insn, 32, 16, 6)) << (5)); \
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
@@ -251,7 +251,7 @@ struct scache {
f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
- f_imm6 = EXTRACT_MSB0_INT (insn, 32, 16, 6); \
+ f_imm6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6); \
f_likely = EXTRACT_MSB0_UINT (insn, 32, 22, 1); \
f_23_2 = EXTRACT_MSB0_UINT (insn, 32, 23, 2); \
f_tra = EXTRACT_MSB0_UINT (insn, 32, 25, 3); \
@@ -499,7 +499,7 @@ struct scache {
length = 4; \
f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
- f_disp10x8 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (3)); \
+ f_disp10x8 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (3)); \
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
@@ -514,7 +514,7 @@ struct scache {
length = 4; \
f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
- f_disp10x8 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (3)); \
+ f_disp10x8 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (3)); \
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
@@ -529,7 +529,7 @@ struct scache {
length = 4; \
f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
- f_disp10x4 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (2)); \
+ f_disp10x4 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (2)); \
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
@@ -688,7 +688,7 @@ struct scache {
f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
- f_disp6 = EXTRACT_MSB0_INT (insn, 32, 16, 6); \
+ f_disp6 = EXTRACT_MSB0_SINT (insn, 32, 16, 6); \
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
@@ -720,7 +720,7 @@ struct scache {
length = 4; \
f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
- f_disp10x4 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (2)); \
+ f_disp10x4 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (2)); \
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
@@ -735,7 +735,7 @@ struct scache {
length = 4; \
f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
- f_disp10x8 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (3)); \
+ f_disp10x8 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (3)); \
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
@@ -765,7 +765,7 @@ struct scache {
#define EXTRACT_IFMT_MOVI_CODE \
length = 4; \
f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
- f_imm16 = EXTRACT_MSB0_INT (insn, 32, 6, 16); \
+ f_imm16 = EXTRACT_MSB0_SINT (insn, 32, 6, 16); \
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
@@ -780,7 +780,7 @@ struct scache {
length = 4; \
f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
- f_imm10 = EXTRACT_MSB0_INT (insn, 32, 12, 10); \
+ f_imm10 = EXTRACT_MSB0_SINT (insn, 32, 12, 10); \
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
@@ -797,7 +797,7 @@ struct scache {
f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
f_ext = EXTRACT_MSB0_UINT (insn, 32, 12, 4); \
- f_disp6x32 = ((EXTRACT_MSB0_INT (insn, 32, 16, 6)) << (5)); \
+ f_disp6x32 = ((EXTRACT_MSB0_SINT (insn, 32, 16, 6)) << (5)); \
f_right = EXTRACT_MSB0_UINT (insn, 32, 16, 6); \
f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \
@@ -812,7 +812,7 @@ struct scache {
#define EXTRACT_IFMT_PTA_CODE \
length = 4; \
f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
- f_disp16 = ((((EXTRACT_MSB0_INT (insn, 32, 6, 16)) << (2))) + (pc)); \
+ f_disp16 = ((((EXTRACT_MSB0_SINT (insn, 32, 6, 16)) << (2))) + (pc)); \
f_likely = EXTRACT_MSB0_UINT (insn, 32, 22, 1); \
f_23_2 = EXTRACT_MSB0_UINT (insn, 32, 23, 2); \
f_tra = EXTRACT_MSB0_UINT (insn, 32, 25, 3); \
@@ -897,7 +897,7 @@ struct scache {
length = 4; \
f_op = EXTRACT_MSB0_UINT (insn, 32, 0, 6); \
f_left = EXTRACT_MSB0_UINT (insn, 32, 6, 6); \
- f_disp10x2 = ((EXTRACT_MSB0_INT (insn, 32, 12, 10)) << (1)); \
+ f_disp10x2 = ((EXTRACT_MSB0_SINT (insn, 32, 12, 10)) << (1)); \
f_dest = EXTRACT_MSB0_UINT (insn, 32, 22, 6); \
f_rsvd = EXTRACT_MSB0_UINT (insn, 32, 28, 4); \