mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 21:41:47 +08:00
gas/
2005-03-17 Jan Beulich <jbeulich@novell.com> * config/tc-i386.c (i386_scale): Beautify error message. (Intel syntax comments): Update. (struct intel_parser_s): Add fields in_offset, in_bracket, and next_operand. (intel_e04_1, intel_e05_1, intel_e05_1, intel_e09_1, intel_e10_1): Remove declarations. (intel_bracket_expr): Declare. (i386_intel_operand): Initialize new intel_parser fields. Wrap most of the function body in a loop allowing to split an operand into two. Replace calls to malloc and checks of it returning non-NULL with calls to xmalloc/xstrdup. (intel_expr): SHORT no longer handled here. Add comment indicating comparison ops need implementation. (intel_e04, intel_e04_1): Combine, replace recursion with loop. Check right operand of - does not specify a register when parsing the address of a memory reference. (intel_e05, intel_e05_1): Combine, replace recursion with loop. Check operands do not specify a register when parsing the address of a memory reference. (intel_e06, intel_e06_1): Likewise. (intel_e09, intel_e09_1): Combine, replace recursion with loop. Also handle SHORT as well as unary + and -. Don't accept : except for segment overrides or in direct far jump/call insns. (intel_brack_expr): New. (intel_e10, intel_e10_1): Combine, replace recursion with loop. Use intel_brack_expr. (intel_e11): Replace chain of if/else-if by switch, alloing fall- through in certain cases. Use intel_brack_expr. Add new diagnostics. Allow symbolic constants as register scale value. (intel_get_token): Replace call to malloc and check of return value with call to xmalloc. Change handling for FLAT to match MASM's. (intel_putback_token): Don't try to back up/free current token if that is T_NIL. gas/testsuite/ 2005-03-17 Jan Beulich <jbeulich@novell.com> * gas/i386/intel.d: Add stderr directive. * gas/i386/intel.e: New. * gas/i386/intel16.d: Add stderr directive. Adjust for changed source. * gas/i386/intel16.e: New. * gas/i386/intel16.s: Add instances of addressing forms with base and index specified in reverse order. * gas/i386/intelbad.l: Adjust for changed source. * gas/i386/intelbad.s: Add more operand forms to check. * gas/i386/intelok.d: Remove -r from objdump options. Add stderr directive. Adjust for changed source. * gas/i386/intelok.e: New. * gas/i386/intelok.s: Define MASM constants byte, word, etc. Add more operand forms to check. * gas/i386/x86_64.d: Add stderr directive. * gas/i386/x86_64.e: New. * gas/i386/x86_64.s: Adjust for parser changes.
This commit is contained in:
@ -1,3 +1,39 @@
|
|||||||
|
2005-03-17 Jan Beulich <jbeulich@novell.com>
|
||||||
|
|
||||||
|
* config/tc-i386.c (i386_scale): Beautify error message.
|
||||||
|
(Intel syntax comments): Update.
|
||||||
|
(struct intel_parser_s): Add fields in_offset, in_bracket, and
|
||||||
|
next_operand.
|
||||||
|
(intel_e04_1, intel_e05_1, intel_e05_1, intel_e09_1, intel_e10_1):
|
||||||
|
Remove declarations.
|
||||||
|
(intel_bracket_expr): Declare.
|
||||||
|
(i386_intel_operand): Initialize new intel_parser fields. Wrap most
|
||||||
|
of the function body in a loop allowing to split an operand into two.
|
||||||
|
Replace calls to malloc and checks of it returning non-NULL with
|
||||||
|
calls to xmalloc/xstrdup.
|
||||||
|
(intel_expr): SHORT no longer handled here. Add comment indicating
|
||||||
|
comparison ops need implementation.
|
||||||
|
(intel_e04, intel_e04_1): Combine, replace recursion with loop.
|
||||||
|
Check right operand of - does not specify a register when parsing
|
||||||
|
the address of a memory reference.
|
||||||
|
(intel_e05, intel_e05_1): Combine, replace recursion with loop.
|
||||||
|
Check operands do not specify a register when parsing the address of
|
||||||
|
a memory reference.
|
||||||
|
(intel_e06, intel_e06_1): Likewise.
|
||||||
|
(intel_e09, intel_e09_1): Combine, replace recursion with loop. Also
|
||||||
|
handle SHORT as well as unary + and -. Don't accept : except for
|
||||||
|
segment overrides or in direct far jump/call insns.
|
||||||
|
(intel_brack_expr): New.
|
||||||
|
(intel_e10, intel_e10_1): Combine, replace recursion with loop. Use
|
||||||
|
intel_brack_expr.
|
||||||
|
(intel_e11): Replace chain of if/else-if by switch, alloing fall-
|
||||||
|
through in certain cases. Use intel_brack_expr. Add new diagnostics.
|
||||||
|
Allow symbolic constants as register scale value.
|
||||||
|
(intel_get_token): Replace call to malloc and check of return value
|
||||||
|
with call to xmalloc. Change handling for FLAT to match MASM's.
|
||||||
|
(intel_putback_token): Don't try to back up/free current token if
|
||||||
|
that is T_NIL.
|
||||||
|
|
||||||
2005-03-16 Daniel Jacobowitz <dan@codesourcery.com>
|
2005-03-16 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
* configure.tgt: Set emulation for arm-*-eabi*.
|
* configure.tgt: Set emulation for arm-*-eabi*.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,23 @@
|
|||||||
|
2005-03-17 Jan Beulich <jbeulich@novell.com>
|
||||||
|
|
||||||
|
* gas/i386/intel.d: Add stderr directive.
|
||||||
|
* gas/i386/intel.e: New.
|
||||||
|
* gas/i386/intel16.d: Add stderr directive. Adjust for changed
|
||||||
|
source.
|
||||||
|
* gas/i386/intel16.e: New.
|
||||||
|
* gas/i386/intel16.s: Add instances of addressing forms with base
|
||||||
|
and index specified in reverse order.
|
||||||
|
* gas/i386/intelbad.l: Adjust for changed source.
|
||||||
|
* gas/i386/intelbad.s: Add more operand forms to check.
|
||||||
|
* gas/i386/intelok.d: Remove -r from objdump options. Add stderr
|
||||||
|
directive. Adjust for changed source.
|
||||||
|
* gas/i386/intelok.e: New.
|
||||||
|
* gas/i386/intelok.s: Define MASM constants byte, word, etc. Add
|
||||||
|
more operand forms to check.
|
||||||
|
* gas/i386/x86_64.d: Add stderr directive.
|
||||||
|
* gas/i386/x86_64.e: New.
|
||||||
|
* gas/i386/x86_64.s: Adjust for parser changes.
|
||||||
|
|
||||||
2005-03-15 Zack Weinberg <zack@codesourcery.com>
|
2005-03-15 Zack Weinberg <zack@codesourcery.com>
|
||||||
|
|
||||||
* gas/arm/archv6t2.d, gas/arm/archv6t2.s: New dump test.
|
* gas/arm/archv6t2.d, gas/arm/archv6t2.s: New dump test.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#as: -J
|
#as: -J
|
||||||
#objdump: -dw
|
#objdump: -dw
|
||||||
#name: i386 intel
|
#name: i386 intel
|
||||||
|
#stderr: intel.e
|
||||||
|
|
||||||
.*: +file format .*
|
.*: +file format .*
|
||||||
|
|
||||||
|
8
gas/testsuite/gas/i386/intel.e
Normal file
8
gas/testsuite/gas/i386/intel.e
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
.*: Assembler messages:
|
||||||
|
.*:154: Warning: Treating .\[0x90909090\]. as memory reference
|
||||||
|
.*:155: Warning: Treating .\[0x90909090\]. as memory reference
|
||||||
|
.*:156: Warning: Treating .\[0x90909090\]. as memory reference
|
||||||
|
.*:157: Warning: Treating .\[0x90909090\]. as memory reference
|
||||||
|
.*:492: Warning: Treating .\[0x90909090\]. as memory reference
|
||||||
|
.*:493: Warning: Treating .\[0x90909090\]. as memory reference
|
||||||
|
.*:580: Warning: Using register names in OFFSET expressions is deprecated
|
@ -1,5 +1,6 @@
|
|||||||
#objdump: -dw -mi8086
|
#objdump: -dw -mi8086
|
||||||
#name: i386 intel16
|
#name: i386 intel16
|
||||||
|
#stderr: intel16.e
|
||||||
|
|
||||||
.*: +file format .*
|
.*: +file format .*
|
||||||
|
|
||||||
@ -12,4 +13,12 @@ Disassembly of section .text:
|
|||||||
11: 66 0f b7 06 00 00 [ ]*movzwl 0,%eax
|
11: 66 0f b7 06 00 00 [ ]*movzwl 0,%eax
|
||||||
17: 66 0f b6 06 00 00 [ ]*movzbl 0,%eax
|
17: 66 0f b6 06 00 00 [ ]*movzbl 0,%eax
|
||||||
1d: 0f b6 06 00 00 [ ]*movzbw 0,%ax
|
1d: 0f b6 06 00 00 [ ]*movzbw 0,%ax
|
||||||
#pass
|
22: 8d 00 [ ]*lea \(%bx,%si\),%ax
|
||||||
|
24: 8d 02 [ ]*lea \(%bp,%si\),%ax
|
||||||
|
26: 8d 01 [ ]*lea \(%bx,%di\),%ax
|
||||||
|
28: 8d 03 [ ]*lea \(%bp,%di\),%ax
|
||||||
|
2a: 8d 00 [ ]*lea \(%bx,%si\),%ax
|
||||||
|
2c: 8d 02 [ ]*lea \(%bp,%si\),%ax
|
||||||
|
2e: 8d 01 [ ]*lea \(%bx,%di\),%ax
|
||||||
|
30: 8d 03 [ ]*lea \(%bp,%di\),%ax
|
||||||
|
...
|
||||||
|
7
gas/testsuite/gas/i386/intel16.e
Normal file
7
gas/testsuite/gas/i386/intel16.e
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
.*: Assembler messages:
|
||||||
|
.*:5: Warning: Treating .word ptr \[0\]. as memory reference
|
||||||
|
.*:6: Warning: Treating .byte ptr \[0\]. as memory reference
|
||||||
|
.*:7: Warning: Treating .byte ptr \[0\]. as memory reference
|
||||||
|
.*:8: Warning: Treating .word ptr \[0\]. as memory reference
|
||||||
|
.*:9: Warning: Treating .byte ptr \[0\]. as memory reference
|
||||||
|
.*:10: Warning: Treating .byte ptr \[0\]. as memory reference
|
@ -8,4 +8,14 @@
|
|||||||
movzx eax,word ptr [0]
|
movzx eax,word ptr [0]
|
||||||
movzx eax,byte ptr [0]
|
movzx eax,byte ptr [0]
|
||||||
movzx ax,byte ptr [0]
|
movzx ax,byte ptr [0]
|
||||||
|
|
||||||
|
lea ax, [si+bx]
|
||||||
|
lea ax, [si+bp]
|
||||||
|
lea ax, [di+bx]
|
||||||
|
lea ax, [di+bp]
|
||||||
|
lea ax, [si][bx]
|
||||||
|
lea ax, [si][bp]
|
||||||
|
lea ax, [di][bx]
|
||||||
|
lea ax, [di][bp]
|
||||||
|
|
||||||
.p2align 4,0
|
.p2align 4,0
|
||||||
|
@ -59,3 +59,53 @@
|
|||||||
.*:89: Error: .*
|
.*:89: Error: .*
|
||||||
.*:90: Error: .*
|
.*:90: Error: .*
|
||||||
.*:91: Error: .*
|
.*:91: Error: .*
|
||||||
|
.*:94: Error: .*
|
||||||
|
.*:95: Error: .*
|
||||||
|
.*:96: Error: .*
|
||||||
|
.*:97: Error: .*
|
||||||
|
.*:98: Error: .*
|
||||||
|
.*:99: Error: .*
|
||||||
|
.*:100: Error: .*
|
||||||
|
.*:101: Error: .*
|
||||||
|
.*:102: Error: .*
|
||||||
|
.*:103: Error: .*
|
||||||
|
.*:104: Error: .*
|
||||||
|
.*:105: Error: .*
|
||||||
|
.*:106: Error: .*
|
||||||
|
.*:107: Error: .*
|
||||||
|
.*:108: Error: .*
|
||||||
|
.*:109: Error: .*
|
||||||
|
.*:110: Error: .*
|
||||||
|
.*:111: Error: .*
|
||||||
|
.*:112: Error: .*
|
||||||
|
.*:113: Error: .*
|
||||||
|
.*:114: Error: .*
|
||||||
|
.*:115: Error: .*
|
||||||
|
.*:116: Error: .*
|
||||||
|
.*:117: Error: .*
|
||||||
|
.*:118: Error: .*
|
||||||
|
.*:119: Error: .*
|
||||||
|
.*:120: Error: .*
|
||||||
|
.*:121: Error: .*
|
||||||
|
.*:122: Error: .*
|
||||||
|
.*:123: Error: .*
|
||||||
|
.*:124: Error: .*
|
||||||
|
.*:125: Error: .*
|
||||||
|
.*:126: Error: .*
|
||||||
|
.*:127: Error: .*
|
||||||
|
.*:128: Error: .*
|
||||||
|
#...
|
||||||
|
.*:129: Error: .*
|
||||||
|
#...
|
||||||
|
.*:130: Error: .*
|
||||||
|
.*:131: Error: .*
|
||||||
|
.*:132: Error: .*
|
||||||
|
.*:133: Error: .*
|
||||||
|
.*:135: Warning: .*
|
||||||
|
.*:136: Warning: .*
|
||||||
|
.*:137: Warning: .*
|
||||||
|
.*:138: Warning: .*
|
||||||
|
.*:139: Warning: .*
|
||||||
|
.*:141: Error: .*
|
||||||
|
.*:142: Warning: .*
|
||||||
|
.*:142: Error: .*
|
||||||
|
@ -89,3 +89,54 @@ start:
|
|||||||
push 1 1
|
push 1 1
|
||||||
push 1 +
|
push 1 +
|
||||||
push 1 * * 1
|
push 1 * * 1
|
||||||
|
|
||||||
|
# memory references
|
||||||
|
mov eax, [ecx*3]
|
||||||
|
mov eax, [3*ecx]
|
||||||
|
mov eax, [-1*ecx + 1]
|
||||||
|
mov eax, [esp + esp]
|
||||||
|
mov eax, [eax - 1*ecx + 1]
|
||||||
|
mov eax, [(eax-1) * (eax-1)]
|
||||||
|
mov eax, [eax-1 xor eax-1]
|
||||||
|
mov eax, [(eax-1) xor (eax-1)]
|
||||||
|
mov eax, [not eax + 1]
|
||||||
|
mov eax, [ecx*2 + edx*4]
|
||||||
|
mov eax, [2*ecx + 4*edx]
|
||||||
|
mov eax, [eax]1[ecx] # ugly diag
|
||||||
|
mov eax, [eax][ecx]1 # ugly diag
|
||||||
|
mov eax, eax[ecx] # ugly diag
|
||||||
|
mov eax, es[ecx]
|
||||||
|
mov eax, cr0[ecx]
|
||||||
|
mov eax, [eax]ecx
|
||||||
|
mov eax, [eax]+ecx
|
||||||
|
mov eax, [eax]+ecx*2
|
||||||
|
mov eax, [eax]+2*ecx
|
||||||
|
mov eax, [[eax]ecx]
|
||||||
|
mov eax, eax:[ecx]
|
||||||
|
lea eax, [bx+si*1]
|
||||||
|
lea eax, [bp+si*2]
|
||||||
|
lea eax, [bx+di*4]
|
||||||
|
lea eax, [bp+di*8]
|
||||||
|
lea eax, [bx+1*si]
|
||||||
|
lea eax, [bp+2*si]
|
||||||
|
lea eax, [bx+4*di]
|
||||||
|
lea eax, [bp+8*di]
|
||||||
|
mov eax, [ah]
|
||||||
|
mov eax, [ax]
|
||||||
|
mov eax, [eax+bx]
|
||||||
|
mov eax, offset [1*eax]
|
||||||
|
mov eax, offset 1*eax
|
||||||
|
mov eax, offset x[eax] # ugly diag
|
||||||
|
mov eax, offset [x][eax] # ugly diag
|
||||||
|
mov eax, flat x
|
||||||
|
mov eax, flat [x]
|
||||||
|
mov eax, es:eax
|
||||||
|
|
||||||
|
mov eax, offset [eax]
|
||||||
|
mov eax, offset eax
|
||||||
|
mov eax, offset offset eax
|
||||||
|
mov eax, es:ss:[eax]
|
||||||
|
mov eax, es:[eax]+ss:[eax]
|
||||||
|
|
||||||
|
mov eax, 3:5
|
||||||
|
call 3:[5]
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#as: -J
|
#as: -J
|
||||||
#objdump: -drwMintel
|
#objdump: -dwMintel
|
||||||
#name: i386 intel-ok
|
#name: i386 intel-ok
|
||||||
|
#stderr: intelok.e
|
||||||
|
|
||||||
.*: +file format .*
|
.*: +file format .*
|
||||||
|
|
||||||
@ -93,20 +94,39 @@ Disassembly of section .text:
|
|||||||
[ ]*[0-9a-f]+: d7[ ]+xlat(b|[ ]+(BYTE PTR )?(ds:)?\[ebx\])
|
[ ]*[0-9a-f]+: d7[ ]+xlat(b|[ ]+(BYTE PTR )?(ds:)?\[ebx\])
|
||||||
[ ]*[0-9a-f]+: d7[ ]+xlat(b|[ ]+(BYTE PTR )?(ds:)?\[ebx\])
|
[ ]*[0-9a-f]+: d7[ ]+xlat(b|[ ]+(BYTE PTR )?(ds:)?\[ebx\])
|
||||||
[ ]*[0-9a-f]+: d7[ ]+xlat(b|[ ]+(BYTE PTR )?(ds:)?\[ebx\])
|
[ ]*[0-9a-f]+: d7[ ]+xlat(b|[ ]+(BYTE PTR )?(ds:)?\[ebx\])
|
||||||
[ ]*[0-9a-f]+: 8b 80 00 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\][ ]+[0-9a-f]+:[ ]+(R_386_|dir)?32[ ]+byte
|
[ ]*[0-9a-f]+: 8b 40 01[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+1\]
|
||||||
[ ]*[0-9a-f]+: 8b 80 00 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\][ ]+[0-9a-f]+:[ ]+(R_386_|dir)?32[ ]+byte
|
[ ]*[0-9a-f]+: 8b 40 01[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+1\]
|
||||||
[ ]*[0-9a-f]+: 8b 40 04[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+4\]
|
[ ]*[0-9a-f]+: 8b 40 04[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+4\]
|
||||||
[ ]*[0-9a-f]+: 8b 40 04[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+4\]
|
[ ]*[0-9a-f]+: 8b 40 04[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+4\]
|
||||||
[ ]*[0-9a-f]+: 8b 80 00 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\][ ]+[0-9a-f]+:[ ]+(R_386_|dir)?32[ ]+fword
|
[ ]*[0-9a-f]+: 8b 40 06[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+6\]
|
||||||
[ ]*[0-9a-f]+: 8b 80 00 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\][ ]+[0-9a-f]+:[ ]+(R_386_|dir)?32[ ]+fword
|
[ ]*[0-9a-f]+: 8b 40 06[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+6\]
|
||||||
[ ]*[0-9a-f]+: 8b 80 04 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+4\][ ]+[0-9a-f]+:[ ]+(R_386_|dir)?32[ ]+qword
|
[ ]*[0-9a-f]+: 8b 40 0c[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+12\]
|
||||||
[ ]*[0-9a-f]+: 8b 80 04 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+4\][ ]+[0-9a-f]+:[ ]+(R_386_|dir)?32[ ]+qword
|
[ ]*[0-9a-f]+: 8b 40 0c[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+12\]
|
||||||
[ ]*[0-9a-f]+: 8b 80 08 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+8\][ ]+[0-9a-f]+:[ ]+(R_386_|dir)?32[ ]+tbyte
|
[ ]*[0-9a-f]+: 8b 40 12[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+18\]
|
||||||
[ ]*[0-9a-f]+: 8b 80 08 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+8\][ ]+[0-9a-f]+:[ ]+(R_386_|dir)?32[ ]+tbyte
|
[ ]*[0-9a-f]+: 8b 40 12[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+18\]
|
||||||
#[ ]*[0-9a-f]+: 8b 04 85 00 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\*4\][ ]+[0-9a-f]+:[ ]+(R_386_|dir)?32[ ]+word
|
[ ]*[0-9a-f]+: 8b 04 85 02 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\*4\+2\]
|
||||||
#[ ]*[0-9a-f]+: 8b 04 85 00 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\*4\][ ]+[0-9a-f]+:[ ]+(R_386_|dir)?32[ ]+word
|
[ ]*[0-9a-f]+: 8b 04 85 02 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\*4\+2\]
|
||||||
#[ ]*[0-9a-f]+: 8b 04 85 04 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\*4\+4\][ ]+[0-9a-f]+:[ ]+(R_386_|dir)?32[ ]+xmmword
|
[ ]*[0-9a-f]+: 8b 04 45 00 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\*2\]
|
||||||
#[ ]*[0-9a-f]+: 8b 04 85 04 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\*4\+4\][ ]+[0-9a-f]+:[ ]+(R_386_|dir)?32[ ]+xmmword
|
[ ]*[0-9a-f]+: 8b 04 45 00 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\*2\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 04 8d 00 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[ecx\*4\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 04 8d 00 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[ecx\*4\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 40 01[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+1\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 40 01[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+1\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 44 08 fb[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+ecx\-5\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 44 08 01[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+ecx\+1\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 44 08 0f[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+ecx\+15\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 40 10[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+16\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 40 10[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+16\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 44 08 10[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+ecx\+16\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 44 08 01[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+ecx\+1\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 44 08 01[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+ecx\+1\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 44 08 01[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+ecx\+1\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 44 08 01[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+ecx\+1\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 44 08 01[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+ecx\+1\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 04 08[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+ecx\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 04 08[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+ecx\]
|
||||||
|
[ ]*[0-9a-f]+: 26 8b 00[ ]+mov[ ]+eax,es:(DWORD PTR )?\[eax\]
|
||||||
[ ]*[0-9a-f]+: 6a 01[ ]+push[ ]+0x1
|
[ ]*[0-9a-f]+: 6a 01[ ]+push[ ]+0x1
|
||||||
[ ]*[0-9a-f]+: 6a ff[ ]+push[ ]+0xffffffff
|
[ ]*[0-9a-f]+: 6a ff[ ]+push[ ]+0xffffffff
|
||||||
[ ]*[0-9a-f]+: 6a fe[ ]+push[ ]+0xfffffffe
|
[ ]*[0-9a-f]+: 6a fe[ ]+push[ ]+0xfffffffe
|
||||||
@ -120,4 +140,35 @@ Disassembly of section .text:
|
|||||||
[ ]*[0-9a-f]+: 6a 02[ ]+push[ ]+0x2
|
[ ]*[0-9a-f]+: 6a 02[ ]+push[ ]+0x2
|
||||||
[ ]*[0-9a-f]+: 6a 03[ ]+push[ ]+0x3
|
[ ]*[0-9a-f]+: 6a 03[ ]+push[ ]+0x3
|
||||||
[ ]*[0-9a-f]+: 6a 0d[ ]+push[ ]+0xd
|
[ ]*[0-9a-f]+: 6a 0d[ ]+push[ ]+0xd
|
||||||
|
[ ]*[0-9a-f]+: 6a 04[ ]+push[ ]+0x4
|
||||||
|
[ ]*[0-9a-f]+: 6a fc[ ]+push[ ]+0xfffffffc
|
||||||
|
[ ]*[0-9a-f]+: 6a fb[ ]+push[ ]+0xfffffffb
|
||||||
|
[ ]*[0-9a-f]+: 6a fb[ ]+push[ ]+0xfffffffb
|
||||||
|
[ ]*[0-9a-f]+: 6a 03[ ]+push[ ]+0x3
|
||||||
|
[ ]*[0-9a-f]+: 6a 04[ ]+push[ ]+0x4
|
||||||
|
[ ]*[0-9a-f]+: b8 00 00 00 00[ ]+mov[ ]+eax,0x0
|
||||||
|
[ ]*[0-9a-f]+: b8 00 00 00 00[ ]+mov[ ]+eax,0x0
|
||||||
|
[ ]*[0-9a-f]+: b8 00 00 00 00[ ]+mov[ ]+eax,0x0
|
||||||
|
[ ]*[0-9a-f]+: b8 00 00 00 00[ ]+mov[ ]+eax,0x0
|
||||||
|
[ ]*[0-9a-f]+: b8 00 00 00 00[ ]+mov[ ]+eax,0x0
|
||||||
|
[ ]*[0-9a-f]+: b8 00 00 00 00[ ]+mov[ ]+eax,0x0
|
||||||
|
[ ]*[0-9a-f]+: b8 00 00 00 00[ ]+mov[ ]+eax,0x0
|
||||||
|
[ ]*[0-9a-f]+: 8b 80 00 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 40 01[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+1]
|
||||||
|
[ ]*[0-9a-f]+: 8b 80 00 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 80 01 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+1\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 80 00 00 00 00[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\]
|
||||||
|
[ ]*[0-9a-f]+: 8b 40 01[ ]+mov[ ]+eax,(DWORD PTR )?\[eax\+1\]
|
||||||
|
[ ]*[0-9a-f]+: a1 01 00 00 00[ ]+mov[ ]+eax,ds:0x1
|
||||||
|
[ ]*[0-9a-f]+: a1 ff ff ff ff[ ]+mov[ ]+eax,ds:0xffffffff
|
||||||
|
[ ]*[0-9a-f]+: 26 a1 02 00 00 00[ ]+mov[ ]+eax,es:0x2
|
||||||
|
#...
|
||||||
|
[ ]*[0-9a-f]+: b8 03 00 00 00[ ]+mov[ ]+eax,0x3
|
||||||
|
[ ]*[0-9a-f]+: a1 04 00 00 00[ ]+mov[ ]+eax,ds:0x4
|
||||||
|
[ ]*[0-9a-f]+: a1 05 00 00 00[ ]+mov[ ]+eax,ds:0x5
|
||||||
|
[ ]*[0-9a-f]+: 36 a1 06 00 00 00[ ]+mov[ ]+eax,ss:0x6
|
||||||
|
[ ]*[0-9a-f]+: 36 a1 07 00 00 00[ ]+mov[ ]+eax,ss:0x7
|
||||||
|
[ ]*[0-9a-f]+: a1 08 00 00 00[ ]+mov[ ]+eax,ds:0x8
|
||||||
|
[ ]*[0-9a-f]+: 9a 05 00 00 00 03 00[ ]+l?call[ ]+0x3[,:]0x5
|
||||||
|
[ ]*[0-9a-f]+: ea 03 00 00 00 05 00[ ]+l?jmp[ ]+0x5[,:]0x3
|
||||||
#pass
|
#pass
|
||||||
|
8
gas/testsuite/gas/i386/intelok.e
Normal file
8
gas/testsuite/gas/i386/intelok.e
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
.*: Assembler messages:
|
||||||
|
.*:170: Warning: .* taken to mean just .*
|
||||||
|
.*:177: Warning: Treating .* as memory reference
|
||||||
|
.*:178: Warning: .* taken to mean just .*
|
||||||
|
.*:178: Warning: Treating .* as memory reference
|
||||||
|
.*:181: Warning: Treating .* as memory reference
|
||||||
|
.*:182: Warning: Treating .* as memory reference
|
||||||
|
.*:185: Warning: Treating .* as memory reference
|
@ -1,5 +1,12 @@
|
|||||||
.intel_syntax noprefix
|
.intel_syntax noprefix
|
||||||
|
.equiv byte, 1
|
||||||
|
.equiv word, 2
|
||||||
.equiv dword, 4
|
.equiv dword, 4
|
||||||
|
.equiv fword, 6
|
||||||
|
.equiv qword, 8
|
||||||
|
.equiv tbyte, 10
|
||||||
|
.equiv oword, 16
|
||||||
|
.equiv xmmword, 16
|
||||||
.text
|
.text
|
||||||
start:
|
start:
|
||||||
|
|
||||||
@ -104,10 +111,30 @@ start:
|
|||||||
mov eax, qword[eax+dword]
|
mov eax, qword[eax+dword]
|
||||||
mov eax, [tbyte+eax+dword*2]
|
mov eax, [tbyte+eax+dword*2]
|
||||||
mov eax, tbyte[eax+dword*2]
|
mov eax, tbyte[eax+dword*2]
|
||||||
# mov eax, [word+eax*dword]
|
mov eax, [word+eax*dword]
|
||||||
# mov eax, word[eax*dword]
|
mov eax, word[eax*dword]
|
||||||
# mov eax, [xmmword+(eax+1)*dword]
|
|
||||||
# mov eax, xmmword[(eax+1)*dword]
|
mov eax, [eax*+2]
|
||||||
|
mov eax, [+2*eax]
|
||||||
|
mov eax, [ecx*dword]
|
||||||
|
mov eax, [dword*ecx]
|
||||||
|
mov eax, 1[eax]
|
||||||
|
mov eax, [eax]+1
|
||||||
|
mov eax, [eax - 5 + ecx]
|
||||||
|
mov eax, [eax + 5 and 3 + ecx]
|
||||||
|
mov eax, [eax + 5*3 + ecx]
|
||||||
|
mov eax, [oword][eax]
|
||||||
|
mov eax, [eax][oword]
|
||||||
|
mov eax, xmmword[eax][ecx]
|
||||||
|
mov eax, [eax]+1[ecx]
|
||||||
|
mov eax, [eax][ecx]+1
|
||||||
|
mov eax, [1][eax][ecx]
|
||||||
|
mov eax, [eax][1][ecx]
|
||||||
|
mov eax, [eax][ecx][1]
|
||||||
|
mov eax, [[eax]]
|
||||||
|
mov eax, [eax[ecx]]
|
||||||
|
mov eax, [[eax][ecx]]
|
||||||
|
mov eax, es:[eax]
|
||||||
|
|
||||||
# expressions
|
# expressions
|
||||||
|
|
||||||
@ -125,5 +152,41 @@ start:
|
|||||||
push 7 xor 4
|
push 7 xor 4
|
||||||
push 8 or 5
|
push 8 or 5
|
||||||
|
|
||||||
|
push +dword
|
||||||
|
push -dword
|
||||||
|
push not dword
|
||||||
|
push not +dword
|
||||||
|
push not -dword
|
||||||
|
push not not dword
|
||||||
|
|
||||||
|
# offset expressions
|
||||||
|
|
||||||
|
mov eax, offset x
|
||||||
|
mov eax, offset flat:x
|
||||||
|
mov eax, flat:x
|
||||||
|
mov eax, offset [x]
|
||||||
|
mov eax, offset flat:[x]
|
||||||
|
mov eax, flat:[x]
|
||||||
|
mov eax, [offset x]
|
||||||
|
mov eax, [eax + offset x]
|
||||||
|
mov eax, [eax + offset 1]
|
||||||
|
mov eax, [offset x + eax]
|
||||||
|
mov eax, offset x+1[eax]
|
||||||
|
mov eax, [eax] + offset x
|
||||||
|
mov eax, [eax] + offset 1
|
||||||
|
mov eax, offset x + [1]
|
||||||
|
mov eax, [offset x] - [1]
|
||||||
|
mov eax, offset x + es:[2]
|
||||||
|
mov eax, offset x + offset es:[3]
|
||||||
|
mov eax, [4] + offset x
|
||||||
|
mov eax, [5] + [offset x]
|
||||||
|
mov eax, ss:[6] + offset x
|
||||||
|
mov eax, ss:[7] + [offset x]
|
||||||
|
mov eax, dword ptr [8]
|
||||||
|
|
||||||
|
# other operands
|
||||||
|
call 3:5
|
||||||
|
jmp 5:3
|
||||||
|
|
||||||
# Force a good alignment.
|
# Force a good alignment.
|
||||||
.p2align 4,0
|
.p2align 4,0
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#as: -J
|
#as: -J
|
||||||
#objdump: -dw
|
#objdump: -dw
|
||||||
#name: i386 x86_64
|
#name: i386 x86_64
|
||||||
|
#stderr: x86_64.e
|
||||||
.*: +file format .*
|
.*: +file format .*
|
||||||
|
|
||||||
Disassembly of section .text:
|
Disassembly of section .text:
|
||||||
|
9
gas/testsuite/gas/i386/x86_64.e
Normal file
9
gas/testsuite/gas/i386/x86_64.e
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
.*.s: Assembler messages:
|
||||||
|
.*:51: Warning: Treating .\[0x22222222\]. as memory reference
|
||||||
|
.*:89: Warning: Treating .DWORD PTR \[0x22222222\]. as memory reference
|
||||||
|
.*:91: Warning: Treating .\[0x8877665544332211\]. as memory reference
|
||||||
|
.*:92: Warning: Treating .\[0x8877665544332211\]. as memory reference
|
||||||
|
.*:93: Warning: Treating .\[0x8877665544332211\]. as memory reference
|
||||||
|
.*:94: Warning: Treating .\[0x8877665544332211\]. as memory reference
|
||||||
|
.*:95: Warning: Treating .\[0x8877665544332211\]. as memory reference
|
||||||
|
.*:96: Warning: Treating .\[0x8877665544332211\]. as memory reference
|
@ -127,12 +127,12 @@ mov symbol(%rip), %eax
|
|||||||
.intel_syntax noprefix
|
.intel_syntax noprefix
|
||||||
|
|
||||||
#immediates - various sizes:
|
#immediates - various sizes:
|
||||||
mov al, flat symbol
|
mov al, flat:symbol
|
||||||
mov ax, flat symbol
|
mov ax, flat:symbol
|
||||||
mov eax, flat symbol
|
mov eax, flat:symbol
|
||||||
mov rax, flat symbol
|
mov rax, flat:symbol
|
||||||
|
|
||||||
#parts aren't supported by the parser
|
#parts aren't supported by the parser, yet (and not at all for symbol refs)
|
||||||
#mov eax, high part symbol
|
#mov eax, high part symbol
|
||||||
#mov eax, low part symbol
|
#mov eax, low part symbol
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user