diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2007-09-15 22:06:42 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2007-09-15 22:06:42 +0000 |
commit | 27ac72083be347b60c80b8b9daaf77d0243cde5f (patch) | |
tree | 5c2021f3482b054915e8681f5b93e69dc484dd91 /gas | |
parent | 7e27a47a1eca4baf396db956c1f1d2bde64fd5af (diff) | |
download | gdb-27ac72083be347b60c80b8b9daaf77d0243cde5f.zip gdb-27ac72083be347b60c80b8b9daaf77d0243cde5f.tar.gz gdb-27ac72083be347b60c80b8b9daaf77d0243cde5f.tar.bz2 |
gas/
2007-09-15 H.J. Lu <hongjiu.lu@intel.com>
PR gas/5034
* config/tc-i386.c (intel_e04): Return 1 if cur_token.code is
T_NIL.
gas/testsuite/
2007-09-15 H.J. Lu <hongjiu.lu@intel.com>
PR gas/5034
* gas/i386/x86-64-rip.s: Add Intel mode testcases.
* gas/i386/x86-64-rip-intel.d: Updated.
* gas/i386/x86-64-rip.d: Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 3 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-rip-intel.d | 14 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-rip.d | 14 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-rip.s | 5 |
6 files changed, 39 insertions, 10 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 232640a..b846cae 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2007-09-15 H.J. Lu <hongjiu.lu@intel.com> + + PR gas/5034 + * config/tc-i386.c (intel_e04): Return 1 if cur_token.code is + T_NIL. + 2007-09-14 H.J. Lu <hongjiu.lu@intel.com> * config/tc-i386.c (build_modrm_byte): Adjust comment line diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 5453a00..1a6d345 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -7913,6 +7913,9 @@ intel_e04 (void) if (!intel_e05()) return 0; + if (cur_token.code == T_NIL) + return 1; + if (nregs >= 0 && NUM_ADDRESS_REGS > nregs) i.base_reg = i386_regtab + REGNAM_AL; /* al is invalid as base */ diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 540fca1..f8ff093 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2007-09-15 H.J. Lu <hongjiu.lu@intel.com> + + PR gas/5034 + * gas/i386/x86-64-rip.s: Add Intel mode testcases. + * gas/i386/x86-64-rip-intel.d: Updated. + * gas/i386/x86-64-rip.d: Likewise. + 2007-09-14 Michael Meissner <michael.meissner@amd.com> Dwarakanath Rajagopal <dwarak.rajagopal@amd.com> Tony Linthicum <tony.linthicum@amd.com> diff --git a/gas/testsuite/gas/i386/x86-64-rip-intel.d b/gas/testsuite/gas/i386/x86-64-rip-intel.d index 162f654..24c9299 100644 --- a/gas/testsuite/gas/i386/x86-64-rip-intel.d +++ b/gas/testsuite/gas/i386/x86-64-rip-intel.d @@ -7,9 +7,13 @@ Disassembly of section .text: -0+000 <.text>: -[ ]*0:[ ]+8d 05 00 00 00 00[ ]+lea[ ]+eax,\[rip\+0x0\][ ]*(#.*)? -[ ]*6:[ ]+8d 05 11 11 11 11[ ]+lea[ ]+eax,\[rip\+0x11111111\][ ]*(#.*)? -[ ]*c:[ ]+8d 05 01 00 00 00[ ]+lea[ ]+eax,\[rip\+0x1\][ ]*(#.*)? -[ ]*12:[ ]+8d 05 00 00 00 00[ ]+lea[ ]+eax,\[rip\+0x0\][ ]*(#.*)? +0+ <.text>: +[ ]*[a-f0-9]+: 8d 05 00 00 00 00 lea eax,\[rip\+0x0\][ ]*#[ ]*0x[a-f0-9]+[ ]+[a-f0-9]+: R_X86_64_PC32 symbol-0x4 +[ ]*[a-f0-9]+: 8d 05 11 11 11 11 lea eax,\[rip\+0x11111111\] # 0x1111111d +[ ]*[a-f0-9]+: 8d 05 01 00 00 00 lea eax,\[rip\+0x1\] # 0x13 +[ ]*[a-f0-9]+: 8d 05 00 00 00 00 lea eax,\[rip\+0x0\] # 0x18 +[ ]*[a-f0-9]+: 48 8b 05 00 00 00 00 mov rax,QWORD PTR \[rip\+0x0\][ ]*#[ ]*0x[a-f0-9]+[ ]+[a-f0-9]+: R_X86_64_PC32 __CTOR_END__-0xc +[ ]*[a-f0-9]+: 48 8b 05 00 00 00 00 mov rax,QWORD PTR \[rip\+0x0\][ ]*#[ ]*0x[a-f0-9]+[ ]+[a-f0-9]+: R_X86_64_PC32 __CTOR_END__-0xc +[ ]*[a-f0-9]+: 48 8b 05 00 00 00 00 mov rax,QWORD PTR \[rip\+0x0\][ ]*#[ ]*0x[a-f0-9]+[ ]+[a-f0-9]+: R_X86_64_PC32 __CTOR_END__-0xc +[ ]*[a-f0-9]+: 48 8b 05 00 00 00 00 mov rax,QWORD PTR \[rip\+0x0\][ ]*#[ ]*0x[a-f0-9]+[ ]+[a-f0-9]+: R_X86_64_PC32 __CTOR_END__-0xc #pass diff --git a/gas/testsuite/gas/i386/x86-64-rip.d b/gas/testsuite/gas/i386/x86-64-rip.d index 66fe771..aea7faa 100644 --- a/gas/testsuite/gas/i386/x86-64-rip.d +++ b/gas/testsuite/gas/i386/x86-64-rip.d @@ -6,9 +6,13 @@ Disassembly of section .text: -0+000 <.text>: -[ ]*0:[ ]+8d 05 00 00 00 00[ ]+lea[ ]+0x0\(%rip\),%eax[ ]*(#.*)? -[ ]*6:[ ]+8d 05 11 11 11 11[ ]+lea[ ]+0x11111111\(%rip\),%eax[ ]*(#.*)? -[ ]*c:[ ]+8d 05 01 00 00 00[ ]+lea[ ]+0x1\(%rip\),%eax[ ]*(#.*)? -[ ]*12:[ ]+8d 05 00 00 00 00[ ]+lea[ ]+0x0\(%rip\),%eax[ ]*(#.*)? +0+ <.text>: +[ ]*[a-f0-9]+: 8d 05 00 00 00 00 lea 0x0\(%rip\),%eax[ ]*#[ ]*0x[a-f0-9]+[ ]+[a-f0-9]+: R_X86_64_PC32 symbol-0x4 +[ ]*[a-f0-9]+: 8d 05 11 11 11 11 lea 0x11111111\(%rip\),%eax # 0x1111111d +[ ]*[a-f0-9]+: 8d 05 01 00 00 00 lea 0x1\(%rip\),%eax # 0x13 +[ ]*[a-f0-9]+: 8d 05 00 00 00 00 lea 0x0\(%rip\),%eax # 0x18 +[ ]*[a-f0-9]+: 48 8b 05 00 00 00 00 mov 0x0\(%rip\),%rax[ ]*#[ ]*0x[a-f0-9]+[ ]+[a-f0-9]+: R_X86_64_PC32 __CTOR_END__-0xc +[ ]*[a-f0-9]+: 48 8b 05 00 00 00 00 mov 0x0\(%rip\),%rax[ ]*#[ ]*0x[a-f0-9]+[ ]+[a-f0-9]+: R_X86_64_PC32 __CTOR_END__-0xc +[ ]*[a-f0-9]+: 48 8b 05 00 00 00 00 mov 0x0\(%rip\),%rax[ ]*#[ ]*0x[a-f0-9]+[ ]+[a-f0-9]+: R_X86_64_PC32 __CTOR_END__-0xc +[ ]*[a-f0-9]+: 48 8b 05 00 00 00 00 mov 0x0\(%rip\),%rax[ ]*#[ ]*0x[a-f0-9]+[ ]+[a-f0-9]+: R_X86_64_PC32 __CTOR_END__-0xc #pass diff --git a/gas/testsuite/gas/i386/x86-64-rip.s b/gas/testsuite/gas/i386/x86-64-rip.s index c6ac195..8ba88c4 100644 --- a/gas/testsuite/gas/i386/x86-64-rip.s +++ b/gas/testsuite/gas/i386/x86-64-rip.s @@ -3,3 +3,8 @@ leal 0x11111111(%rip), %eax leal 1(%rip), %eax leal (%rip), %eax +.intel_syntax noprefix +mov rax, QWORD PTR __CTOR_END__-8[rip] +mov rax, QWORD PTR __CTOR_END__+-8[rip] +mov rax, QWORD PTR -8+__CTOR_END__[rip] +mov rax, QWORD PTR __CTOR_END__[rip-8] |