]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gas/testsuite/gas/i386/x86-64-inval.l
x86: Check for more than 2 memory references
[thirdparty/binutils-gdb.git] / gas / testsuite / gas / i386 / x86-64-inval.l
index c663a12df4507dbba2b0a92a91da6895adcc6055..bbb8ba295cbdfc5fbc46337164493e6a3a0f5bb0 100644 (file)
@@ -1,5 +1,4 @@
 .*: Assembler messages:
-.*:3: Error: .*
 .*:4: Error: .*
 .*:5: Error: .*
 .*:6: Error: .*
 .*:63: Error: .*
 .*:64: Error: .*
 .*:65: Error: .*
-.*:66: Error: .*
 .*:67: Error: .*
 .*:68: Error: .*
-.*:69: Error: .*
 .*:70: Error: .*
 .*:71: Error: .*
 .*:72: Error: .*
 .*:73: Error: .*
 .*:74: Error: .*
+.*:75: Error: .*
+.*:76: Error: .*
 .*:77: Error: .*
 .*:78: Error: .*
 .*:79: Error: .*
 .*:80: Error: .*
 .*:81: Error: .*
-.*:82: Error: .*
-.*:83: Error: .*
 .*:84: Error: .*
 .*:85: Error: .*
 .*:86: Error: .*
 .*:116: Error: .*
 .*:117: Error: .*
 .*:118: Error: .*
