Rewrite prefix processing.
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 13 Nov 2009 20:42:10 +0000 (20:42 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 13 Nov 2009 20:42:10 +0000 (20:42 +0000)
commitf16cd0d502d32721849ec650d4dfda17fb530066
tree397095fb3297f5c9d224cc113e318d53f00427b8
parentbdea3a92b7a2c527ba40aa646d669c2c338f0a92
Rewrite prefix processing.

gas/testsuite/

2009-11-13  H.J. Lu  <hongjiu.lu@intel.com>

* gas/i386/i386.exp: Run long-1, long-1-intel, x86-64-long-1,
and x86-64-long-1-intel.

* gas/i386/long-1-intel.d: New.
* gas/i386/long-1.d: Likewise.
* gas/i386/long-1.s: Likewise.
* gas/i386/x86-64-long-1-intel.d: Likewise.
* gas/i386/x86-64-long-1.d: Likewise.
* gas/i386/x86-64-long-1.s: Likewise.

* gas/i386/jump16.d: Updated for prefix processing.
* gas/i386/naked.d: Likewise.
* gas/i386/nops-1-core2.d: Likewise.
* gas/i386/nops-1-i686.d: Likewise.
* gas/i386/nops-3-i686.d: Likewise.
* gas/i386/nops-4-i686.d: Likewise.
* gas/i386/nops-5-i686.d: Likewise.
* gas/i386/nops-5.d: Likewise.
* gas/i386/prefix.d: Likewise.
* gas/i386/rep.d: Likewise.
* gas/i386/string-ok.d: Likewise.
* gas/i386/x86-64-addr32-intel.d: Likewise.
* gas/i386/x86-64-addr32.d: Likewise.
* gas/i386/x86-64-cbw-intel.d: Likewise.
* gas/i386/x86-64-cbw.d: Likewise.
* gas/i386/x86-64-io-intel.d: Likewise.
* gas/i386/x86-64-io-suffix.d: Likewise.
* gas/i386/x86-64-io.d: Likewise.
* gas/i386/x86-64-lwp.d: Likewise.
* gas/i386/x86-64-nops-1-core2.d: Likewise.
* gas/i386/x86-64-nops-1-nocona.d: Likewise.
* gas/i386/x86-64-nops-1.d: Likewise.
* gas/i386/x86-64-nops-2.d: Likewise.
* gas/i386/x86-64-nops-3.d: Likewise.
* gas/i386/x86-64-nops-4-core2.d: Likewise.
* gas/i386/x86-64-nops-4.d: Likewise.
* gas/i386/x86-64-nops-5-k8.d: Likewise.
* gas/i386/x86-64-nops-5.d: Likewise.
* gas/i386/x86-64-rep.d: Likewise.
* gas/i386/x86-64-stack-intel.d: Likewise.
* gas/i386/x86-64-stack-suffix.d: Likewise.
* gas/i386/x86-64-stack.d: Likewise.

ld/testsuite/

2009-11-13  H.J. Lu  <hongjiu.lu@intel.com>

* ld-x86-64/tlsbin.dd: Updated for prefix processing.
* ld-x86-64/tlsgdesc.dd: Likewise.
* ld-x86-64/tlsld1.dd: Likewise.
* ld-x86-64/tlspic.dd: Likewise.

opcodes/

2009-11-13  H.J. Lu  <hongjiu.lu@intel.com>

* i386-dis.c (ckprefix): Updated to return 0 if number of
prefixes > 14 and record the last position for each prefix.
(lock_prefix): Removed.
(data_prefix): Likewise.
(addr_prefix): Likewise.
(repz_prefix): Likewise.
(repnz_prefix): Likewise.
(last_lock_prefix): New.
(last_repz_prefix): Likewise.
(last_repnz_prefix): Likewise.
(last_data_prefix): Likewise.
(last_addr_prefix): Likewise.
(last_rex_prefix): Likewise.
(last_seg_prefix): Likewise.
(MAX_CODE_LENGTH): Likewise.
(ADDR16_PREFIX): Likewise.
(ADDR32_PREFIX): Likewise.
(DATA16_PREFIX): Likewise.
(DATA32_PREFIX): Likewise.
(REP_PREFIX): Likewise.
(seg_prefix): Likewise.
(all_prefixes): Change size to MAX_CODE_LENGTH - 1.
(prefix_name): Handle ADDR16_PREFIX, ADDR32_PREFIX,
DATA16_PREFIX, DATA32_PREFIX and REP_PREFIX.
(get_valid_dis386): Updated.
(OP_C): Likewise.
(OP_Monitor): Likewise.
(REP_Fixup): Likewise.
(print_insn): Display all prefixes.
(putop): Set PREFIX_DATA on used_prefixes only if it is used.
(intel_operand_size): Likewise.
(OP_E_register): Likewise.
(OP_G): Likewise.
(OP_REG): Likewise.
(OP_IMREG): Likewise.
(OP_I): Likewise.
(OP_I64): Likewise.
(OP_sI): Likewise.
(CRC32_Fixup): Likewise.
(MOVBE_Fixup): Likewise.
(OP_E_memory): Set REFIX_DATA on used_prefixes when it is used
in 16bit mode.
(OP_J): Set REX_W used if it is used. Set PREFIX_DATA on
used_prefixes only if it is used.
47 files changed:
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/jump16.d
gas/testsuite/gas/i386/long-1-intel.d [new file with mode: 0644]
gas/testsuite/gas/i386/long-1.d [new file with mode: 0644]
gas/testsuite/gas/i386/long-1.s [new file with mode: 0644]
gas/testsuite/gas/i386/naked.d
gas/testsuite/gas/i386/nops-1-core2.d
gas/testsuite/gas/i386/nops-1-i686.d
gas/testsuite/gas/i386/nops-3-i686.d
gas/testsuite/gas/i386/nops-4-i686.d
gas/testsuite/gas/i386/nops-5-i686.d
gas/testsuite/gas/i386/nops-5.d
gas/testsuite/gas/i386/prefix.d
gas/testsuite/gas/i386/rep.d
gas/testsuite/gas/i386/string-ok.d
gas/testsuite/gas/i386/x86-64-addr32-intel.d
gas/testsuite/gas/i386/x86-64-addr32.d
gas/testsuite/gas/i386/x86-64-cbw-intel.d
gas/testsuite/gas/i386/x86-64-cbw.d
gas/testsuite/gas/i386/x86-64-io-intel.d
gas/testsuite/gas/i386/x86-64-io-suffix.d
gas/testsuite/gas/i386/x86-64-io.d
gas/testsuite/gas/i386/x86-64-long-1-intel.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-long-1.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-long-1.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-lwp.d
gas/testsuite/gas/i386/x86-64-nops-1-core2.d
gas/testsuite/gas/i386/x86-64-nops-1-nocona.d
gas/testsuite/gas/i386/x86-64-nops-1.d
gas/testsuite/gas/i386/x86-64-nops-2.d
gas/testsuite/gas/i386/x86-64-nops-3.d
gas/testsuite/gas/i386/x86-64-nops-4-core2.d
gas/testsuite/gas/i386/x86-64-nops-4.d
gas/testsuite/gas/i386/x86-64-nops-5-k8.d
gas/testsuite/gas/i386/x86-64-nops-5.d
gas/testsuite/gas/i386/x86-64-rep.d
gas/testsuite/gas/i386/x86-64-stack-intel.d
gas/testsuite/gas/i386/x86-64-stack-suffix.d
gas/testsuite/gas/i386/x86-64-stack.d
ld/testsuite/ChangeLog
ld/testsuite/ld-x86-64/tlsbin.dd
ld/testsuite/ld-x86-64/tlsgdesc.dd
ld/testsuite/ld-x86-64/tlsld1.dd
ld/testsuite/ld-x86-64/tlspic.dd
opcodes/ChangeLog
opcodes/i386-dis.c