aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2004-11-25 08:42:54 +0000
committerJan Beulich <jbeulich@novell.com>2004-11-25 08:42:54 +0000
commit37edbb65ad7d81f172315eadf4f66783d78c36a5 (patch)
tree9113686b18a9275f5a46f1c0ecd9d38d2b7dcb64 /gas
parentebd98106b23a4d1d64a492cf26977e66c32393ac (diff)
downloadgdb-37edbb65ad7d81f172315eadf4f66783d78c36a5.zip
gdb-37edbb65ad7d81f172315eadf4f66783d78c36a5.tar.gz
gdb-37edbb65ad7d81f172315eadf4f66783d78c36a5.tar.bz2
gas/
2004-11-25 Jan Beulich <jbeulich@novell.com> * config/tc-i386.c (optimize_imm): Adjust immediates to only those permissible for the selected instruction suffix. (process_suffix): For DefaultSize instructions, suppressing the guessing of a 'q' suffix if the instruction doesn't support it is pointless, because only an 'l' suffix can be guessed in this place. gas/testsuite/ 2004-11-25 Jan Beulich <jbeulich@novell.com> * gas/i386/x86-64-inval.[sl]: Remove sahf/lahf. include/opcode/ 2004-11-25 Jan Beulich <jbeulich@novell.com> * i386.h: CpuNo64 mov can't reasonably have a 'q' suffix. Moves to/from test registers are illegal in 64-bit mode. Add missing NoRex64 to sidt. fxsave/fxrstor now allow for a 'q' suffix (previously one had to explicitly encode a rex64 prefix). Re-enable lahf/sahf in 64-bit mode as at least some Athlon64/Opteron steppings support it there. Add cmpxchg16b as per Intel's 64-bit documentation.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/config/tc-i386.c5
-rw-r--r--gas/testsuite/ChangeLog3
-rw-r--r--gas/testsuite/gas/i386/x86-64-inval.l62
-rw-r--r--gas/testsuite/gas/i386/x86-64-inval.s2
5 files changed, 41 insertions, 39 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 6f3b2c9..87101eb 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,11 @@
+2004-11-25 Jan Beulich <jbeulich@novell.com>
+
+ * config/tc-i386.c (optimize_imm): Adjust immediates to only those
+ permissible for the selected instruction suffix.
+ (process_suffix): For DefaultSize instructions, suppressing the
+ guessing of a 'q' suffix if the instruction doesn't support it is
+ pointless, because only an 'l' suffix can be guessed in this place.
+
2004-11-24 Nick Clifton <nickc@redhat.com>
* config/tc-iq2000.c: Remove support for IQ10 processor.
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 430a338..ebe9523 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -2362,9 +2362,6 @@ process_suffix (void)
&& (i.tm.opcode_modifier & No_sSuf))
{
i.suffix = stackop_size;
- if (i.suffix == QWORD_MNEM_SUFFIX
- && (i.tm.opcode_modifier & No_qSuf))
- i.suffix = LONG_MNEM_SUFFIX;
}
else if (intel_syntax
&& !i.suffix
@@ -2702,7 +2699,7 @@ finalize_imm ()
i.types[0] = overlap0;
overlap1 = i.types[1] & i.tm.operand_types[1];
- if ((overlap1 & (Imm8 | Imm8S | Imm16 | Imm32S | Imm32))
+ if ((overlap1 & (Imm8 | Imm8S | Imm16 | Imm32S | Imm32 | Imm64))
&& overlap1 != Imm8 && overlap1 != Imm8S
&& overlap1 != Imm16 && overlap1 != Imm32S
&& overlap1 != Imm32 && overlap1 != Imm64)
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index a8514c0..e3c5f99 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,6 @@
+2004-11-25 Jan Beulich <jbeulich@novell.com>
+ * gas/i386/x86-64-inval.[sl]: Remove sahf/lahf.
+
2004-11-24 Paul Brook <paul@codesourcery.com>
* gas/elf/group0a.d: Adjust expected secion ordering.
diff --git a/gas/testsuite/gas/i386/x86-64-inval.l b/gas/testsuite/gas/i386/x86-64-inval.l
index 8f06f7f..aa080cb 100644
--- a/gas/testsuite/gas/i386/x86-64-inval.l
+++ b/gas/testsuite/gas/i386/x86-64-inval.l
@@ -48,8 +48,6 @@
.*:49: Error: .*
.*:50: Error: .*
.*:51: Error: .*
-.*:52: Error: .*
-.*:53: Error: .*
GAS LISTING .*
@@ -75,34 +73,32 @@ GAS LISTING .*
20 [ ]*foo:[ ]*jcxz foo # No prefix exists to select CX as a counter
21 [ ]*jmpl \*%eax # 32-bit data size not allowed
22 [ ]*jmpl \*\(%rax\) # 32-bit data size not allowed
- 23 [ ]*lahf # illegal
- 24 [ ]*lcalll \$0,\$0 # illegal
- 25 [ ]*lcallq \$0,\$0 # illegal
- 26 [ ]*ldsl %eax,\(%rax\) # illegal
- 27 [ ]*ldsq %rax,\(%rax\) # illegal
- 28 [ ]*lesl %eax,\(%rax\) # illegal
- 29 [ ]*lesq %rax,\(%rax\) # illegal
- 30 [ ]*ljmpl \$0,\$0 # illegal
- 31 [ ]*ljmpq \$0,\$0 # illegal
- 32 [ ]*ljmpq \*\(%rax\) # 64-bit data size not allowed
- 33 [ ]*loopw foo # No prefix exists to select CX as a counter
- 34 [ ]*loopew foo # No prefix exists to select CX as a counter
- 35 [ ]*loopnew foo # No prefix exists to select CX as a counter
- 36 [ ]*loopnzw foo # No prefix exists to select CX as a counter
- 37 [ ]*loopzw foo # No prefix exists to select CX as a counter
- 38 [ ]*leavel # can't have 32-bit stack operands
- 39 [ ]*pop %ds # illegal
- 40 [ ]*pop %es # illegal
- 41 [ ]*pop %ss # illegal
- 42 [ ]*popa # illegal
- 43 [ ]*popl %eax # can't have 32-bit stack operands
- 44 [ ]*push %cs # illegal
- 45 [ ]*push %ds # illegal
- 46 [ ]*push %es # illegal
- 47 [ ]*push %ss # illegal
- 48 [ ]*pusha # illegal
- 49 [ ]*pushl %eax # can't have 32-bit stack operands
- 50 [ ]*pushfl # can't have 32-bit stack operands
- 51 [ ]*popfl # can't have 32-bit stack operands
- 52 [ ]*retl # can't have 32-bit stack operands
- 53 [ ]*sahf # illegal
+ 23 [ ]*lcalll \$0,\$0 # illegal
+ 24 [ ]*lcallq \$0,\$0 # illegal
+ 25 [ ]*ldsl %eax,\(%rax\) # illegal
+ 26 [ ]*ldsq %rax,\(%rax\) # illegal
+ 27 [ ]*lesl %eax,\(%rax\) # illegal
+ 28 [ ]*lesq %rax,\(%rax\) # illegal
+ 29 [ ]*ljmpl \$0,\$0 # illegal
+ 30 [ ]*ljmpq \$0,\$0 # illegal
+ 31 [ ]*ljmpq \*\(%rax\) # 64-bit data size not allowed
+ 32 [ ]*loopw foo # No prefix exists to select CX as a counter
+ 33 [ ]*loopew foo # No prefix exists to select CX as a counter
+ 34 [ ]*loopnew foo # No prefix exists to select CX as a counter
+ 35 [ ]*loopnzw foo # No prefix exists to select CX as a counter
+ 36 [ ]*loopzw foo # No prefix exists to select CX as a counter
+ 37 [ ]*leavel # can't have 32-bit stack operands
+ 38 [ ]*pop %ds # illegal
+ 39 [ ]*pop %es # illegal
+ 40 [ ]*pop %ss # illegal
+ 41 [ ]*popa # illegal
+ 42 [ ]*popl %eax # can't have 32-bit stack operands
+ 43 [ ]*push %cs # illegal
+ 44 [ ]*push %ds # illegal
+ 45 [ ]*push %es # illegal
+ 46 [ ]*push %ss # illegal
+ 47 [ ]*pusha # illegal
+ 48 [ ]*pushl %eax # can't have 32-bit stack operands
+ 49 [ ]*pushfl # can't have 32-bit stack operands
+ 50 [ ]*popfl # can't have 32-bit stack operands
+ 51 [ ]*retl # can't have 32-bit stack operands
diff --git a/gas/testsuite/gas/i386/x86-64-inval.s b/gas/testsuite/gas/i386/x86-64-inval.s
index 7ceb9f1..b069a28 100644
--- a/gas/testsuite/gas/i386/x86-64-inval.s
+++ b/gas/testsuite/gas/i386/x86-64-inval.s
@@ -20,7 +20,6 @@
foo: jcxz foo # No prefix exists to select CX as a counter
jmpl *%eax # 32-bit data size not allowed
jmpl *(%rax) # 32-bit data size not allowed
- lahf # illegal
lcalll $0,$0 # illegal
lcallq $0,$0 # illegal
ldsl %eax,(%rax) # illegal
@@ -50,4 +49,3 @@ foo: jcxz foo # No prefix exists to select CX as a counter
pushfl # can't have 32-bit stack operands
popfl # can't have 32-bit stack operands
retl # can't have 32-bit stack operands
- sahf # illegal