-.*:119: Error: .*
-.*:120: Error: .*
+.*:121: 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[   ]+callw \*%ax   \# 16-bit data size not allowed
-[      ]*15[   ]+callw \*\(%ax\)       \# 16-bit data size not allowed
-[      ]*16[   ]+callw \*\(%eax\)      \# 16-bit data size not allowed
-[      ]*17[   ]+callw \*\(%r8\)       \# 16-bit data size not allowed
-[      ]*18[   ]+callw \*\(%rax\)      \# 16-bit data size not allowed
-[      ]*19[   ]+callq \*\(%ax\)       \# no 16-bit addressing
-[      ]*20[   ]+daa           \# illegal
-[      ]*21[   ]+das           \# illegal
-[      ]*22[   ]+enterl \$0,\$0        \# can't have 32-bit stack operands
-[      ]*23[   ]+into          \# illegal
-[      ]*24[   ]+foo:  jcxz foo        \# No prefix exists to select CX as a counter
-[      ]*25[   ]+jmpl \*%eax   \# 32-bit data size not allowed
-[      ]*26[   ]+jmpl \*\(%ax\)        \# 32-bit data size not allowed
-[      ]*27[   ]+jmpl \*\(%eax\)       \# 32-bit data size not allowed
-[      ]*28[   ]+jmpl \*\(%r8\)        \# 32-bit data size not allowed
-[      ]*29[   ]+jmpl \*\(%rax\)       \# 32-bit data size not allowed
-[      ]*30[   ]+jmpw \*%ax    \# 16-bit data size not allowed
-[      ]*31[   ]+jmpw \*\(%ax\)        \# 16-bit data size not allowed
-[      ]*32[   ]+jmpw \*\(%eax\)       \# 16-bit data size not allowed
-[      ]*33[   ]+jmpw \*\(%r8\)        \# 16-bit data size not allowed
-[      ]*34[   ]+jmpw \*\(%rax\)       \# 16-bit data size not allowed
-[      ]*35[   ]+jmpq \*\(%ax\)        \# no 16-bit addressing
-[      ]*36[   ]+lcalll \$0,\$0        \# illegal
-[      ]*37[   ]+lcallq \$0,\$0        \# illegal
-[      ]*38[   ]+ldsl %eax,\(%rax\) \# illegal
-[      ]*39[   ]+ldsq %rax,\(%rax\) \# illegal
-[      ]*40[   ]+lesl %eax,\(%rax\) \# illegal
-[      ]*41[   ]+lesq %rax,\(%rax\) \# illegal
-[      ]*42[   ]+ljmpl \$0,\$0 \# illegal
-[      ]*43[   ]+ljmpq \$0,\$0 \# illegal
-[      ]*44[   ]+ljmpq \*\(%rax\)      \# 64-bit data size not allowed
-[      ]*45[   ]+loopw foo     \# No prefix exists to select CX as a counter
-[      ]*46[   ]+loopew foo    \# No prefix exists to select CX as a counter
-[      ]*47[   ]+loopnew foo   \# No prefix exists to select CX as a counter
-[      ]*48[   ]+loopnzw foo   \# No prefix exists to select CX as a counter
-[      ]*49[   ]+loopzw foo    \# No prefix exists to select CX as a counter
-[      ]*50[   ]+leavel                \# can't have 32-bit stack operands
-[      ]*51[   ]+pop %ds               \# illegal
-[      ]*52[   ]+pop %es               \# illegal
-[      ]*53[   ]+pop %ss               \# illegal
-[      ]*54[   ]+popa          \# illegal
-[      ]*55[   ]+popl %eax     \# can't have 32-bit stack operands
-[      ]*56[   ]+push %cs      \# illegal
-[      ]*57[   ]+push %ds      \# illegal
+[      ]*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[   ]+push %es      \# illegal
-[      ]*59[   ]+push %ss      \# illegal
-[      ]*60[   ]+pusha         \# illegal
-[      ]*61[   ]+pushl %eax    \# can't have 32-bit stack operands
-[      ]*62[   ]+pushfl                \# can't have 32-bit stack operands
-[      ]*63[   ]+popfl         \# can't have 32-bit stack operands
-[      ]*64[   ]+retl          \# can't have 32-bit stack operands
-[      ]*65[   ]+insertq \$4,\$2,%xmm2,%ebx \# The last operand must be XMM register\.
-[      ]*66[   ]+fnstsw %eax
-[      ]*67[   ]+fnstsw %al
-[      ]*68[   ]+fstsw %eax
-[      ]*69[   ]+fstsw %al
-[      ]*70[   ]+in \$8,%rax
-[      ]*71[   ]+out %rax,\$8
-[      ]*72[   ]+movzxl \(%rax\),%rax
-[      ]*73[   ]+movnti %ax, \(%rax\)
-[      ]*74[   ]+movntiw %ax, \(%rax\)
-[      ]*75[   ]+
-[      ]*76[   ]+\.intel_syntax noprefix
-[      ]*77[   ]+cmpxchg16b dword ptr \[rax\] \# Must be oword
-[      ]*78[   ]+movq xmm1, XMMWORD PTR \[rsp\]
-[      ]*79[   ]+movq xmm1, DWORD PTR \[rsp\]
-[      ]*80[   ]+movq xmm1, WORD PTR \[rsp\]
-[      ]*81[   ]+movq xmm1, BYTE PTR \[rsp\]
-[      ]*82[   ]+movq XMMWORD PTR \[rsp\],xmm1
-[      ]*83[   ]+movq DWORD PTR \[rsp\],xmm1
-[      ]*84[   ]+movq WORD PTR \[rsp\],xmm1
-[      ]*85[   ]+movq BYTE PTR \[rsp\],xmm1
-[      ]*86[   ]+fnstsw eax
-[      ]*87[   ]+fnstsw al
-[      ]*88[   ]+fstsw eax
-[      ]*89[   ]+fstsw al
-[      ]*90[   ]+in rax,8
-[      ]*91[   ]+out 8,rax
-[      ]*92[   ]+movsx ax, \[rax\]
-[      ]*93[   ]+movsx eax, \[rax\]
-[      ]*94[   ]+movsx rax, \[rax\]
-[      ]*95[   ]+movzx ax, \[rax\]
-[      ]*96[   ]+movzx eax, \[rax\]
-[      ]*97[   ]+movzx rax, \[rax\]
-[      ]*98[   ]+movnti word ptr \[rax\], ax
-[      ]*99[   ]+calld eax     \# 32-bit data size not allowed
-[      ]*100[  ]+calld \[ax\]  \# 32-bit data size not allowed
-[      ]*101[  ]+calld \[eax\] \# 32-bit data size not allowed
-[      ]*102[  ]+calld \[r8\]  \# 32-bit data size not allowed
-[      ]*103[  ]+calld \[rax\] \# 32-bit data size not allowed
-[      ]*104[  ]+callw ax      \# 16-bit data size not allowed
-[      ]*105[  ]+callw \[ax\]  \# 16-bit data size not allowed
-[      ]*106[  ]+callw \[eax\] \# 16-bit data size not allowed
-[      ]*107[  ]+callw \[r8\]  \# 16-bit data size not allowed
-[      ]*108[  ]+callw \[rax\] \# 16-bit data size not allowed
-[      ]*109[  ]+callq \[ax\]  \# no 16-bit addressing
-[      ]*110[  ]+jmpd eax      \# 32-bit data size not allowed
-[      ]*111[  ]+jmpd \[ax\]   \# 32-bit data size not allowed
-[      ]*112[  ]+jmpd \[eax\]  \# 32-bit data size not allowed
-[      ]*113[  ]+jmpd \[r8\]   \# 32-bit data size not allowed
-[      ]*114[  ]+jmpd \[rax\]  \# 32-bit data size not allowed
+[      ]*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[  ]+jmpw ax               \# 16-bit data size not allowed
-[      ]*116[  ]+jmpw \[ax\]   \# 16-bit data size not allowed
-[      ]*117[  ]+jmpw \[eax\]  \# 16-bit data size not allowed
-[      ]*118[  ]+jmpw \[r8\]   \# 16-bit data size not allowed
-[      ]*119[  ]+jmpw \[rax\]  \# 16-bit data size not allowed
-[      ]*120[  ]+jmpq \[ax\]   \# no 16-bit addressing
+[      ]*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
+[      ]*[1-9][0-9]*[  ]+
+[      ]*[1-9][0-9]*[  ]+\.att_syntax prefix
+[      ]*[1-9][0-9]*[  ]+movsd \(%rsi\), %ss:\(%rdi\), %ss:\(%rax\)