]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
This commit was manufactured by cvs2svn to create branch 'binutils-
authornobody <>
Thu, 14 Mar 2002 10:05:26 +0000 (10:05 +0000)
committernobody <>
Thu, 14 Mar 2002 10:05:26 +0000 (10:05 +0000)
2_12-branch'.

Cherrypick from master 2002-03-14 10:05:25 UTC Hans-Peter Nilsson <hp@axis.com> ' * gas/mmix/weak1.d, gas/mmix/weak1.d: New test.':
    gas/testsuite/gas/i386/x86-64-inval.l
    gas/testsuite/gas/i386/x86-64-inval.s
    gas/testsuite/gas/mmix/weak1.d
    gas/testsuite/gas/mmix/weak1.s

gas/testsuite/gas/i386/x86-64-inval.l [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-inval.s [new file with mode: 0644]
gas/testsuite/gas/mmix/weak1.d [new file with mode: 0644]
gas/testsuite/gas/mmix/weak1.s [new file with mode: 0644]

diff --git a/gas/testsuite/gas/i386/x86-64-inval.l b/gas/testsuite/gas/i386/x86-64-inval.l
new file mode 100644 (file)
index 0000000..05416d7
--- /dev/null
@@ -0,0 +1,30 @@
+.*: Assembler messages:
+.*:3: Error: .*
+.*:4: Error: .*
+.*:5: Error: .*
+.*:6: Error: .*
+.*:7: Error: .*
+.*:8: Error: .*
+.*:9: Error: .*
+.*:10: Error: .*
+.*:11: Error: .*
+.*:12: Error: .*
+.*:13: Error: .*
+.*:14: Error: .*
+GAS LISTING .*
+
+
+   1 [         ]*      .text
+   2 [         ]*# All the following should be illegal for x86-64
+   3 [         ]*calll \*%eax  # 32-bit data size not allowed
+   4 [         ]*calll \*\(%ax\)       # 32-bit data size not allowed
+   5 [         ]*calll \*\(%eax\)      # 32-bit data size not allowed
+   6 [         ]*calll \*\(%r8\)       # 32-bit data size not allowed
+   7 [         ]*calll \*\(%rax\)      # 32-bit data size not allowed
+   8 [         ]*callq \*\(%ax\)       # 32-bit data size not allowed
+   9 [         ]*callw \*\(%ax\)       # no 16-bit addressing
+  10 [         ]*foo:[         ]*jcxz foo      # No prefix exists to select CX as a counter
+  11 [         ]*popl %eax     # can\'t have 32-bit stack operands
+  12 [         ]*pushl %eax    # can\'t have 32-bit stack operands
+  13 [         ]*pushfl                # can\'t have 32-bit stack operands
+  14 [         ]*popfl         # 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
new file mode 100644 (file)
index 0000000..be532d5
--- /dev/null
@@ -0,0 +1,14 @@
+       .text
+# All the following should be illegal for x86-64
+       calll *%eax     # 32-bit data size not allowed
+        calll *(%ax)   # 32-bit data size not allowed
+        calll *(%eax)  # 32-bit data size not allowed
+        calll *(%r8)   # 32-bit data size not allowed
+        calll *(%rax)  # 32-bit data size not allowed
+        callq *(%ax)   # 32-bit data size not allowed
+        callw *(%ax)   # no 16-bit addressing
+foo:   jcxz foo        # No prefix exists to select CX as a counter
+        popl %eax      # can't have 32-bit stack operands
+        pushl %eax     # can't have 32-bit stack operands
+        pushfl         # can't have 32-bit stack operands
+       popfl           # can't have 32-bit stack operands
diff --git a/gas/testsuite/gas/mmix/weak1.d b/gas/testsuite/gas/mmix/weak1.d
new file mode 100644 (file)
index 0000000..d0696e0
--- /dev/null
@@ -0,0 +1,23 @@
+#as: -x
+#objdump: -str
+
+# Relaxation thought a weak symbol was within reach.
+
+.*:     file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l    d  \.text      0+ 
+0+ l    d  \.data      0+ 
+0+ l    d  \.bss       0+ 
+0+  w      \.text      0+ foo
+0+4 g       \.text     0+ main
+
+RELOCATION RECORDS FOR \[\.text\]:
+OFFSET           TYPE              VALUE 
+0+18 R_MMIX_64         foo
+0+4 R_MMIX_PUSHJ      foo
+
+Contents of section \.text:
+ 0000 f8010000 f20f0000 fd000000 fd000000  .*
+ 0010 fd000000 fd000000 00000000 00000000  .*
+Contents of section \.data:
diff --git a/gas/testsuite/gas/mmix/weak1.s b/gas/testsuite/gas/mmix/weak1.s
new file mode 100644 (file)
index 0000000..f5dbefb
--- /dev/null
@@ -0,0 +1,7 @@
+       .weak foo
+foo:
+       POP 1,0
+       .global main
+main:
+       PUSHJ $15,foo
+       .quad foo