Zero-extend address from 32-bit to 64-bit for ADDR32 prefix
When there is ADDR32 prefix in 64-bit mode, we should zero-extend address from 32-bit to 64-bit. PR gdb/16304 * i386-tdep.c (i386_record_lea_modrm_addr): Zero-extend 32-bit address to 64-bit in 64-bit mode.
This commit is contained in:
parent
8ee5199a42
commit
e85596e021
|
@ -1,3 +1,9 @@
|
|||
2013-12-19 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR gdb/16304
|
||||
* i386-tdep.c (i386_record_lea_modrm_addr): Zero-extend 32-bit
|
||||
address to 64-bit in 64-bit mode.
|
||||
|
||||
2013-12-19 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR gdb/16304
|
||||
|
|
|
@ -4282,6 +4282,13 @@ i386_record_lea_modrm_addr (struct i386_record_s *irp, uint64_t *addr)
|
|||
else
|
||||
*addr = (uint32_t) (*addr + (offset64 << scale));
|
||||
}
|
||||
|
||||
if (!irp->aflag)
|
||||
{
|
||||
/* Since we are in 64-bit mode with ADDR32 prefix, zero-extend
|
||||
address from 32-bit to 64-bit. */
|
||||
*addr = (uint32_t) *addr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue