x86-64/Intel: issue diagnostic for out of range displacement
[deliverable/binutils-gdb.git] / gas / testsuite / gas / i386 / x86-64-inval.l
index 11d518653ad2308b05444625c221ec67be6ef10d..099cc62e48d155d047ad3b3d10fc54b8ef0aea5c 100644 (file)
@@ -1,5 +1,4 @@
 .*: Assembler messages:
-.*:3: Error: .*
 .*:4: Error: .*
 .*:5: Error: .*
 .*:6: Error: .*
@@ -61,8 +60,9 @@
 .*:62: Error: .*
 .*:63: Error: .*
 .*:64: Error: .*
-.*:66: Error: .*
+.*:65: Error: .*
 .*:67: Error: .*
+.*:68: Error: .*
 .*:70: Error: .*
 .*:71: Error: .*
 .*:72: Error: .*
@@ -75,8 +75,6 @@
 .*:79: Error: .*
 .*:80: Error: .*
 .*:81: Error: .*
-.*:82: Error: .*
-.*:83: Error: .*
 .*:84: Error: .*
 .*:85: Error: .*
 .*:86: 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: .*
 GAS LISTING .*
 
 
 [      ]*1[    ]+\.text
-[      ]*2[    ]+\# All the following should be illegal for x86-64
-[      ]*3[    ]+aaa           \# illegal
-[      ]*4[    ]+aad           \# illegal
-[      ]*5[    ]+aam           \# illegal
-[      ]*6[    ]+aas           \# illegal
-[      ]*7[    ]+arpl %ax,%ax  \# illegal
-[      ]*8[    ]+bound %eax,\(%rax\) \# illegal
-[      ]*9[    ]+calll \*%eax  \# 32-bit data size not allowed
-[      ]*10[   ]+calll \*\(%ax\)       \# 32-bit data size not allowed
-[      ]*11[   ]+calll \*\(%eax\)      \# 32-bit data size not allowed
-[      ]*12[   ]+calll \*\(%r8\)       \# 32-bit data size not allowed
-[      ]*13[   ]+calll \*\(%rax\)      \# 32-bit data size not allowed
-[      ]*14[   ]+callq \*\(%ax\)       \# no 16-bit addressing
-[      ]*15[   ]+daa           \# illegal
-[      ]*16[   ]+das           \# illegal
-[      ]*17[   ]+enterl \$0,\$0        \# can't have 32-bit stack operands
-[      ]*18[   ]+into          \# illegal
-[      ]*19[   ]+foo:  jcxz foo        \# No prefix exists to select CX as a counter
-[      ]*20[   ]+jmpl \*%eax   \# 32-bit data size not allowed
-[      ]*21[   ]+jmpl \*\(%ax\)        \# 32-bit data size not allowed
-[      ]*22[   ]+jmpl \*\(%eax\)       \# 32-bit data size not allowed
-[      ]*23[   ]+jmpl \*\(%r8\)        \# 32-bit data size not allowed
-[      ]*24[   ]+jmpl \*\(%rax\)       \# 32-bit data size not allowed
-[      ]*25[   ]+jmpq \*\(%ax\)        \# no 16-bit addressing
-[      ]*26[   ]+lcalll \$0,\$0        \# illegal
-[      ]*27[   ]+lcallq \$0,\$0        \# illegal
-[      ]*28[   ]+ldsl %eax,\(%rax\) \# illegal
-[      ]*29[   ]+ldsq %rax,\(%rax\) \# illegal
-[      ]*30[   ]+lesl %eax,\(%rax\) \# illegal
-[      ]*31[   ]+lesq %rax,\(%rax\) \# illegal
-[      ]*32[   ]+ljmpl \$0,\$0 \# illegal
-[      ]*33[   ]+ljmpq \$0,\$0 \# illegal
-[      ]*34[   ]+ljmpq \*\(%rax\)      \# 64-bit data size not allowed
-[      ]*35[   ]+loopw foo     \# No prefix exists to select CX as a counter
-[      ]*36[   ]+loopew foo    \# No prefix exists to select CX as a counter
-[      ]*37[   ]+loopnew foo   \# No prefix exists to select CX as a counter
-[      ]*38[   ]+loopnzw foo   \# No prefix exists to select CX as a counter
-[      ]*39[   ]+loopzw foo    \# No prefix exists to select CX as a counter
-[      ]*40[   ]+leavel                \# can't have 32-bit stack operands
-[      ]*41[   ]+pop %ds               \# illegal
-[      ]*42[   ]+pop %es               \# illegal
-[      ]*43[   ]+pop %ss               \# illegal
-[      ]*44[   ]+popa          \# illegal
-[      ]*45[   ]+popl %eax     \# can't have 32-bit stack operands
-[      ]*46[   ]+push %cs      \# illegal
-[      ]*47[   ]+push %ds      \# illegal
-[      ]*48[   ]+push %es      \# illegal
-[      ]*49[   ]+push %ss      \# illegal
-[      ]*50[   ]+pusha         \# illegal
-[      ]*51[   ]+pushl %eax    \# can't have 32-bit stack operands
-[      ]*52[   ]+pushfl                \# can't have 32-bit stack operands
-[      ]*53[   ]+popfl         \# can't have 32-bit stack operands
-[      ]*54[   ]+retl          \# can't have 32-bit stack operands
-[      ]*55[   ]+insertq \$4,\$2,%xmm2,%ebx \# The last operand must be XMM register\.
-[      ]*56[   ]+fnstsw %eax
-[      ]*57[   ]+fnstsw %al
+[      ]*2[    ]+\.allow_index_reg
+[      ]*3[    ]+\# All the following should be illegal for x86-64
+[      ]*4[    ]+aaa           \# illegal
+[      ]*5[    ]+aad           \# illegal
+[      ]*6[    ]+aam           \# illegal
+[      ]*7[    ]+aas           \# illegal
+[      ]*8[    ]+arpl %ax,%ax  \# illegal
+[      ]*9[    ]+bound %eax,\(%rax\) \# illegal
+[      ]*10[   ]+calll \*%eax  \# 32-bit data size not allowed
+[      ]*11[   ]+calll \*\(%ax\)       \# 32-bit data size not allowed
+[      ]*12[   ]+calll \*\(%eax\)      \# 32-bit data size not allowed
+[      ]*13[   ]+calll \*\(%r8\)       \# 32-bit data size not allowed
+[      ]*14[   ]+calll \*\(%rax\)      \# 32-bit data size not allowed
+[      ]*15[   ]+callq \*\(%ax\)       \# no 16-bit addressing
+[      ]*16[   ]+daa           \# illegal
+[      ]*17[   ]+das           \# illegal
+[      ]*18[   ]+enterl \$0,\$0        \# can't have 32-bit stack operands
+[      ]*19[   ]+into          \# illegal
+[      ]*20[   ]+foo:  jcxz foo        \# No prefix exists to select CX as a counter
+[      ]*21[   ]+jmpl \*%eax   \# 32-bit data size not allowed
+[      ]*22[   ]+jmpl \*\(%ax\)        \# 32-bit data size not allowed
+[      ]*23[   ]+jmpl \*\(%eax\)       \# 32-bit data size not allowed
+[      ]*24[   ]+jmpl \*\(%r8\)        \# 32-bit data size not allowed
+[      ]*25[   ]+jmpl \*\(%rax\)       \# 32-bit data size not allowed
+[      ]*26[   ]+jmpq \*\(%ax\)        \# no 16-bit addressing
+[      ]*27[   ]+lcalll \$0,\$0        \# illegal
+[      ]*28[   ]+lcallq \$0,\$0        \# illegal
+[      ]*29[   ]+ldsl %eax,\(%rax\) \# illegal
+[      ]*30[   ]+ldsq %rax,\(%rax\) \# illegal
+[      ]*31[   ]+lesl %eax,\(%rax\) \# illegal
+[      ]*32[   ]+lesq %rax,\(%rax\) \# illegal
+[      ]*33[   ]+ljmpl \$0,\$0 \# illegal
+[      ]*34[   ]+ljmpq \$0,\$0 \# illegal
+[      ]*35[   ]+ljmpq \*\(%rax\)      \# 64-bit data size not allowed
+[      ]*36[   ]+loopw foo     \# No prefix exists to select CX as a counter
+[      ]*37[   ]+loopew foo    \# No prefix exists to select CX as a counter
+[      ]*38[   ]+loopnew foo   \# No prefix exists to select CX as a counter
+[      ]*39[   ]+loopnzw foo   \# No prefix exists to select CX as a counter
+[      ]*40[   ]+loopzw foo    \# No prefix exists to select CX as a counter
+[      ]*41[   ]+leavel                \# can't have 32-bit stack operands
+[      ]*42[   ]+pop %ds               \# illegal
+[      ]*43[   ]+pop %es               \# illegal
+[      ]*44[   ]+pop %ss               \# illegal
+[      ]*45[   ]+popa          \# illegal
+[      ]*46[   ]+popl %eax     \# can't have 32-bit stack operands
+[      ]*47[   ]+push %cs      \# illegal
+[      ]*48[   ]+push %ds      \# illegal
+[      ]*49[   ]+push %es      \# illegal
+[      ]*50[   ]+push %ss      \# illegal
+[      ]*51[   ]+pusha         \# illegal
+[      ]*52[   ]+pushl %eax    \# can't have 32-bit stack operands
+[      ]*53[   ]+pushfl                \# can't have 32-bit stack operands
+[      ]*54[   ]+popfl         \# can't have 32-bit stack operands
+[      ]*55[   ]+retl          \# can't have 32-bit stack operands
+[      ]*56[   ]+insertq \$4,\$2,%xmm2,%ebx \# The last operand must be XMM register\.
+[      ]*57[   ]+fnstsw %eax
 \fGAS LISTING .*
 
 
