From: Tom Rix Date: Fri, 24 May 2002 03:05:50 +0000 (+0000) Subject: New d10v tests. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7f7432881e1b8199850d77b69dffa4f2ac1fad91;p=binutils-gdb.git New d10v tests. --- diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 2f1c6c15213..f443499138b 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2002-05-23 Tom Rix + + * gas/d10v/d10v.exp: Add instruction packing test. + * gas/d10v/instruction_packing.s : New test. + +2002-05-22 Tom Rix + + * gas/d10v/d10v.exp: Renamed from d10.exp. Add address-* tests. + * gas/d10v/address-001.s - address-041.s : New tests. + 2002-05-23 H.J. Lu * gas/mips/elf-rel.d: Skip the padding. diff --git a/gas/testsuite/gas/d10v/address-001.d b/gas/testsuite/gas/d10v/address-001.d new file mode 100644 index 00000000000..f5ff26ef384 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-001.d @@ -0,0 +1,33 @@ +#objdump: -D +#name: D10V supported indirect addressing +#as: + +.*: +file format elf32-d10v + +Disassembly of section .text: + +00000000
: + 0: 78 02 72 04 ldb r0, @r2 -> ldub r0, @r2 + 4: 70 02 62 04 ld r0, @r2 -> ld2w r0, @r2 + 8: 7c 02 68 04 stb r0, @r2 -> st r0, @r2 + c: 75 02 60 05 st2w r0, @r2 -> ld r0, @r2\+ + 10: 71 02 e8 05 ld2w r0, @r2\+ -> st r0, @r2\+ + 14: 75 02 e4 05 st2w r0, @r2\+ -> ld r0, @r2- + 18: 73 02 ec 05 ld2w r0, @r2- -> st r0, @r2- + 1c: 77 02 f0 1e st2w r0, @r2- -> ldb r0, @sp + 20: 79 0f 60 1e ldub r0, @sp -> ld r0, @sp + 24: 71 0f 78 1e ld2w r0, @sp -> stb r0, @sp + 28: 74 0f 6a 1e st r0, @sp -> st2w r0, @sp + 2c: 70 0f e2 1f ld r0, @sp\+ -> ld2w r0, @sp\+ + 30: 74 0f ea 1f st r0, @sp\+ -> st2w r0, @sp\+ + 34: 72 0f e6 1f ld r0, @sp- -> ld2w r0, @sp- + 38: 76 0f ee 1f st r0, @-sp -> st2w r0, @-sp + 3c: f8 02 80 00 ldb r0, @\(-0x8000, r2\) + 40: f9 02 80 00 ldub r0, @\(-0x8000, r2\) + 44: f0 02 80 00 ld r0, @\(-0x8000, r2\) + 48: f1 02 80 00 ld2w r0, @\(-0x8000, r2\) + 4c: fc 02 80 00 stb r0, @\(-0x8000, r2\) + 50: f4 02 80 00 st r0, @\(-0x8000, r2\) + 54: f5 02 80 00 st2w r0, @\(-0x8000, r2\) + 58: 26 0d 5e 00 jmp r13 || nop +Disassembly of section .data: diff --git a/gas/testsuite/gas/d10v/address-001.s b/gas/testsuite/gas/d10v/address-001.s new file mode 100644 index 00000000000..df1d4d25f79 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-001.s @@ -0,0 +1,78 @@ + ;; + ;; address-001.s + ;; Test supported indirect addressing + ;; + + .text + .global main +main: + ;; + ;; Indirect + ;; + ldb r0,@r2 + ldub r0,@r2 + ld r0,@r2 + ld2w r0,@r2 + stb r0,@r2 + st r0,@r2 + st2w r0,@r2 + + ;; + ;; Indirect with post increment + ;; + ld r0,@r2+ + ld2w r0,@r2+ + st r0,@r2+ + st2w r0,@r2+ + + ;; + ;; Indirect with postdecrement + ;; + ld r0,@r2- + ld2w r0,@r2- + st r0,@r2- + st2w r0,@r2- + + ;; + ;; Indirect through stackpointer + ;; + ldb r0,@sp + ldub r0,@sp + ld r0,@sp + ld2w r0,@sp + stb r0,@sp + st r0,@sp + st2w r0,@sp + + ;; + ;; Indirect through stackpointer with postincrement + ;; + ld r0,@sp+ + ld2w r0,@sp+ + st r0,@sp+ + st2w r0,@sp+ + + ;; + ;; Indirect through stackpointer with postdecrement + ;; + ld r0,@sp- + ld2w r0,@sp- + + ;; + ;; Indirect through stackpointer with predecrement + ;; + st r0,@-sp + st2w r0,@-sp + + ;; + ;; Indirect with displacement + ;; + ldb r0,@(0x8000,r2) + ldub r0,@(0x8000,r2) + ld r0,@(0x8000,r2) + ld2w r0,@(0x8000,r2) + stb r0,@(0x8000,r2) + st r0,@(0x8000,r2) + st2w r0,@(0x8000,r2) + + jmp r13 diff --git a/gas/testsuite/gas/d10v/address-002.l b/gas/testsuite/gas/d10v/address-002.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-002.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-002.s b/gas/testsuite/gas/d10v/address-002.s new file mode 100644 index 00000000000..3d1225f677d --- /dev/null +++ b/gas/testsuite/gas/d10v/address-002.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ldb r0,@r2+ + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-003.l b/gas/testsuite/gas/d10v/address-003.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-003.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-003.s b/gas/testsuite/gas/d10v/address-003.s new file mode 100644 index 00000000000..92b649be64b --- /dev/null +++ b/gas/testsuite/gas/d10v/address-003.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ldub r0,@r2+ + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-004.l b/gas/testsuite/gas/d10v/address-004.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-004.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-004.s b/gas/testsuite/gas/d10v/address-004.s new file mode 100644 index 00000000000..76108d2cb7e --- /dev/null +++ b/gas/testsuite/gas/d10v/address-004.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + stb r0,@r2+ + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-005.l b/gas/testsuite/gas/d10v/address-005.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-005.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-005.s b/gas/testsuite/gas/d10v/address-005.s new file mode 100644 index 00000000000..2d867f31041 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-005.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ldb r0,@r2- + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-006.l b/gas/testsuite/gas/d10v/address-006.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-006.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-006.s b/gas/testsuite/gas/d10v/address-006.s new file mode 100644 index 00000000000..497bc05560e --- /dev/null +++ b/gas/testsuite/gas/d10v/address-006.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ldub r0,@r2- + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-007.l b/gas/testsuite/gas/d10v/address-007.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-007.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-007.s b/gas/testsuite/gas/d10v/address-007.s new file mode 100644 index 00000000000..cce987fc33b --- /dev/null +++ b/gas/testsuite/gas/d10v/address-007.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + stb r0,@r2- + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-008.l b/gas/testsuite/gas/d10v/address-008.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-008.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-008.s b/gas/testsuite/gas/d10v/address-008.s new file mode 100644 index 00000000000..e2b37194c10 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-008.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ldb r0,@+r2 + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-009.l b/gas/testsuite/gas/d10v/address-009.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-009.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-009.s b/gas/testsuite/gas/d10v/address-009.s new file mode 100644 index 00000000000..ce2140e5625 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-009.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ldub r0,@+r2 + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-010.l b/gas/testsuite/gas/d10v/address-010.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-010.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-010.s b/gas/testsuite/gas/d10v/address-010.s new file mode 100644 index 00000000000..e3b70e71f70 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-010.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ld r0,@+r2 + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-011.l b/gas/testsuite/gas/d10v/address-011.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-011.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-011.s b/gas/testsuite/gas/d10v/address-011.s new file mode 100644 index 00000000000..3e31f2f8dac --- /dev/null +++ b/gas/testsuite/gas/d10v/address-011.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ld2w r0,@+r2 + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-012.l b/gas/testsuite/gas/d10v/address-012.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-012.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-012.s b/gas/testsuite/gas/d10v/address-012.s new file mode 100644 index 00000000000..135461ef930 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-012.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + stb r0,@+r2 + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-013.l b/gas/testsuite/gas/d10v/address-013.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-013.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-013.s b/gas/testsuite/gas/d10v/address-013.s new file mode 100644 index 00000000000..31f03866953 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-013.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + st r0,@+r2 + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-014.l b/gas/testsuite/gas/d10v/address-014.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-014.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-014.s b/gas/testsuite/gas/d10v/address-014.s new file mode 100644 index 00000000000..82b957f881a --- /dev/null +++ b/gas/testsuite/gas/d10v/address-014.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + st2w r0,@+r2 + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-015.l b/gas/testsuite/gas/d10v/address-015.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-015.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-015.s b/gas/testsuite/gas/d10v/address-015.s new file mode 100644 index 00000000000..d309e414565 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-015.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ldb r0,@-r2 + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-016.l b/gas/testsuite/gas/d10v/address-016.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-016.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-016.s b/gas/testsuite/gas/d10v/address-016.s new file mode 100644 index 00000000000..886faa23bfb --- /dev/null +++ b/gas/testsuite/gas/d10v/address-016.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ldub r0,@-r2 + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-017.l b/gas/testsuite/gas/d10v/address-017.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-017.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-017.s b/gas/testsuite/gas/d10v/address-017.s new file mode 100644 index 00000000000..39a70eaaddc --- /dev/null +++ b/gas/testsuite/gas/d10v/address-017.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ld r0,@-r2 + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-018.l b/gas/testsuite/gas/d10v/address-018.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-018.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-018.s b/gas/testsuite/gas/d10v/address-018.s new file mode 100644 index 00000000000..ce654239833 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-018.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ld2w r0,@-r2 + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-019.l b/gas/testsuite/gas/d10v/address-019.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-019.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-019.s b/gas/testsuite/gas/d10v/address-019.s new file mode 100644 index 00000000000..41b86beb464 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-019.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + stb r0,@-r2 + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-020.l b/gas/testsuite/gas/d10v/address-020.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-020.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-020.s b/gas/testsuite/gas/d10v/address-020.s new file mode 100644 index 00000000000..097cf861436 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-020.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + st r0,@-r2 + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-021.l b/gas/testsuite/gas/d10v/address-021.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-021.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-021.s b/gas/testsuite/gas/d10v/address-021.s new file mode 100644 index 00000000000..d556696b7d4 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-021.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + st2w r0,@-r2 + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-022.l b/gas/testsuite/gas/d10v/address-022.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-022.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-022.s b/gas/testsuite/gas/d10v/address-022.s new file mode 100644 index 00000000000..e88cd92c85b --- /dev/null +++ b/gas/testsuite/gas/d10v/address-022.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ldb r0,@sp+ + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-023.l b/gas/testsuite/gas/d10v/address-023.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-023.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-023.s b/gas/testsuite/gas/d10v/address-023.s new file mode 100644 index 00000000000..f9312ab92d7 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-023.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ldub r0,@sp+ + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-024.l b/gas/testsuite/gas/d10v/address-024.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-024.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-024.s b/gas/testsuite/gas/d10v/address-024.s new file mode 100644 index 00000000000..99e732581a3 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-024.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + stb r0,@sp+ + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-025.l b/gas/testsuite/gas/d10v/address-025.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-025.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-025.s b/gas/testsuite/gas/d10v/address-025.s new file mode 100644 index 00000000000..1397abde746 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-025.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ldb r0,@sp- + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-026.l b/gas/testsuite/gas/d10v/address-026.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-026.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-026.s b/gas/testsuite/gas/d10v/address-026.s new file mode 100644 index 00000000000..a5b3b13f113 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-026.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ldub r0,@sp- + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-027.l b/gas/testsuite/gas/d10v/address-027.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-027.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-027.s b/gas/testsuite/gas/d10v/address-027.s new file mode 100644 index 00000000000..fb7c22055ef --- /dev/null +++ b/gas/testsuite/gas/d10v/address-027.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + stb r0,@sp- + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-028.l b/gas/testsuite/gas/d10v/address-028.l new file mode 100644 index 00000000000..20873247851 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-028.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: Unsupported use of sp + diff --git a/gas/testsuite/gas/d10v/address-028.s b/gas/testsuite/gas/d10v/address-028.s new file mode 100644 index 00000000000..33e25d0ad81 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-028.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + st r0,@sp- + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-029.l b/gas/testsuite/gas/d10v/address-029.l new file mode 100644 index 00000000000..20873247851 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-029.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: Unsupported use of sp + diff --git a/gas/testsuite/gas/d10v/address-029.s b/gas/testsuite/gas/d10v/address-029.s new file mode 100644 index 00000000000..71632cd5961 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-029.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + st2w r0,@sp- + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-030.l b/gas/testsuite/gas/d10v/address-030.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-030.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-030.s b/gas/testsuite/gas/d10v/address-030.s new file mode 100644 index 00000000000..e6cc8bdbb0f --- /dev/null +++ b/gas/testsuite/gas/d10v/address-030.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ldb r0,@+sp + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-031.l b/gas/testsuite/gas/d10v/address-031.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-031.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-031.s b/gas/testsuite/gas/d10v/address-031.s new file mode 100644 index 00000000000..d14d36e4270 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-031.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ldub r0,@+sp + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-032.l b/gas/testsuite/gas/d10v/address-032.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-032.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-032.s b/gas/testsuite/gas/d10v/address-032.s new file mode 100644 index 00000000000..4cf7b5741a9 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-032.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ld r0,@+sp + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-033.l b/gas/testsuite/gas/d10v/address-033.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-033.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-033.s b/gas/testsuite/gas/d10v/address-033.s new file mode 100644 index 00000000000..c9f057049df --- /dev/null +++ b/gas/testsuite/gas/d10v/address-033.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ld2w r0,@+sp + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-034.l b/gas/testsuite/gas/d10v/address-034.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-034.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-034.s b/gas/testsuite/gas/d10v/address-034.s new file mode 100644 index 00000000000..d10c8086c4a --- /dev/null +++ b/gas/testsuite/gas/d10v/address-034.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + stb r0,@+sp + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-035.l b/gas/testsuite/gas/d10v/address-035.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-035.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-035.s b/gas/testsuite/gas/d10v/address-035.s new file mode 100644 index 00000000000..be0917c13a6 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-035.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + st r0,@+sp + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-036.l b/gas/testsuite/gas/d10v/address-036.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-036.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-036.s b/gas/testsuite/gas/d10v/address-036.s new file mode 100644 index 00000000000..c680d6ea08a --- /dev/null +++ b/gas/testsuite/gas/d10v/address-036.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + st2w r0,@+sp + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-037.l b/gas/testsuite/gas/d10v/address-037.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-037.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-037.s b/gas/testsuite/gas/d10v/address-037.s new file mode 100644 index 00000000000..fee57d129da --- /dev/null +++ b/gas/testsuite/gas/d10v/address-037.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ldb r0,@-sp + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-038.l b/gas/testsuite/gas/d10v/address-038.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-038.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-038.s b/gas/testsuite/gas/d10v/address-038.s new file mode 100644 index 00000000000..0c9b0abd971 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-038.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ldub r0,@-sp + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-039.l b/gas/testsuite/gas/d10v/address-039.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-039.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-039.s b/gas/testsuite/gas/d10v/address-039.s new file mode 100644 index 00000000000..554338db959 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-039.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ld r0,@-sp + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-040.l b/gas/testsuite/gas/d10v/address-040.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-040.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-040.s b/gas/testsuite/gas/d10v/address-040.s new file mode 100644 index 00000000000..9d820d34e1c --- /dev/null +++ b/gas/testsuite/gas/d10v/address-040.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + ld2w r0,@-sp + jmp r13 + diff --git a/gas/testsuite/gas/d10v/address-041.l b/gas/testsuite/gas/d10v/address-041.l new file mode 100644 index 00000000000..2f8c4f596b8 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-041.l @@ -0,0 +1,3 @@ +.*: Assembler messages: +.*:6: Error: bad opcode or operands +.*:6: Fatal error: can't find opcode diff --git a/gas/testsuite/gas/d10v/address-041.s b/gas/testsuite/gas/d10v/address-041.s new file mode 100644 index 00000000000..9354d9be145 --- /dev/null +++ b/gas/testsuite/gas/d10v/address-041.s @@ -0,0 +1,8 @@ + ;; Test unsupported indirect addressing + + .text + .global main +main: + stb r0,@-sp + jmp r13 + diff --git a/gas/testsuite/gas/d10v/d10.exp b/gas/testsuite/gas/d10v/d10.exp deleted file mode 100644 index 9d437281d20..00000000000 --- a/gas/testsuite/gas/d10v/d10.exp +++ /dev/null @@ -1,19 +0,0 @@ -# -# Driver for D10V assembler testsuite -# -proc run_list_test { name opts } { - global srcdir subdir - set testname "D10V $name" - set file $srcdir/$subdir/$name - gas_run ${name}.s $opts ">&dump.out" - if {[regexp_diff "dump.out" "${file}.l"] } { - fail $testname - verbose "output is [file_contents "dump.out"]" 2 - return - } - pass $testname -} - -if {[istarget d10v-*-*]} { - run_dump_test "inst" -} diff --git a/gas/testsuite/gas/d10v/d10v.exp b/gas/testsuite/gas/d10v/d10v.exp new file mode 100644 index 00000000000..43f278539cd --- /dev/null +++ b/gas/testsuite/gas/d10v/d10v.exp @@ -0,0 +1,61 @@ +# +# Driver for D10V assembler testsuite +# +proc run_list_test { name opts } { + global srcdir subdir + set testname "D10V $name" + set file $srcdir/$subdir/$name + gas_run ${name}.s $opts ">&dump.out" + if {[regexp_diff "dump.out" "${file}.l"] } { + fail $testname + verbose "output is [file_contents "dump.out"]" 2 + return + } + pass $testname +} + +if {[istarget d10v-*-*]} { + run_dump_test "inst" + run_dump_test "address-001" + run_list_test "address-002" "" + run_list_test "address-003" "" + run_list_test "address-004" "" + run_list_test "address-005" "" + run_list_test "address-006" "" + run_list_test "address-007" "" + run_list_test "address-008" "" + run_list_test "address-009" "" + run_list_test "address-010" "" + run_list_test "address-011" "" + run_list_test "address-012" "" + run_list_test "address-013" "" + run_list_test "address-014" "" + run_list_test "address-015" "" + run_list_test "address-016" "" + run_list_test "address-017" "" + run_list_test "address-018" "" + run_list_test "address-019" "" + run_list_test "address-020" "" + run_list_test "address-021" "" + run_list_test "address-022" "" + run_list_test "address-023" "" + run_list_test "address-024" "" + run_list_test "address-025" "" + run_list_test "address-026" "" + run_list_test "address-027" "" + run_list_test "address-028" "" + run_list_test "address-029" "" + run_list_test "address-030" "" + run_list_test "address-031" "" + run_list_test "address-032" "" + run_list_test "address-033" "" + run_list_test "address-034" "" + run_list_test "address-035" "" + run_list_test "address-036" "" + run_list_test "address-037" "" + run_list_test "address-038" "" + run_list_test "address-039" "" + run_list_test "address-040" "" + run_list_test "address-041" "" + run_dump_test "instruction_packing" +} diff --git a/gas/testsuite/gas/d10v/instruction_packing.d b/gas/testsuite/gas/d10v/instruction_packing.d new file mode 100644 index 00000000000..a66d0b9647e --- /dev/null +++ b/gas/testsuite/gas/d10v/instruction_packing.d @@ -0,0 +1,86 @@ +#objdump: -Dr +#name: D10V intruction packing +#as: -W + +.*: +file format elf32-d10v + +Disassembly of section .text: + +00000000
: + 0: 2f 00 5e 00 nop || nop + +00000004 : + 4: 30 23 24 02 ld r2, @r3 || sra r0, r1 + 8: 24 11 a4 02 bra.s 94 || sra r0, r1 + +0000000c : + c: 30 23 24 02 ld r2, @r3 || sra r0, r1 + 10: 24 10 a4 02 bra.s 94 || sra r0, r1 + +00000014 : + 14: 30 23 02 8a ld r2, @r3 || add r4, r5 + 18: 24 0f 82 8a bra.s 94 || add r4, r5 + +0000001c : + 1c: 01 45 24 02 add r4, r5 || sra r0, r1 + 20: 01 45 2c ce add r4, r5 || mulx a0, r6, r7 + +00000024 : + 24: 30 23 02 8a ld r2, @r3 || add r4, r5 + 28: 24 0d 82 8a bra.s 94 || add r4, r5 + +0000002c : + 2c: 01 45 24 02 add r4, r5 || sra r0, r1 + 30: 01 45 2c ce add r4, r5 || mulx a0, r6, r7 + +00000034 : + 34: b0 23 24 02 ld r2, @r3 <- sra r0, r1 + 38: a4 0b a4 02 bra.s 94 <- sra r0, r1 + +0000003c : + 3c: 70 23 24 02 ld r2, @r3 -> sra r0, r1 + 40: 64 0a a4 02 bra.s 94 -> sra r0, r1 + +00000044 : + 44: 41 45 60 46 add r4, r5 -> ld r2, @r3 + 48: 41 45 48 13 add r4, r5 -> bra.s 94 + +0000004c : + 4c: 41 45 24 02 add r4, r5 -> sra r0, r1 + 50: 41 45 2c ce add r4, r5 -> mulx a0, r6, r7 + +00000054 : + 54: 70 23 02 8a ld r2, @r3 -> add r4, r5 + 58: 64 07 82 8a bra.s 94 -> add r4, r5 + +0000005c : + 5c: 81 45 24 02 add r4, r5 <- sra r0, r1 + 60: 81 45 2c ce add r4, r5 <- mulx a0, r6, r7 + +00000064 : + 64: 70 23 24 02 ld r2, @r3 -> sra r0, r1 + 68: 64 05 a4 02 bra.s 94 -> sra r0, r1 + +0000006c : + 6c: b0 23 24 02 ld r2, @r3 <- sra r0, r1 + 70: a4 04 a4 02 bra.s 94 <- sra r0, r1 + +00000074 : + 74: 70 23 02 8a ld r2, @r3 -> add r4, r5 + 78: 64 03 82 8a bra.s 94 -> add r4, r5 + +0000007c : + 7c: 81 45 24 02 add r4, r5 <- sra r0, r1 + 80: 81 45 2c ce add r4, r5 <- mulx a0, r6, r7 + +00000084 : + 84: b0 23 02 8a ld r2, @r3 <- add r4, r5 + 88: a4 01 82 8a bra.s 94 <- add r4, r5 + +0000008c : + 8c: 92 01 02 8a sra r0, r1 <- add r4, r5 + 90: 96 67 02 8a mulx a0, r6, r7 <- add r4, r5 + +00000094 : + 94: 26 0d 5e 00 jmp r13 || nop +Disassembly of section .data: diff --git a/gas/testsuite/gas/d10v/instruction_packing.s b/gas/testsuite/gas/d10v/instruction_packing.s new file mode 100644 index 00000000000..aea09a676f5 --- /dev/null +++ b/gas/testsuite/gas/d10v/instruction_packing.s @@ -0,0 +1,83 @@ + ;; Test instruction packing + + .text + .global main +main: + +MU_IU: + nop || nop + +FM00_IU_MU: + sra r0,r1 || ld r2,@r3 + sra r0,r1 || bra.s test_end + +FM00_MU_IU: + ld r2,@r3 || sra r0,r1 + bra.s test_end || sra r0,r1 + +FM00_IM_MU: + add r4,r5 || ld r2,@r3 + add r4,r5 || bra.s test_end + +FM00_IM_IU: + add r4,r5 || sra r0,r1 + add r4,r5 || mulx a0, r6, r7 + +FM00_MU_IM: + ld r2,@r3 || add r4,r5 + bra.s test_end || add r4,r5 + +FM00_IU_IM: + sra r0,r1 || add r4,r5 + mulx a0, r6, r7 || add r4,r5 + +FM01_IU_MU: + sra r0,r1 -> ld r2,@r3 + sra r0,r1 -> bra.s test_end + +FM01_MU_IU: + ld r2,@r3 -> sra r0,r1 + bra.s test_end -> sra r0,r1 + +FM01_IM_MU: + add r4,r5 -> ld r2,@r3 + add r4,r5 -> bra.s test_end + +FM01_IM_IU: + add r4,r5 -> sra r0,r1 + add r4,r5 -> mulx a0, r6, r7 + +FM01_MU_IM: + ld r2,@r3 -> add r4,r5 + bra.s test_end -> add r4,r5 + +FM01_IU_IM: + sra r0,r1 -> add r4,r5 + mulx a0, r6, r7 -> add r4,r5 + +FM10_IU_MU: + sra r0,r1 <- ld r2,@r3 + sra r0,r1 <- bra.s test_end + +FM10_MU_IU: + ld r2,@r3 <- sra r0,r1 + bra.s test_end <- sra r0,r1 + +FM10_IM_MU: + add r4,r5 <- ld r2,@r3 + add r4,r5 <- bra.s test_end + +FM10_IM_IU: + add r4,r5 <- sra r0,r1 + add r4,r5 <- mulx a0, r6, r7 + +FM10_MU_IM: + ld r2,@r3 <- add r4,r5 + bra.s test_end <- add r4,r5 + +FM10_IU_IM: + sra r0,r1 <- add r4,r5 + mulx a0, r6, r7 <- add r4,r5 +test_end: + + jmp r13