From 0395e33b7bf9183456d2ec838ba66701e4bd12ab Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Fri, 1 Feb 2002 08:16:05 +0000 Subject: [PATCH] * 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. --- gas/testsuite/ChangeLog | 7 +++++++ gas/testsuite/gas/mmix/basep-1b.d | 14 +++++++++++++ gas/testsuite/gas/mmix/basep-2b.d | 26 +++++++++++++++++++++++ gas/testsuite/gas/mmix/basep-3b.d | 17 ++++++++++++++++ gas/testsuite/gas/mmix/basep-4.d | 14 +++++++++++++ gas/testsuite/gas/mmix/basep-5.d | 26 +++++++++++++++++++++++ gas/testsuite/gas/mmix/basep-6.d | 17 ++++++++++++++++ gas/testsuite/gas/mmix/basep-7.d | 34 +++++++++++++++++++++++++++++++ gas/testsuite/gas/mmix/err-bpo2.s | 6 ++++++ gas/testsuite/gas/mmix/err-bpo3.s | 13 ++++++++++++ gas/testsuite/gas/mmix/err-bpo4.s | 7 +++++++ gas/testsuite/gas/mmix/err-bpo5.s | 14 +++++++++++++ 12 files changed, 195 insertions(+) create mode 100644 gas/testsuite/gas/mmix/basep-1b.d create mode 100644 gas/testsuite/gas/mmix/basep-2b.d create mode 100644 gas/testsuite/gas/mmix/basep-3b.d create mode 100644 gas/testsuite/gas/mmix/basep-4.d create mode 100644 gas/testsuite/gas/mmix/basep-5.d create mode 100644 gas/testsuite/gas/mmix/basep-6.d create mode 100644 gas/testsuite/gas/mmix/basep-7.d create mode 100644 gas/testsuite/gas/mmix/err-bpo2.s create mode 100644 gas/testsuite/gas/mmix/err-bpo3.s create mode 100644 gas/testsuite/gas/mmix/err-bpo4.s create mode 100644 gas/testsuite/gas/mmix/err-bpo5.s diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 9cc49798fa0..daf87be2d26 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2002-02-01 Hans-Peter Nilsson + + * 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 * 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 index 00000000000..b78788947af --- /dev/null +++ b/gas/testsuite/gas/mmix/basep-1b.d @@ -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+ : + 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 index 00000000000..4c3e7cc7d3f --- /dev/null +++ b/gas/testsuite/gas/mmix/basep-2b.d @@ -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 : + 0: 0000002a trap 0,0,42 + 4: 8d2b0034 ldo \$43,\$0,52 + 6: R_MMIX_REG \.MMIX\.reg_contents\+0x8 + \.\.\. + +0000000000000108 : + 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 index 00000000000..a36bb6643a9 --- /dev/null +++ b/gas/testsuite/gas/mmix/basep-3b.d @@ -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+
: + 0: bf2a0000 pushgo \$42,\$0,0 + 2: R_MMIX_REG \.MMIX\.reg_contents + 4: fd000000 swym 0,0,0 + +0+8 : + 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 index 00000000000..77dcdc6fa70 --- /dev/null +++ b/gas/testsuite/gas/mmix/basep-4.d @@ -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+ : + 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 index 00000000000..2a30195d59e --- /dev/null +++ b/gas/testsuite/gas/mmix/basep-5.d @@ -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+ : + 0: 0000002a trap 0,0,42 + 4: 8d2b0000 ldo \$43,\$0,0 + 6: R_MMIX_BASE_PLUS_OFFSET \.text\+0x34 + \.\.\. + +0+108 : + 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 index 00000000000..527211ea251 --- /dev/null +++ b/gas/testsuite/gas/mmix/basep-6.d @@ -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+
: + 0: bf2a0000 pushgo \$42,\$0,0 + 2: R_MMIX_BASE_PLUS_OFFSET fn + 4: fd000000 swym 0,0,0 + +0+8 : + 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 index 00000000000..e00139fef7e --- /dev/null +++ b/gas/testsuite/gas/mmix/basep-7.d @@ -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 index 00000000000..ae22c94fc67 --- /dev/null +++ b/gas/testsuite/gas/mmix/err-bpo2.s @@ -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 index 00000000000..286a0b7af97 --- /dev/null +++ b/gas/testsuite/gas/mmix/err-bpo3.s @@ -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 index 00000000000..92bba12b665 --- /dev/null +++ b/gas/testsuite/gas/mmix/err-bpo4.s @@ -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 index 00000000000..bf5171092ee --- /dev/null +++ b/gas/testsuite/gas/mmix/err-bpo5.s @@ -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 -- 2.30.2