Handle indirect branches for AMD64 and Intel64
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 3 Jun 2016 22:55:29 +0000 (15:55 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 3 Jun 2016 22:55:29 +0000 (15:55 -0700)
commit07f5af7d3c635234284e7a0f7dd7a410b1628b8b
treea37189780861055d8db8e3e7b624f9fd25288b2d
parent1aa70332cab048c3a7bb6dd7dc8b7a1b686ea657
Handle indirect branches for AMD64 and Intel64

AMD64 spec and Intel64 spec differ in indirect branches in 64-bit mode.
AMD64 supports indirect branches with 16-bit address via the data size
prefix while the data size prefix is ignored by Intel64.

gas/

PR binutis/18386
* testsuite/gas/i386/i386.exp: Run x86-64-branch-4.
* testsuite/gas/i386/x86-64-branch.d: Updated.
* testsuite/gas/i386/ilp32/x86-64-branch.d: Likewise.
* testsuite/gas/i386/x86-64-branch-4.l: New file.
* testsuite/gas/i386/x86-64-branch-4.s: Likewise.

opcodes/

PR binutis/18386
* i386-dis.c (indirEv): Replace stack_v_mode with indir_v_mode.
(indir_v_mode): New.
Add comments for '&'.
(reg_table): Replace "{T|}" with "{&|}" on call and jmp.
(putop): Handle '&'.
(intel_operand_size): Handle indir_v_mode.
(OP_E_register): Likewise.
* i386-opc.tbl: Mark 64-bit indirect call/jmp as AMD64.  Add
64-bit indirect call/jmp for AMD64.
* i386-tbl.h: Regenerated
gas/ChangeLog
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/ilp32/x86-64-branch.d
gas/testsuite/gas/i386/x86-64-branch-4.l [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-branch-4.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-branch.d
opcodes/ChangeLog
opcodes/i386-dis.c
opcodes/i386-opc.tbl
opcodes/i386-tbl.h
This page took 0.026192 seconds and 4 git commands to generate.