diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2009-10-13 16:23:25 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2009-10-13 16:23:25 +0000 |
commit | 313c53d19e95820f8dfb8e3b22f3753428938c3f (patch) | |
tree | 34e1d25974777e835a08e8875befe243e74180a5 /gas/testsuite | |
parent | 88e3b899d71edaa44be82469cb2e462212a0e406 (diff) | |
download | gdb-313c53d19e95820f8dfb8e3b22f3753428938c3f.zip gdb-313c53d19e95820f8dfb8e3b22f3753428938c3f.tar.gz gdb-313c53d19e95820f8dfb8e3b22f3753428938c3f.tar.bz2 |
gas/
2009-10-13 H.J. Lu <hongjiu.lu@intel.com>
PR gas/10740
* config/tc-i386-intel.c (i386_intel_operand): Handle call
and jump with 2 immediate operands.
* config/tc-i386.c (i386_finalize_immediate): Don't generate
error message if operand string is NULL.
gas/testsuite/
2009-10-13 H.J. Lu <hongjiu.lu@intel.com>
PR gas/10740
* gas/i386/jump.s: Add new tests.
* gas/i386/jump16.s: Likewise.
* gas/i386/jump.d: Updated.
* gas/i386/jump16.d: Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/jump.d | 16 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/jump.s | 17 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/jump16.d | 62 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/jump16.s | 17 |
5 files changed, 98 insertions, 23 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 4a093bf..b86bd64 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2009-10-13 H.J. Lu <hongjiu.lu@intel.com> + + PR gas/10740 + * gas/i386/jump.s: Add new tests. + * gas/i386/jump16.s: Likewise. + + * gas/i386/jump.d: Updated. + * gas/i386/jump16.d: Likewise. + 2009-10-13 Vincent Riviere <vincent.riviere@freesbee.fr> PR gas/3041 diff --git a/gas/testsuite/gas/i386/jump.d b/gas/testsuite/gas/i386/jump.d index 0802785..e53f09d 100644 --- a/gas/testsuite/gas/i386/jump.d +++ b/gas/testsuite/gas/i386/jump.d @@ -36,4 +36,20 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: eb 00 jmp (0x)?7e( <.text(\+0x7e)?>)? [ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 9a 90 90 90 90 90 90 lcall \$0x9090,\$0x90909090 +[ ]*[a-f0-9]+: 9a 90 90 90 90 90 90 lcall \$0x9090,\$0x90909090 +[ ]*[a-f0-9]+: 9a 00 00 00 00 90 90 lcall \$0x9090,\$0x0 8e: (R_386_)?(dir)?32 xxx +[ ]*[a-f0-9]+: 9a 00 00 00 00 90 90 lcall \$0x9090,\$0x0 95: (R_386_)?(dir)?32 xxx +[ ]*[a-f0-9]+: 9a 90 90 90 90 90 90 lcall \$0x9090,\$0x90909090 +[ ]*[a-f0-9]+: 9a 90 90 90 90 90 90 lcall \$0x9090,\$0x90909090 +[ ]*[a-f0-9]+: 9a 00 00 00 00 90 90 lcall \$0x9090,\$0x0 aa: (R_386_)?(dir)?32 xxx +[ ]*[a-f0-9]+: 9a 00 00 00 00 90 90 lcall \$0x9090,\$0x0 b1: (R_386_)?(dir)?32 xxx +[ ]*[a-f0-9]+: ea 90 90 90 90 90 90 ljmp \$0x9090,\$0x90909090 +[ ]*[a-f0-9]+: ea 90 90 90 90 90 90 ljmp \$0x9090,\$0x90909090 +[ ]*[a-f0-9]+: ea 00 00 00 00 90 90 ljmp \$0x9090,\$0x0 c6: (R_386_)?(dir)?32 xxx +[ ]*[a-f0-9]+: ea 00 00 00 00 90 90 ljmp \$0x9090,\$0x0 cd: (R_386_)?(dir)?32 xxx +[ ]*[a-f0-9]+: ea 90 90 90 90 90 90 ljmp \$0x9090,\$0x90909090 +[ ]*[a-f0-9]+: ea 90 90 90 90 90 90 ljmp \$0x9090,\$0x90909090 +[ ]*[a-f0-9]+: ea 00 00 00 00 90 90 ljmp \$0x9090,\$0x0 e2: (R_386_)?(dir)?32 xxx +[ ]*[a-f0-9]+: ea 00 00 00 00 90 90 ljmp \$0x9090,\$0x0 e9: (R_386_)?(dir)?32 xxx #pass diff --git a/gas/testsuite/gas/i386/jump.s b/gas/testsuite/gas/i386/jump.s index 71693ce..8ce459f 100644 --- a/gas/testsuite/gas/i386/jump.s +++ b/gas/testsuite/gas/i386/jump.s @@ -35,3 +35,20 @@ nop jmp .+2 nop + + lcall 0x9090,0x90909090 + lcall 0x9090:0x90909090 + lcall 0x9090,xxx + lcall 0x9090:xxx + call 0x9090,0x90909090 + call 0x9090:0x90909090 + call 0x9090,xxx + call 0x9090:xxx + ljmp 0x9090,0x90909090 + ljmp 0x9090:0x90909090 + ljmp 0x9090,xxx + ljmp 0x9090:xxx + jmp 0x9090,0x90909090 + jmp 0x9090:0x90909090 + jmp 0x9090,xxx + jmp 0x9090:xxx diff --git a/gas/testsuite/gas/i386/jump16.d b/gas/testsuite/gas/i386/jump16.d index db5d44a..c91c8ae 100644 --- a/gas/testsuite/gas/i386/jump16.d +++ b/gas/testsuite/gas/i386/jump16.d @@ -7,48 +7,64 @@ Disassembly of section .text: 0+ <.text>: [ ]*[a-f0-9]+: eb fe jmp (0x0|0 <.text>) -[ ]*[a-f0-9]+: e9 fe ff jmp 0x3 3: R_386_PC16 xxx -[ ]*[a-f0-9]+: ff 26 00 00 jmp \*0x0 7: R_386_16 xxx +[ ]*[a-f0-9]+: e9 f(e|b) ff jmp (0x3|0 <.text>) 3: (R_386_PC)?(DISP)?16 xxx +[ ]*[a-f0-9]+: ff 26 00 00 jmp \*0x0 7: (R_386_)?16 xxx [ ]*[a-f0-9]+: 66 ff e7 jmpl \*%edi [ ]*[a-f0-9]+: 67 ff 27 addr32 jmp \*\(%edi\) [ ]*[a-f0-9]+: 67 ff af 00 00 00 00 addr32 ljmp \*0x0\(%edi\) 12: (R_386_)?(dir)?32 xxx -[ ]*[a-f0-9]+: ff 2e 00 00 ljmp \*0x0 18: R_386_16 xxx -[ ]*[a-f0-9]+: ea 00 00 34 12 ljmp \$0x1234,\$0x0 1b: R_386_16 xxx -[ ]*[a-f0-9]+: 66 e8 db ff ff ff calll 0x0 -[ ]*[a-f0-9]+: 66 e8 fc ff ff ff calll 0x27 27: (R_386_PC)?(DISP)?32 xxx -[ ]*[a-f0-9]+: 66 ff 16 00 00 calll \*0x0 2e: R_386_16 xxx +[ ]*[a-f0-9]+: ff 2e 00 00 ljmp \*0x0 18: (R_386_)?16 xxx +[ ]*[a-f0-9]+: ea 00 00 34 12 ljmp \$0x1234,\$0x0 1b: (R_386_)?16 xxx +[ ]*[a-f0-9]+: 66 e8 db ff ff ff calll (0x0|0 <.text>) +[ ]*[a-f0-9]+: 66 e8 (fc|d5) ff ff ff calll (0x27|0 <.text>) 27: (R_386_PC)?(DISP)?32 xxx +[ ]*[a-f0-9]+: 66 ff 16 00 00 calll \*0x0 2e: (R_386_)?16 xxx [ ]*[a-f0-9]+: 66 ff d7 calll \*%edi [ ]*[a-f0-9]+: 67 66 ff 17 addr32 calll \*\(%edi\) [ ]*[a-f0-9]+: 67 66 ff 9f 00 00 00 00 addr32 lcalll \*0x0\(%edi\) 3b: (R_386_)?(dir)?32 xxx -[ ]*[a-f0-9]+: 66 ff 1e 00 00 lcalll \*0x0 42: R_386_16 xxx +[ ]*[a-f0-9]+: 66 ff 1e 00 00 lcalll \*0x0 42: (R_386_)?16 xxx [ ]*[a-f0-9]+: 66 9a 00 00 00 00 34 12 lcalll \$0x1234,\$0x0 46: (R_386_)?(dir)?32 xxx [ ]*[a-f0-9]+: eb b2 jmp (0x0|0 <.text>) -[ ]*[a-f0-9]+: ff 26 00 00 jmp \*0x0 50: R_386_16 xxx +[ ]*[a-f0-9]+: ff 26 00 00 jmp \*0x0 50: (R_386_)?16 xxx [ ]*[a-f0-9]+: ff e7 jmp \*%di [ ]*[a-f0-9]+: ff 25 jmp \*\(%di\) -[ ]*[a-f0-9]+: ff ad 00 00 ljmp \*0x0\(%di\) 58: R_386_16 xxx -[ ]*[a-f0-9]+: 66 ff ad 00 00 ljmpl \*0x0\(%di\) 5d: R_386_16 xxx -[ ]*[a-f0-9]+: ff 2e 00 00 ljmp \*0x0 61: R_386_16 xxx -[ ]*[a-f0-9]+: 66 ff 2e 00 00 ljmpl \*0x0 66: R_386_16 xxx -[ ]*[a-f0-9]+: ea 00 00 34 12 ljmp \$0x1234,\$0x0 69: R_386_16 xxx +[ ]*[a-f0-9]+: ff ad 00 00 ljmp \*0x0\(%di\) 58: (R_386_)?16 xxx +[ ]*[a-f0-9]+: 66 ff ad 00 00 ljmpl \*0x0\(%di\) 5d: (R_386_)?16 xxx +[ ]*[a-f0-9]+: ff 2e 00 00 ljmp \*0x0 61: (R_386_)?16 xxx +[ ]*[a-f0-9]+: 66 ff 2e 00 00 ljmpl \*0x0 66: (R_386_)?16 xxx +[ ]*[a-f0-9]+: ea 00 00 34 12 ljmp \$0x1234,\$0x0 69: (R_386_)?16 xxx [ ]*[a-f0-9]+: e8 90 ff call (0x0|0 <.text>) -[ ]*[a-f0-9]+: e8 fe ff call 0x71 71: R_386_PC16 xxx -[ ]*[a-f0-9]+: ff 16 00 00 call \*0x0 75: R_386_16 xxx +[ ]*[a-f0-9]+: e8 (fe|8d) ff call (0x71|0 <.text>) 71: (R_386_PC)?(DISP)?16 xxx +[ ]*[a-f0-9]+: ff 16 00 00 call \*0x0 75: (R_386_)?16 xxx [ ]*[a-f0-9]+: ff d7 call \*%di [ ]*[a-f0-9]+: ff 15 call \*\(%di\) -[ ]*[a-f0-9]+: ff 9d 00 00 lcall \*0x0\(%di\) 7d: R_386_16 xxx -[ ]*[a-f0-9]+: 66 ff 9d 00 00 lcalll \*0x0\(%di\) 82: R_386_16 xxx -[ ]*[a-f0-9]+: ff 1e 00 00 lcall \*0x0 86: R_386_16 xxx -[ ]*[a-f0-9]+: 66 ff 1e 00 00 lcalll \*0x0 8b: R_386_16 xxx -[ ]*[a-f0-9]+: 9a 00 00 34 12 lcall \$0x1234,\$0x0 8e: R_386_16 xxx +[ ]*[a-f0-9]+: ff 9d 00 00 lcall \*0x0\(%di\) 7d: (R_386_)?16 xxx +[ ]*[a-f0-9]+: 66 ff 9d 00 00 lcalll \*0x0\(%di\) 82: (R_386_)?16 xxx +[ ]*[a-f0-9]+: ff 1e 00 00 lcall \*0x0 86: (R_386_)?16 xxx +[ ]*[a-f0-9]+: 66 ff 1e 00 00 lcalll \*0x0 8b: (R_386_)?16 xxx +[ ]*[a-f0-9]+: 9a 00 00 34 12 lcall \$0x1234,\$0x0 8e: (R_386_)?16 xxx [ ]*[a-f0-9]+: ff 17 call \*\(%bx\) [ ]*[a-f0-9]+: ff 1f lcall \*\(%bx\) [ ]*[a-f0-9]+: 66 ff 1f lcalll \*\(%bx\) [ ]*[a-f0-9]+: ff 27 jmp \*\(%bx\) [ ]*[a-f0-9]+: ff 2f ljmp \*\(%bx\) [ ]*[a-f0-9]+: 66 ff 2f ljmpl \*\(%bx\) -[ ]*[a-f0-9]+: eb 00 jmp 0xa2 +[ ]*[a-f0-9]+: eb 00 jmp (0xa2|a2 <.text\+0xa2>) [ ]*[a-f0-9]+: 90 nop -[ ]*[a-f0-9]+: eb 00 jmp 0xa5 +[ ]*[a-f0-9]+: eb 00 jmp (0xa5|a5 <.text\+0xa5>) [ ]*[a-f0-9]+: 90 nop +[ ]*[a-f0-9]+: 9a 10 10 90 90 lcall \$0x9090,\$0x1010 +[ ]*[a-f0-9]+: 9a 10 10 90 90 lcall \$0x9090,\$0x1010 +[ ]*[a-f0-9]+: 9a 00 00 90 90 lcall \$0x9090,\$0x0 b1: (R_386_)?16 xxx +[ ]*[a-f0-9]+: 9a 00 00 90 90 lcall \$0x9090,\$0x0 b6: (R_386_)?16 xxx +[ ]*[a-f0-9]+: 9a 10 10 90 90 lcall \$0x9090,\$0x1010 +[ ]*[a-f0-9]+: 9a 10 10 90 90 lcall \$0x9090,\$0x1010 +[ ]*[a-f0-9]+: 9a 00 00 90 90 lcall \$0x9090,\$0x0 c5: (R_386_)?16 xxx +[ ]*[a-f0-9]+: 9a 00 00 90 90 lcall \$0x9090,\$0x0 ca: (R_386_)?16 xxx +[ ]*[a-f0-9]+: ea 10 10 90 90 ljmp \$0x9090,\$0x1010 +[ ]*[a-f0-9]+: ea 10 10 90 90 ljmp \$0x9090,\$0x1010 +[ ]*[a-f0-9]+: ea 00 00 90 90 ljmp \$0x9090,\$0x0 d9: (R_386_)?16 xxx +[ ]*[a-f0-9]+: ea 00 00 90 90 ljmp \$0x9090,\$0x0 de: (R_386_)?16 xxx +[ ]*[a-f0-9]+: ea 10 10 90 90 ljmp \$0x9090,\$0x1010 +[ ]*[a-f0-9]+: ea 10 10 90 90 ljmp \$0x9090,\$0x1010 +[ ]*[a-f0-9]+: ea 00 00 90 90 ljmp \$0x9090,\$0x0 ed: (R_386_)?16 xxx +[ ]*[a-f0-9]+: ea 00 00 90 90 ljmp \$0x9090,\$0x0 f2: (R_386_)?16 xxx #pass diff --git a/gas/testsuite/gas/i386/jump16.s b/gas/testsuite/gas/i386/jump16.s index 7ad9c6b..f8bc0ea 100644 --- a/gas/testsuite/gas/i386/jump16.s +++ b/gas/testsuite/gas/i386/jump16.s @@ -54,3 +54,20 @@ nop jmp .+2 nop + + lcall 0x9090,0x1010 + lcall 0x9090:0x1010 + lcall 0x9090,xxx + lcall 0x9090:xxx + call 0x9090,0x1010 + call 0x9090:0x1010 + call 0x9090,xxx + call 0x9090:xxx + ljmp 0x9090,0x1010 + ljmp 0x9090:0x1010 + ljmp 0x9090,xxx + ljmp 0x9090:xxx + jmp 0x9090,0x1010 + jmp 0x9090:0x1010 + jmp 0x9090,xxx + jmp 0x9090:xxx |