aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2008-03-01 23:30:51 +0000
committerH.J. Lu <hjl.tools@gmail.com>2008-03-01 23:30:51 +0000
commit28dbc07952a8be034939137ab63f351e508210a3 (patch)
tree83607a2e820751a343f8e5bedc066596aeffc4a5
parentf22390e572d1ada52b6f2c6f8d853affe0133d5f (diff)
downloadgdb-28dbc07952a8be034939137ab63f351e508210a3.zip
gdb-28dbc07952a8be034939137ab63f351e508210a3.tar.gz
gdb-28dbc07952a8be034939137ab63f351e508210a3.tar.bz2
gas/testsuite/
2008-03-01 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/x86-64-branch.s: Add tests for 16-bit near indirect branches. * gas/i386/x86-64-inval.s: Remove tests for 16-bit near indirect branches. * gas/i386/x86-64-branch.d: Updated. * gas/i386/x86-64-inval.l: Likewise. opcodes/ 2008-03-01 H.J. Lu <hongjiu.lu@intel.com> * i386-opc.tbl: Allow 16-bit near indirect branches for x86-64. * i386-tbl.h: Regenerated.
-rw-r--r--gas/testsuite/ChangeLog12
-rw-r--r--gas/testsuite/gas/i386/x86-64-branch.d26
-rw-r--r--gas/testsuite/gas/i386/x86-64-branch.s18
-rw-r--r--gas/testsuite/gas/i386/x86-64-inval.l221
-rw-r--r--gas/testsuite/gas/i386/x86-64-inval.s20
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/i386-opc.tbl4
-rw-r--r--opcodes/i386-tbl.h12
8 files changed, 153 insertions, 165 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 233414c..df138a3 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,15 @@
+
+2008-03-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gas/i386/x86-64-branch.s: Add tests for 16-bit near indirect
+ branches.
+
+ * gas/i386/x86-64-inval.s: Remove tests for 16-bit near indirect
+ branches.
+
+ * gas/i386/x86-64-branch.d: Updated.
+ * gas/i386/x86-64-inval.l: Likewise.
+
2008-02-27 Nick Clifton <nickc@redhat.com>
PR 3134
diff --git a/gas/testsuite/gas/i386/x86-64-branch.d b/gas/testsuite/gas/i386/x86-64-branch.d
index 17c46a7..cc3d3a9 100644
--- a/gas/testsuite/gas/i386/x86-64-branch.d
+++ b/gas/testsuite/gas/i386/x86-64-branch.d
@@ -6,9 +6,25 @@
Disassembly of section .text:
-0+000 <.text>:
-[ ]*0:[ ]+ff d0[ ]+callq[ ]+\*%rax
-[ ]*2:[ ]+ff d0[ ]+callq[ ]+\*%rax
-[ ]*4:[ ]+ff e0[ ]+jmpq[ ]+\*%rax
-[ ]*6:[ ]+ff e0[ ]+jmpq[ ]+\*%rax
+0+ <.text>:
+[ ]*[a-f0-9]+: ff d0 callq \*%rax
+[ ]*[a-f0-9]+: ff d0 callq \*%rax
+[ ]*[a-f0-9]+: 66 ff d0 callw \*%ax
+[ ]*[a-f0-9]+: 66 ff d0 callw \*%ax
+[ ]*[a-f0-9]+: 66 ff 10 callw \*\(%rax\)
+[ ]*[a-f0-9]+: ff e0 jmpq \*%rax
+[ ]*[a-f0-9]+: ff e0 jmpq \*%rax
+[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
+[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
+[ ]*[a-f0-9]+: 66 ff 20 jmpw \*\(%rax\)
+[ ]*[a-f0-9]+: ff d0 callq \*%rax
+[ ]*[a-f0-9]+: ff d0 callq \*%rax
+[ ]*[a-f0-9]+: 66 ff d0 callw \*%ax
+[ ]*[a-f0-9]+: 66 ff d0 callw \*%ax
+[ ]*[a-f0-9]+: 66 ff 10 callw \*\(%rax\)
+[ ]*[a-f0-9]+: ff e0 jmpq \*%rax
+[ ]*[a-f0-9]+: ff e0 jmpq \*%rax
+[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
+[ ]*[a-f0-9]+: 66 ff e0 jmpw \*%ax
+[ ]*[a-f0-9]+: 66 ff 20 jmpw \*\(%rax\)
#pass
diff --git a/gas/testsuite/gas/i386/x86-64-branch.s b/gas/testsuite/gas/i386/x86-64-branch.s
index 865c475..10fdd81 100644
--- a/gas/testsuite/gas/i386/x86-64-branch.s
+++ b/gas/testsuite/gas/i386/x86-64-branch.s
@@ -1,5 +1,23 @@
.text
callq *%rax
call *%rax
+ call *%ax
+ callw *%ax
+ callw *(%rax)
jmpq *%rax
jmp *%rax
+ jmp *%ax
+ jmpw *%ax
+ jmpw *(%rax)
+
+ .intel_syntax noprefix
+ call rax
+ callq rax
+ call ax
+ callw ax
+ callw [rax]
+ jmp rax
+ jmpq rax
+ jmp ax
+ jmpw ax
+ jmpw [rax]
diff --git a/gas/testsuite/gas/i386/x86-64-inval.l b/gas/testsuite/gas/i386/x86-64-inval.l
index c663a12..b771b95 100644
--- a/gas/testsuite/gas/i386/x86-64-inval.l
+++ b/gas/testsuite/gas/i386/x86-64-inval.l
@@ -61,8 +61,6 @@
.*:62: Error: .*
.*:63: Error: .*
.*:64: Error: .*
-.*:65: Error: .*
-.*:66: Error: .*
.*:67: Error: .*
.*:68: Error: .*
.*:69: Error: .*
@@ -71,6 +69,8 @@
.*:72: Error: .*
.*:73: Error: .*
.*:74: Error: .*
+.*:75: Error: .*
+.*:76: Error: .*
.*:77: Error: .*
.*:78: Error: .*
.*:79: Error: .*
@@ -95,26 +95,6 @@
.*: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: .*
GAS LISTING .*
@@ -131,116 +111,93 @@ GAS LISTING .*
[ ]*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
+[ ]*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
GAS 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
- GAS 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
+[ ]*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[ ]+\.intel_syntax noprefix
+[ ]*67[ ]+cmpxchg16b dword ptr \[rax\] \# Must be oword
+[ ]*68[ ]+movq xmm1, XMMWORD PTR \[rsp\]
+[ ]*69[ ]+movq xmm1, DWORD PTR \[rsp\]
+[ ]*70[ ]+movq xmm1, WORD PTR \[rsp\]
+[ ]*71[ ]+movq xmm1, BYTE PTR \[rsp\]
+[ ]*72[ ]+movq XMMWORD PTR \[rsp\],xmm1
+[ ]*73[ ]+movq DWORD PTR \[rsp\],xmm1
+[ ]*74[ ]+movq WORD PTR \[rsp\],xmm1
+[ ]*75[ ]+movq BYTE PTR \[rsp\],xmm1
+[ ]*76[ ]+fnstsw eax
+[ ]*77[ ]+fnstsw al
+[ ]*78[ ]+fstsw eax
+[ ]*79[ ]+fstsw al
+[ ]*80[ ]+in rax,8
+[ ]*81[ ]+out 8,rax
+[ ]*82[ ]+movsx ax, \[rax\]
+[ ]*83[ ]+movsx eax, \[rax\]
+[ ]*84[ ]+movsx rax, \[rax\]
+[ ]*85[ ]+movzx ax, \[rax\]
+[ ]*86[ ]+movzx eax, \[rax\]
+[ ]*87[ ]+movzx rax, \[rax\]
+[ ]*88[ ]+movnti word ptr \[rax\], ax
+[ ]*89[ ]+calld eax \# 32-bit data size not allowed
+[ ]*90[ ]+calld \[ax\] \# 32-bit data size not allowed
+[ ]*91[ ]+calld \[eax\] \# 32-bit data size not allowed
+[ ]*92[ ]+calld \[r8\] \# 32-bit data size not allowed
+[ ]*93[ ]+calld \[rax\] \# 32-bit data size not allowed
+[ ]*94[ ]+callq \[ax\] \# no 16-bit addressing
+[ ]*95[ ]+jmpd eax \# 32-bit data size not allowed
+[ ]*96[ ]+jmpd \[ax\] \# 32-bit data size not allowed
+[ ]*97[ ]+jmpd \[eax\] \# 32-bit data size not allowed
+[ ]*98[ ]+jmpd \[r8\] \# 32-bit data size not allowed
+[ ]*99[ ]+jmpd \[rax\] \# 32-bit data size not allowed
+[ ]*100[ ]+jmpq \[ax\] \# no 16-bit addressing
diff --git a/gas/testsuite/gas/i386/x86-64-inval.s b/gas/testsuite/gas/i386/x86-64-inval.s
index 2688ace..180db8e 100644
--- a/gas/testsuite/gas/i386/x86-64-inval.s
+++ b/gas/testsuite/gas/i386/x86-64-inval.s
@@ -11,11 +11,6 @@
calll *(%eax) # 32-bit data size not allowed
calll *(%r8) # 32-bit data size not allowed
calll *(%rax) # 32-bit data size not allowed
- callw *%ax # 16-bit data size not allowed
- callw *(%ax) # 16-bit data size not allowed
- callw *(%eax) # 16-bit data size not allowed
- callw *(%r8) # 16-bit data size not allowed
- callw *(%rax) # 16-bit data size not allowed
callq *(%ax) # no 16-bit addressing
daa # illegal
das # illegal
@@ -27,11 +22,6 @@ foo: jcxz foo # No prefix exists to select CX as a counter
jmpl *(%eax) # 32-bit data size not allowed
jmpl *(%r8) # 32-bit data size not allowed
jmpl *(%rax) # 32-bit data size not allowed
- jmpw *%ax # 16-bit data size not allowed
- jmpw *(%ax) # 16-bit data size not allowed
- jmpw *(%eax) # 16-bit data size not allowed
- jmpw *(%r8) # 16-bit data size not allowed
- jmpw *(%rax) # 16-bit data size not allowed
jmpq *(%ax) # no 16-bit addressing
lcalll $0,$0 # illegal
lcallq $0,$0 # illegal
@@ -101,20 +91,10 @@ movnti word ptr [rax], ax
calld [eax] # 32-bit data size not allowed
calld [r8] # 32-bit data size not allowed
calld [rax] # 32-bit data size not allowed
- callw ax # 16-bit data size not allowed
- callw [ax] # 16-bit data size not allowed
- callw [eax] # 16-bit data size not allowed
- callw [r8] # 16-bit data size not allowed
- callw [rax] # 16-bit data size not allowed
callq [ax] # no 16-bit addressing
jmpd eax # 32-bit data size not allowed
jmpd [ax] # 32-bit data size not allowed
jmpd [eax] # 32-bit data size not allowed
jmpd [r8] # 32-bit data size not allowed
jmpd [rax] # 32-bit data size not allowed
- jmpw ax # 16-bit data size not allowed
- jmpw [ax] # 16-bit data size not allowed
- jmpw [eax] # 16-bit data size not allowed
- jmpw [r8] # 16-bit data size not allowed
- jmpw [rax] # 16-bit data size not allowed
jmpq [ax] # no 16-bit addressing
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index c0a83c4..1e61fd4 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-opc.tbl: Allow 16-bit near indirect branches for x86-64.
+ * i386-tbl.h: Regenerated.
+
2008-02-23 H.J. Lu <hongjiu.lu@intel.com>
* i386-opc.tbl: Disallow 16-bit near indirect branches for
diff --git a/opcodes/i386-opc.tbl b/opcodes/i386-opc.tbl
index 2fec30a..cfb31f1 100644
--- a/opcodes/i386-opc.tbl
+++ b/opcodes/i386-opc.tbl
@@ -318,7 +318,7 @@ shrd, 2, 0xfad, None, 2, Cpu386, Modrm|No_bSuf|No_sSuf|No_ldSuf, { Reg16|Reg32|R
call, 1, 0xe8, None, 1, CpuNo64, JumpDword|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_ldSuf, { Disp16|Disp32 }
call, 1, 0xe8, None, 1, Cpu64, JumpDword|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_ldSuf|NoRex64, { Disp16|Disp32 }
call, 1, 0xff, 0x2, 1, CpuNo64, Modrm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_ldSuf, { Reg16|Reg32|Word|Dword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|JumpAbsolute }
-call, 1, 0xff, 0x2, 1, Cpu64, Modrm|DefaultSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_ldSuf|NoRex64, { Reg64|Qword|Unspecified|BaseIndex|Disp8|Disp32|Disp32S|JumpAbsolute }
+call, 1, 0xff, 0x2, 1, Cpu64, Modrm|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_ldSuf|NoRex64, { Reg16|Reg64|Word|Qword|Unspecified|BaseIndex|Disp8|Disp32|Disp32S|JumpAbsolute }
// Intel Syntax
call, 2, 0x9a, None, 1, CpuNo64, JumpInterSegment|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_ldSuf, { Imm16, Imm16|Imm32 }
// Intel Syntax
@@ -328,7 +328,7 @@ lcall, 1, 0xff, 0x3, 1, 0, Modrm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_ldSuf, {
jmp, 1, 0xeb, None, 1, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
jmp, 1, 0xff, 0x4, 1, CpuNo64, Modrm|No_bSuf|No_sSuf|No_qSuf|No_ldSuf, { Reg16|Reg32|Word|Dword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|JumpAbsolute }
-jmp, 1, 0xff, 0x4, 1, Cpu64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_ldSuf|NoRex64, { Reg64|Qword|Unspecified|BaseIndex|Disp8|Disp32|Disp32S|JumpAbsolute }
+jmp, 1, 0xff, 0x4, 1, Cpu64, Modrm|No_bSuf|No_lSuf|No_sSuf|No_ldSuf|NoRex64, { Reg16|Reg64|Word|Qword|Unspecified|BaseIndex|Disp8|Disp32|Disp32S|JumpAbsolute }
// Intel Syntax.
jmp, 2, 0xea, None, 1, CpuNo64, JumpInterSegment|No_bSuf|No_sSuf|No_qSuf|No_ldSuf, { Imm16, Imm16|Imm32 }
// Intel Syntax.
diff --git a/opcodes/i386-tbl.h b/opcodes/i386-tbl.h
index 5588ab2..3ca4bed 100644
--- a/opcodes/i386-tbl.h
+++ b/opcodes/i386-tbl.h
@@ -2335,11 +2335,11 @@ const template i386_optab[] =
{ "call", 1, 0xff, 0x2, 1,
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0 } },
- { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
+ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0 },
- { { { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
- 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
+ { { { 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
+ 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0,
1, 0, 0 } } } },
{ "call", 2, 0x9a, None, 1,
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -2404,11 +2404,11 @@ const template i386_optab[] =
{ "jmp", 1, 0xff, 0x4, 1,
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0 } },
- { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
+ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0 },
- { { { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
- 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
+ { { { 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
+ 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0,
1, 0, 0 } } } },
{ "jmp", 2, 0xea, None, 1,
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,