* gas/mmix/basep-1b.d, gas/mmix/basep-2b.d, gas/mmix/basep-7.d,
authorHans-Peter Nilsson <hp@axis.com>
Fri, 1 Feb 2002 08:16:05 +0000 (08:16 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Fri, 1 Feb 2002 08:16:05 +0000 (08:16 +0000)
gas/mmix/err-bpo2.s, gas/mmix/basep-3b.d, gas/mmix/err-bpo3.s,
gas/mmix/basep-4.d, gas/mmix/err-bpo4.s, gas/mmix/err-bpo5.s,
gas/mmix/basep-5.d, gas/mmix/basep-6.d: New tests.

12 files changed:
gas/testsuite/ChangeLog
gas/testsuite/gas/mmix/basep-1b.d [new file with mode: 0644]
gas/testsuite/gas/mmix/basep-2b.d [new file with mode: 0644]
gas/testsuite/gas/mmix/basep-3b.d [new file with mode: 0644]
gas/testsuite/gas/mmix/basep-4.d [new file with mode: 0644]
gas/testsuite/gas/mmix/basep-5.d [new file with mode: 0644]
gas/testsuite/gas/mmix/basep-6.d [new file with mode: 0644]
gas/testsuite/gas/mmix/basep-7.d [new file with mode: 0644]
gas/testsuite/gas/mmix/err-bpo2.s [new file with mode: 0644]
gas/testsuite/gas/mmix/err-bpo3.s [new file with mode: 0644]
gas/testsuite/gas/mmix/err-bpo4.s [new file with mode: 0644]
gas/testsuite/gas/mmix/err-bpo5.s [new file with mode: 0644]

index 9cc49798fa0bf4a8de28fc9d0df94e39bd47b64c..daf87be2d2613a9cb377003fb133258e3bebe56c 100644 (file)
@@ -1,3 +1,10 @@
+2002-02-01  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       * gas/mmix/basep-1b.d, gas/mmix/basep-2b.d, gas/mmix/basep-7.d,
+       gas/mmix/err-bpo2.s, gas/mmix/basep-3b.d, gas/mmix/err-bpo3.s,
+       gas/mmix/basep-4.d, gas/mmix/err-bpo4.s, gas/mmix/err-bpo5.s,
+       gas/mmix/basep-5.d, gas/mmix/basep-6.d: New tests.
+
 2002-01-22  Alexandre Oliva  <aoliva@redhat.com>
 
        * gas/mn10300/basic.exp (run_list_test): New proc, from alpha.
diff --git a/gas/testsuite/gas/mmix/basep-1b.d b/gas/testsuite/gas/mmix/basep-1b.d
new file mode 100644 (file)
index 0000000..b787889
--- /dev/null
@@ -0,0 +1,14 @@
+#source: basep-1.s
+#as: -linker-allocated-gregs
+#objdump: -dr
+
+# Check that this test isn't mistreated with -linker-allocated-gregs.
+
+.*:     file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <a>:
+   0:  0000002a        trap 0,0,42
+   4:  8d2b0034        ldo \$43,\$0,52
+                       6: R_MMIX_REG   \.MMIX\.reg_contents
diff --git a/gas/testsuite/gas/mmix/basep-2b.d b/gas/testsuite/gas/mmix/basep-2b.d
new file mode 100644 (file)
index 0000000..4c3e7cc
--- /dev/null
@@ -0,0 +1,26 @@
+#source: basep-2.s
+#as: --no-predefined-syms -linker-allocated-gregs
+#objdump: -dr
+
+# Check that this test isn't mistreated with -linker-allocated-gregs.
+
+.*:     file format elf64-mmix
+
+Disassembly of section \.text:
+
+0000000000000000 <a>:
+   0:  0000002a        trap 0,0,42
+   4:  8d2b0034        ldo \$43,\$0,52
+                       6: R_MMIX_REG   \.MMIX\.reg_contents\+0x8
+       \.\.\.
+
+0000000000000108 <d>:
+ 108:  0000001c        trap 0,0,28
+ 10c:  8d8f000c        ldo \$143,\$0,12
+                       10e: R_MMIX_REG \.MMIX\.reg_contents
+ 110:  8df3000c        ldo \$243,\$0,12
+                       112: R_MMIX_REG \.MMIX\.reg_contents\+0x8
+ 114:  23670028        addu \$103,\$0,40
+                       116: R_MMIX_REG \.MMIX\.reg_contents
+ 118:  230d0018        addu \$13,\$0,24
+                       11a: R_MMIX_REG \.MMIX\.reg_contents\+0x8
diff --git a/gas/testsuite/gas/mmix/basep-3b.d b/gas/testsuite/gas/mmix/basep-3b.d
new file mode 100644 (file)
index 0000000..a36bb66
--- /dev/null
@@ -0,0 +1,17 @@
+#source: basep-3.s
+#as: -linker-allocated-gregs
+#objdump: -dr
+
+# Check that this test isn't mistreated with -linker-allocated-gregs.
+
+.*:     file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <Main>:
+   0:  bf2a0000        pushgo \$42,\$0,0
+                       2: R_MMIX_REG   \.MMIX\.reg_contents
+   4:  fd000000        swym 0,0,0
+
+0+8 <extfn>:
+   8:  f8000000        pop 0,0
diff --git a/gas/testsuite/gas/mmix/basep-4.d b/gas/testsuite/gas/mmix/basep-4.d
new file mode 100644 (file)
index 0000000..77dcdc6
--- /dev/null
@@ -0,0 +1,14 @@
+#source: err-bpo2.s
+#as: -linker-allocated-gregs
+#objdump: -dr
+
+# The -linker-allocated-gregs option validates omissions of GREG.
+
+.*:     file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <a>:
+   0:  0000002a        trap 0,0,42
+   4:  8d2b0000        ldo \$43,\$0,0
+                       6: R_MMIX_BASE_PLUS_OFFSET      \.text\+0x34
diff --git a/gas/testsuite/gas/mmix/basep-5.d b/gas/testsuite/gas/mmix/basep-5.d
new file mode 100644 (file)
index 0000000..2a30195
--- /dev/null
@@ -0,0 +1,26 @@
+#source: err-bpo3.s
+#as: -linker-allocated-gregs
+#objdump: -dr
+
+# The -linker-allocated-gregs option validates omissions of GREG.
+
+.*:     file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <a>:
+   0:  0000002a        trap 0,0,42
+   4:  8d2b0000        ldo \$43,\$0,0
+                       6: R_MMIX_BASE_PLUS_OFFSET      \.text\+0x34
+       \.\.\.
+
+0+108 <d>:
+ 108:  0000001c        trap 0,0,28
+ 10c:  8d8f0000        ldo \$143,\$0,0
+                       10e: R_MMIX_BASE_PLUS_OFFSET    \.text\+0x114
+ 110:  8df30000        ldo \$243,\$0,0
+                       112: R_MMIX_BASE_PLUS_OFFSET    \.text\+0xc
+ 114:  23670000        addu \$103,\$0,0
+                       116: R_MMIX_BASE_PLUS_OFFSET    \.text\+0x130
+ 118:  230d0000        addu \$13,\$0,0
+                       11a: R_MMIX_BASE_PLUS_OFFSET    \.text\+0x18
diff --git a/gas/testsuite/gas/mmix/basep-6.d b/gas/testsuite/gas/mmix/basep-6.d
new file mode 100644 (file)
index 0000000..527211e
--- /dev/null
@@ -0,0 +1,17 @@
+#source: err-bpo4.s
+#as: -linker-allocated-gregs
+#objdump: -dr
+
+# The -linker-allocated-gregs option validates omissions of GREG.
+
+.*:     file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <Main>:
+   0:  bf2a0000        pushgo \$42,\$0,0
+                       2: R_MMIX_BASE_PLUS_OFFSET      fn
+   4:  fd000000        swym 0,0,0
+
+0+8 <extfn>:
+   8:  f8000000        pop 0,0
diff --git a/gas/testsuite/gas/mmix/basep-7.d b/gas/testsuite/gas/mmix/basep-7.d
new file mode 100644 (file)
index 0000000..e00139f
--- /dev/null
@@ -0,0 +1,34 @@
+#source: err-bpo5.s
+#as: -linker-allocated-gregs
+#objdump: -drt
+
+# The -linker-allocated-gregs option validates omissions of GREG.
+# Note the inconsequence in relocs regarding forward and backward
+# references (not specific to this functionality); they may change.
+
+.*:     file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l    d  \.text      0+ 
+0+ l    d  \.data      0+ 
+0+ l    d  \.bss       0+ 
+0+2a l       \*ABS\*   0+ a
+0+70 l       \*ABS\*   0+ b
+0+48 l       \*ABS\*   0+ c
+0+3 l       \*ABS\*    0+ d
+
+Disassembly of section \.text:
+
+0+ <\.text>:
+   0:  8d2b0000        ldo \$43,\$0,0
+                       2: R_MMIX_BASE_PLUS_OFFSET      \*ABS\*\+0x5e
+   4:  232f0000        addu \$47,\$0,0
+                       6: R_MMIX_BASE_PLUS_OFFSET      \*ABS\*\+0x9a
+   8:  23300000        addu \$48,\$0,0
+                       a: R_MMIX_BASE_PLUS_OFFSET      \*ABS\*\+0x86
+   c:  8d2b0000        ldo \$43,\$0,0
+                       e: R_MMIX_BASE_PLUS_OFFSET      c\+0x2
+  10:  232f0000        addu \$47,\$0,0
+                       12: R_MMIX_BASE_PLUS_OFFSET     d\+0xd4
+  14:  23300000        addu \$48,\$0,0
+                       16: R_MMIX_BASE_PLUS_OFFSET     c\+0x15
diff --git a/gas/testsuite/gas/mmix/err-bpo2.s b/gas/testsuite/gas/mmix/err-bpo2.s
new file mode 100644 (file)
index 0000000..ae22c94
--- /dev/null
@@ -0,0 +1,6 @@
+% { dg-do assemble { target mmix-*-* } }
+
+# Check that base-plus-offset relocs without suitable GREGs are not passed
+# through (without -linker-allocated-gregs).
+a TETRA 42
+  LDO $43,a+52         % { dg-error "no suitable GREG definition" "" }
diff --git a/gas/testsuite/gas/mmix/err-bpo3.s b/gas/testsuite/gas/mmix/err-bpo3.s
new file mode 100644 (file)
index 0000000..286a0b7
--- /dev/null
@@ -0,0 +1,13 @@
+% { dg-do assemble { target mmix-*-* } }
+
+# Base-plus-offset without -linker-allocated-gregs.
+
+a TETRA 42
+  LDO $43,a+52         % { dg-error "no suitable GREG definition" "" }
+
+  LOC @+256
+d TETRA 28
+  LDO $143,d+12                % { dg-error "no suitable GREG definition" "" }
+  LDO $243,a+12                % { dg-error "no suitable GREG definition" "" }
+  LDA $103,d+40                % { dg-error "no suitable GREG definition" "" }
+  LDA $13,a+24         % { dg-error "no suitable GREG definition" "" }
diff --git a/gas/testsuite/gas/mmix/err-bpo4.s b/gas/testsuite/gas/mmix/err-bpo4.s
new file mode 100644 (file)
index 0000000..92bba12
--- /dev/null
@@ -0,0 +1,7 @@
+% { dg-do assemble { target mmix-*-* } }
+
+# Base-plus-offset without -linker-allocated-gregs.
+
+Main PUSHGO $42,fn             % { dg-error "no suitable GREG definition" "" }
+ SWYM 0
+extfn POP 0,0
diff --git a/gas/testsuite/gas/mmix/err-bpo5.s b/gas/testsuite/gas/mmix/err-bpo5.s
new file mode 100644 (file)
index 0000000..bf51710
--- /dev/null
@@ -0,0 +1,14 @@
+% { dg-do assemble { target mmix-*-* } }
+
+# Base-plus-offset without -linker-allocated-gregs.  Note the constant.
+
+a IS 42
+b IS 112
+  LDO $43,a+52         % { dg-error "no suitable GREG definition" "" }
+  LDA $47,a+112                % { dg-error "no suitable GREG definition" "" }
+  LDA $48,b+22         % { dg-error "no suitable GREG definition" "" }
+  LDO $43,c+2          % { dg-error "no suitable GREG definition" "" }
+  LDA $47,d+212                % { dg-error "no suitable GREG definition" "" }
+  LDA $48,c+21         % { dg-error "no suitable GREG definition" "" }
+c IS 72
+d IS 3