diff options
author | Sandra Loosemore <sandra@codesourcery.com> | 2014-11-28 14:41:32 -0800 |
---|---|---|
committer | Sandra Loosemore <sandra@codesourcery.com> | 2014-11-28 14:41:32 -0800 |
commit | d306ce58b4c7d544721ba328c447240cb2228fe5 (patch) | |
tree | 70459796d4bf71af113f8a509653a72482ebad35 /gas/testsuite | |
parent | d7fc3181f73ab3d5549b396198645558127e0584 (diff) | |
download | gdb-d306ce58b4c7d544721ba328c447240cb2228fe5.zip gdb-d306ce58b4c7d544721ba328c447240cb2228fe5.tar.gz gdb-d306ce58b4c7d544721ba328c447240cb2228fe5.tar.bz2 |
Remove broken nios2 assembler dwim support.
2014-11-28 Sandra Loosemore <sandra@codesourcery.com>
include/opcode/
* nios2.h (NIOS2_INSN_ADDI, NIOS2_INSN_ANDI): Delete.
(NIOS2_INSN_ORI, NIOS2_INSN_XORI): Delete.
(NIOS2_INSN_OPTARG): Renumber.
opcodes/
* nios2-opc.c (nios2_r1_opcodes): Remove deleted attributes
from descriptors.
gas/
* config/tc-nios2.c (can_evaluate_expr, get_expr_value): Delete.
(output_addi, output_andi, output_ori, output_xori): Delete.
(md_assemble): Remove calls to deleted functions.
gas/testsuite/
* gas/nios2/nios2.exp: Make "movi" a list test.
* gas/nios2/movi.s: Adjust comments, add another case.
* gas/nios2/movi.l: New.
* gas/nios2/movi.d: Delete.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/nios2/movi.d | 13 | ||||
-rw-r--r-- | gas/testsuite/gas/nios2/movi.l | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/nios2/movi.s | 18 | ||||
-rw-r--r-- | gas/testsuite/gas/nios2/nios2.exp | 1 |
5 files changed, 23 insertions, 22 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 3c2f81a..54d7560 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2014-11-28 Sandra Loosemore <sandra@codesourcery.com> + + * gas/nios2/nios2.exp: Make "movi" a list test. + * gas/nios2/movi.s: Adjust comments, add another case. + * gas/nios2/movi.l: New. + * gas/nios2/movi.d: Delete. + 2014-11-25 Max Filippov <jcmvbkbc@gmail.com> * gas/xtensa/trampoline.d: Add expected output for branches. * gas/xtensa/trampoline.s: Add test case for branches. diff --git a/gas/testsuite/gas/nios2/movi.d b/gas/testsuite/gas/nios2/movi.d deleted file mode 100644 index e306017..0000000 --- a/gas/testsuite/gas/nios2/movi.d +++ /dev/null @@ -1,13 +0,0 @@ -#objdump: -dr --prefix-addresses --show-raw-insn -#name: NIOS2 movi - -# Test implicit conversion of movi/movhi etc -.*: file format elf32-littlenios2 - -Disassembly of section .text: -0+0000 <[^>]*> 00800804 movi r2,32 -0+0004 <[^>]*> 00880034 movhi r2,8192 -0+0008 <[^>]*> 00bffff4 movhi r2,65535 -0+000c <[^>]*> 28bffff4 orhi r2,r5,65535 -0+0010 <[^>]*> 50bffffc xorhi r2,r10,65535 -0+0014 <[^>]*> 78bfffec andhi r2,r15,65535 diff --git a/gas/testsuite/gas/nios2/movi.l b/gas/testsuite/gas/nios2/movi.l new file mode 100644 index 0000000..2eb47a1 --- /dev/null +++ b/gas/testsuite/gas/nios2/movi.l @@ -0,0 +1,6 @@ +.*movi.s: Assembler messages: +.*movi.s:9: Error: immediate value 536870912 out of range -32768 to 32767 +.*movi.s:12: Error: immediate value -65536 out of range -32768 to 32767 +.*movi.s:15: Error: immediate value 4294901760 out of range 0 to 65535 +.*movi.s:16: Error: immediate value 4294901760 out of range 0 to 65535 +.*movi.s:17: Error: immediate value 4294901760 out of range 0 to 65535 diff --git a/gas/testsuite/gas/nios2/movi.s b/gas/testsuite/gas/nios2/movi.s index 07d9fed..20df564 100644 --- a/gas/testsuite/gas/nios2/movi.s +++ b/gas/testsuite/gas/nios2/movi.s @@ -1,21 +1,21 @@ -# Source file used to test silent conversion of -# movi to orhi etc +# Source file used to test that former silent conversion of +# movi to orhi etc now gives range errors instead. foo: -# this doesn't get converted +# This doesn't get converted. movi r2, 0x20 -# this does +# This used to convert. movi r2, 0x20000000 -# addi should convert only if the source register is r0 +# addi used to convert only if the source register is r0. addi r2, r0, 0xffff0000 -# but we can't test for non-conversion because the value would -# be out of range -# logical ops should convert for any register +# Logical ops used to convert to equivalent *hi for any register. ori r2, r5, 0xffff0000 xori r2, r10, 0xffff0000 andi r2, r15, 0xffff0000 - +# This one used to be buggy and convert even though it wasn't supposed to, +# because it was failing to take the %lo relocation into account. +ori r23,r23,%lo(0x12340000) diff --git a/gas/testsuite/gas/nios2/nios2.exp b/gas/testsuite/gas/nios2/nios2.exp index bd68c6c..a4e7d7a 100644 --- a/gas/testsuite/gas/nios2/nios2.exp +++ b/gas/testsuite/gas/nios2/nios2.exp @@ -24,4 +24,5 @@ if { [istarget nios2-*-*] } { run_list_test "illegal" "" run_list_test "warn_nobreak" "" run_list_test "warn_noat" "" + run_list_test "movi" "" } |