aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2001-07-09 14:22:11 +0000
committerAndreas Jaeger <aj@suse.de>2001-07-09 14:22:11 +0000
commit7081ff044544540525d971fe53db9217f340a8ed (patch)
tree28865fa6a53874d140c2b64414a5a72f9451d437
parent7e005732aa09aad97c790cab88d294aeed06eada (diff)
downloadgdb-7081ff044544540525d971fe53db9217f340a8ed.zip
gdb-7081ff044544540525d971fe53db9217f340a8ed.tar.gz
gdb-7081ff044544540525d971fe53db9217f340a8ed.tar.bz2
2001-07-09 Andreas Jaeger <aj@suse.de>, Karsten Keil <kkeil@suse.de>
* i386-dis.c (set_op): Handle 64 bit and 32 bit mode. (OP_J): Use bfd_vma for mask to work properly with 64 bits. (op_address,op_riprel): Use bfd_vma to handle 64 bits.
-rw-r--r--opcodes/ChangeLog6
-rw-r--r--opcodes/i386-dis.c23
2 files changed, 22 insertions, 7 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 4df56fb..2953237 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,9 @@
+2001-07-09 Andreas Jaeger <aj@suse.de>, Karsten Keil <kkeil@suse.de>
+
+ * i386-dis.c (set_op): Handle 64 bit and 32 bit mode.
+ (OP_J): Use bfd_vma for mask to work properly with 64 bits.
+ (op_address,op_riprel): Use bfd_vma to handle 64 bits.
+
2001-07-05 Ben Elliston <bje@redhat.com>
* Makefile.am (CPUDIR): Define.
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 363fe4e..d5eacd2 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -67,7 +67,7 @@ static bfd_vma get64 PARAMS ((void));
static bfd_signed_vma get32 PARAMS ((void));
static bfd_signed_vma get32s PARAMS ((void));
static int get16 PARAMS ((void));
-static void set_op PARAMS ((unsigned int, int));
+static void set_op PARAMS ((bfd_vma, int));
static void OP_REG PARAMS ((int, int));
static void OP_IMREG PARAMS ((int, int));
static void OP_I PARAMS ((int, int));
@@ -1786,8 +1786,8 @@ prefix_name (pref, sizeflag)
static char op1out[100], op2out[100], op3out[100];
static int op_ad, op_index[3];
-static unsigned int op_address[3];
-static unsigned int op_riprel[3];
+static bfd_vma op_address[3];
+static bfd_vma op_riprel[3];
static bfd_vma start_pc;
@@ -3238,12 +3238,21 @@ get16 ()
static void
set_op (op, riprel)
- unsigned int op;
+ bfd_vma op;
int riprel;
{
op_index[op_ad] = op_ad;
- op_address[op_ad] = op;
- op_riprel[op_ad] = riprel;
+ if (mode_64bit)
+ {
+ op_address[op_ad] = op;
+ op_riprel[op_ad] = riprel;
+ }
+ else
+ {
+ /* Mask to get a 32-bit address. */
+ op_address[op_ad] = op & 0xffffffff;
+ op_riprel[op_ad] = riprel & 0xffffffff;
+ }
}
static void
@@ -3515,7 +3524,7 @@ OP_J (bytemode, sizeflag)
int sizeflag;
{
bfd_vma disp;
- int mask = -1;
+ bfd_vma mask = -1;
switch (bytemode)
{