-[      ]*58[   ]+fstsw %eax
-[      ]*59[   ]+fstsw %al
-[      ]*60[   ]+in \$8,%rax
-[      ]*61[   ]+out %rax,\$8
-[      ]*62[   ]+movzxl \(%rax\),%rax
-[      ]*63[   ]+movnti %ax, \(%rax\)
-[      ]*64[   ]+movntiw %ax, \(%rax\)
-[      ]*65[   ]+
-[      ]*66[   ]+mov 0x80000000\(%rax\),%ebx
-[      ]*67[   ]+mov 0x80000000,%ebx
-[      ]*68[   ]+
-[      ]*69[   ]+\.intel_syntax noprefix
-[      ]*70[   ]+cmpxchg16b dword ptr \[rax\] \# Must be oword
-[      ]*71[   ]+movq xmm1, XMMWORD PTR \[rsp\]
-[      ]*72[   ]+movq xmm1, DWORD PTR \[rsp\]
-[      ]*73[   ]+movq xmm1, WORD PTR \[rsp\]
-[      ]*74[   ]+movq xmm1, BYTE PTR \[rsp\]
-[      ]*75[   ]+movq XMMWORD PTR \[rsp\],xmm1
-[      ]*76[   ]+movq DWORD PTR \[rsp\],xmm1
-[      ]*77[   ]+movq WORD PTR \[rsp\],xmm1
-[      ]*78[   ]+movq BYTE PTR \[rsp\],xmm1
-[      ]*79[   ]+fnstsw eax
-[      ]*80[   ]+fnstsw al
-[      ]*81[   ]+fstsw eax
-[      ]*82[   ]+fstsw al
-[      ]*83[   ]+in rax,8
-[      ]*84[   ]+out 8,rax
-[      ]*85[   ]+movsx ax, \[rax\]
-[      ]*86[   ]+movsx eax, \[rax\]
-[      ]*87[   ]+movsx rax, \[rax\]
-[      ]*88[   ]+movzx ax, \[rax\]
-[      ]*89[   ]+movzx eax, \[rax\]
-[      ]*90[   ]+movzx rax, \[rax\]
-[      ]*91[   ]+movnti word ptr \[rax\], ax
-[      ]*92[   ]+calld eax     \# 32-bit data size not allowed
-[      ]*93[   ]+calld \[ax\]  \# 32-bit data size not allowed
-[      ]*94[   ]+calld \[eax\] \# 32-bit data size not allowed
-[      ]*95[   ]+calld \[r8\]  \# 32-bit data size not allowed
-[      ]*96[   ]+calld \[rax\] \# 32-bit data size not allowed
-[      ]*97[   ]+callq \[ax\]  \# no 16-bit addressing
-[      ]*98[   ]+jmpd eax      \# 32-bit data size not allowed
-[      ]*99[   ]+jmpd \[ax\]   \# 32-bit data size not allowed
-[      ]*100[  ]+jmpd \[eax\]  \# 32-bit data size not allowed
-[      ]*101[  ]+jmpd \[r8\]   \# 32-bit data size not allowed
-[      ]*102[  ]+jmpd \[rax\]  \# 32-bit data size not allowed
-[      ]*103[  ]+jmpq \[ax\]   \# no 16-bit addressing
+[      ]*58[   ]+fnstsw %al
+[      ]*59[   ]+fstsw %eax
+[      ]*60[   ]+fstsw %al
+[      ]*61[   ]+in \$8,%rax
+[      ]*62[   ]+out %rax,\$8
+[      ]*63[   ]+movzxl \(%rax\),%rax
+[      ]*64[   ]+movnti %ax, \(%rax\)
+[      ]*65[   ]+movntiw %ax, \(%rax\)
+[      ]*66[   ]+
+[      ]*67[   ]+mov 0x80000000\(%rax\),%ebx
+[      ]*68[   ]+mov 0x80000000,%ebx
+[      ]*69[   ]+
+[      ]*70[   ]+add \(%rip,%rsi\), %eax
+[      ]*71[   ]+add \(%rsi,%rip\), %eax
+[      ]*72[   ]+add \(,%rip\), %eax
+[      ]*73[   ]+add \(%eip,%esi\), %eax
+[      ]*74[   ]+add \(%esi,%eip\), %eax
+[      ]*75[   ]+add \(,%eip\), %eax
+[      ]*76[   ]+add \(%rsi,%esi\), %eax
+[      ]*77[   ]+add \(%esi,%rsi\), %eax
+[      ]*78[   ]+add \(%eiz\), %eax
+[      ]*79[   ]+add \(%riz\), %eax
+[      ]*80[   ]+add \(%rax\), %riz
+[      ]*81[   ]+add \(%rax\), %eiz
+[      ]*82[   ]+
+[      ]*83[   ]+\.intel_syntax noprefix
+[      ]*84[   ]+cmpxchg16b dword ptr \[rax\] \# Must be oword
+[      ]*85[   ]+movq xmm1, XMMWORD PTR \[rsp\]
+[      ]*86[   ]+movq xmm1, DWORD PTR \[rsp\]
+[      ]*87[   ]+movq xmm1, WORD PTR \[rsp\]
+[      ]*88[   ]+movq xmm1, BYTE PTR \[rsp\]
+[      ]*89[   ]+movq XMMWORD PTR \[rsp\],xmm1
+[      ]*90[   ]+movq DWORD PTR \[rsp\],xmm1
+[      ]*91[   ]+movq WORD PTR \[rsp\],xmm1
+[      ]*92[   ]+movq BYTE PTR \[rsp\],xmm1
+[      ]*93[   ]+fnstsw eax
+[      ]*94[   ]+fnstsw al
+[      ]*95[   ]+fstsw eax
+[      ]*96[   ]+fstsw al
+[      ]*97[   ]+in rax,8
+[      ]*98[   ]+out 8,rax
+[      ]*99[   ]+movsx ax, \[rax\]
+[      ]*100[  ]+movsx eax, \[rax\]
+[      ]*101[  ]+movsx rax, \[rax\]
+[      ]*102[  ]+movzx ax, \[rax\]
+[      ]*103[  ]+movzx eax, \[rax\]
+[      ]*104[  ]+movzx rax, \[rax\]
+[      ]*105[  ]+movnti word ptr \[rax\], ax
+[      ]*106[  ]+calld eax     \# 32-bit data size not allowed
+[      ]*107[  ]+calld \[ax\]  \# 32-bit data size not allowed
+[      ]*108[  ]+calld \[eax\] \# 32-bit data size not allowed
+[      ]*109[  ]+calld \[r8\]  \# 32-bit data size not allowed
+[      ]*110[  ]+calld \[rax\] \# 32-bit data size not allowed
+[      ]*111[  ]+callq \[ax\]  \# no 16-bit addressing
+[      ]*112[  ]+jmpd eax      \# 32-bit data size not allowed
+[      ]*113[  ]+jmpd \[ax\]   \# 32-bit data size not allowed
+[      ]*114[  ]+jmpd \[eax\]  \# 32-bit data size not allowed
+\fGAS LISTING .*
+
+
+[      ]*115[  ]+jmpd \[r8\]   \# 32-bit data size not allowed
+[      ]*116[  ]+jmpd \[rax\]  \# 32-bit data size not allowed
+[      ]*117[  ]+jmpq \[ax\]   \# no 16-bit addressing
+[      ]*[1-9][0-9]*[  ]+mov eax,\[rax\+0x876543210\] \# out of range displacement
This page took 0.031715 seconds and 4 git commands to generate.