From 530288a6b696ea228913e10b7940cceec48448e0 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Thu, 10 Sep 2009 22:32:10 +0000 Subject: [PATCH] PR gas/10623 * gas/mmix/err-swym1.s, gas/mmix/swym-opreg1.d, gas/mmix/swym-opreg1.s, gas/mmix/swym-opreg2.d, gas/mmix/swym-opreg2.s: New tests. * gas/mmix/odd-1.d: Adjust for reloc change. --- gas/testsuite/ChangeLog | 8 +++++++ gas/testsuite/gas/mmix/err-swym1.s | 15 ++++++++++++++ gas/testsuite/gas/mmix/odd-1.d | 2 +- gas/testsuite/gas/mmix/swym-opreg1.d | 31 ++++++++++++++++++++++++++++ gas/testsuite/gas/mmix/swym-opreg1.s | 24 +++++++++++++++++++++ gas/testsuite/gas/mmix/swym-opreg2.d | 8 +++++++ gas/testsuite/gas/mmix/swym-opreg2.s | 1 + 7 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 gas/testsuite/gas/mmix/err-swym1.s create mode 100644 gas/testsuite/gas/mmix/swym-opreg1.d create mode 100644 gas/testsuite/gas/mmix/swym-opreg1.s create mode 100644 gas/testsuite/gas/mmix/swym-opreg2.d create mode 100644 gas/testsuite/gas/mmix/swym-opreg2.s diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 2afd5b20367..7e4052b3ada 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2009-09-11 Hans-Peter Nilsson + + PR gas/10623 + * gas/mmix/err-swym1.s, gas/mmix/swym-opreg1.d, + gas/mmix/swym-opreg1.s, gas/mmix/swym-opreg2.d, + gas/mmix/swym-opreg2.s: New tests. + * gas/mmix/odd-1.d: Adjust for reloc change. + 2009-09-11 Alan Modra * gas/lns/lns-common-1.s: Use two nops between each .loc. diff --git a/gas/testsuite/gas/mmix/err-swym1.s b/gas/testsuite/gas/mmix/err-swym1.s new file mode 100644 index 00000000000..cb94ba30ac0 --- /dev/null +++ b/gas/testsuite/gas/mmix/err-swym1.s @@ -0,0 +1,15 @@ +% { dg-do assemble { target mmix-*-* } } + SWYM 256*256*256 % { dg-error "invalid operands" "" } + SWYM -1 % { dg-error "invalid operands" "" } + SWYM 99,256*256 % { dg-error "invalid operands" "" } + SWYM 99,-1 % { dg-error "invalid operands" "" } + SWYM 256,1,2 % { dg-error "invalid operands" "" } + SWYM 1,256,2 % { dg-error "invalid operands" "" } + SWYM 1,2,256 % { dg-error "invalid operands" "" } + SWYM -1,1,2 % { dg-error "invalid operands" "" } + SWYM 1,-1,2 % { dg-error "invalid operands" "" } + SWYM 1,2,-1 % { dg-error "invalid operands" "" } + SWYM 256,1 % { dg-error "invalid operands" "" } + SWYM -1,1 % { dg-error "invalid operands" "" } + SWYM 1,2,3,4 % { dg-error "invalid operands" "" } + SWYM 1,2,3,4,5 % { dg-error "invalid operands" "" } diff --git a/gas/testsuite/gas/mmix/odd-1.d b/gas/testsuite/gas/mmix/odd-1.d index 51bc4e5693a..b59e85729bb 100644 --- a/gas/testsuite/gas/mmix/odd-1.d +++ b/gas/testsuite/gas/mmix/odd-1.d @@ -15,7 +15,7 @@ SYMBOL TABLE: RELOCATION RECORDS FOR \[\.text\]: OFFSET TYPE VALUE -0+7 R_MMIX_REG_OR_BYTE \.MMIX\.reg_contents +0+7 R_MMIX_8 \.MMIX\.reg_contents 0+f R_MMIX_REG \.MMIX\.reg_contents 0+15 R_MMIX_REG \.MMIX\.reg_contents 0+19 R_MMIX_REG \.MMIX\.reg_contents diff --git a/gas/testsuite/gas/mmix/swym-opreg1.d b/gas/testsuite/gas/mmix/swym-opreg1.d new file mode 100644 index 00000000000..837b2157b38 --- /dev/null +++ b/gas/testsuite/gas/mmix/swym-opreg1.d @@ -0,0 +1,31 @@ +# objdump: -dr +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+
: + 0: fd000005 swym 0,0,5 + 4: fd000005 swym 0,0,5 + 8: fd020005 swym 2,0,5 + c: fd020005 swym 2,0,5 + 10: fd010203 swym 1,2,3 + 14: fd010203 swym 1,2,3 + 18: fd010203 swym 1,2,3 + 1c: fd010203 swym 1,2,3 + 20: 00000005 trap 0,0,5 + 24: 00000005 trap 0,0,5 + 28: 00020005 trap 2,0,5 + 2c: 00020005 trap 2,0,5 + 30: 00010203 trap 1,2,3 + 34: 00010203 trap 1,2,3 + 38: 00010203 trap 1,2,3 + 3c: 00010203 trap 1,2,3 + 40: ff0b1621 trip 11,22,33 + 44: fd00007b swym 0,0,123 + 48: fd7bb26e swym 123,178,110 + 4c: ff12d687 trip 18,214,135 + 50: 007b002d trap 123,0,45 + 54: 007bb26e trap 123,178,110 + 58: fffeff01 trip 254,255,1 + 5c: fd63ff00 swym 99,255,0 + diff --git a/gas/testsuite/gas/mmix/swym-opreg1.s b/gas/testsuite/gas/mmix/swym-opreg1.s new file mode 100644 index 00000000000..3eff91c27d6 --- /dev/null +++ b/gas/testsuite/gas/mmix/swym-opreg1.s @@ -0,0 +1,24 @@ +Main SWYM 0,5 + SWYM $0,5 + SWYM $2,5 + SWYM $2,0,5 + SWYM 1,2,3 + SWYM $1,$2,3 + SWYM $1,$2,$3 + SWYM 1,2,$3 + TRAP 0,5 + TRAP $0,5 + TRAP $2,5 + TRAP $2,0,5 + TRAP 1,2,3 + TRAP $1,$2,3 + TRAP $1,$2,$3 + TRAP 1,2,$3 + TRIP $11,22,$33 + SWYM $123 + SWYM $123,45678 + TRIP 1234567 + TRAP 123,$45 + TRAP 123,45678 + TRIP 255*255*257 + SWYM 99,255*256 diff --git a/gas/testsuite/gas/mmix/swym-opreg2.d b/gas/testsuite/gas/mmix/swym-opreg2.d new file mode 100644 index 00000000000..963c9775c4e --- /dev/null +++ b/gas/testsuite/gas/mmix/swym-opreg2.d @@ -0,0 +1,8 @@ +# objdump: -dr +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+
: + 0: 00000000 trap 0,0,0 + 1: R_MMIX_24 foo\+0x237 diff --git a/gas/testsuite/gas/mmix/swym-opreg2.s b/gas/testsuite/gas/mmix/swym-opreg2.s new file mode 100644 index 00000000000..47cfd199020 --- /dev/null +++ b/gas/testsuite/gas/mmix/swym-opreg2.s @@ -0,0 +1 @@ +Main TRAP foo+567 -- 2.30.2