diff options
author | Andreas Jaeger <aj@suse.de> | 2001-07-09 14:22:11 +0000 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2001-07-09 14:22:11 +0000 |
commit | 6ba1bfd1eb2eb37f9c793583dc305515b9484431 (patch) | |
tree | f276e1223ef83f293ab0e4e40faaa840c9a9c098 | |
parent | 0ca52ef7223929cecd762b7cc4d94a726f16ad91 (diff) | |
download | gdb-6ba1bfd1eb2eb37f9c793583dc305515b9484431.tar.gz |
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/ChangeLog | 6 | ||||
-rw-r--r-- | opcodes/i386-dis.c | 23 |
2 files changed, 22 insertions, 7 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 4df56fb857a..2953237b6c7 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 363fe4ef604..d5eacd29e57 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) { |