Some d10v gas tests.
This commit is contained in:
parent
c20129930b
commit
8c2784a5a4
@ -1,3 +1,18 @@
|
||||
2002-05-30 Tom Rix <trix@redhat.com>
|
||||
|
||||
* gas/d10v/d10v.exp: Add -gstabs packing, sequence control
|
||||
packing, warning, instruction packing, label, immediate and,
|
||||
error tests.
|
||||
* gas/d10v/instruction_packing-001.d - intruction_packing-010.d:
|
||||
New tests.
|
||||
* gas/d10v/control-001.d: New test.
|
||||
* gas/d10v/warning-001.d - warning-019.d: New tests.
|
||||
* gas/d10v/label-001.d: New test.
|
||||
* gas/d10v/error-001.d - error-002.d : New tests.
|
||||
* gas/d10v/immediate-001.d - immediate-007.d: New tests.
|
||||
|
||||
* lib/gas-defs.exp (run_dump_test): Add error option.
|
||||
|
||||
2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
|
||||
|
||||
* gas/dlx: New directory: DLX gas testsuite
|
||||
|
19
gas/testsuite/gas/d10v/control-001.d
Normal file
19
gas/testsuite/gas/d10v/control-001.d
Normal file
@ -0,0 +1,19 @@
|
||||
#objdump: -Dr
|
||||
#source: control-001.s
|
||||
|
||||
.*: file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <foo>:
|
||||
0: 69 00 56 00 mvfc r0, psw -> mvtc r0, psw
|
||||
4: 69 01 56 20 mvfc r0, bpsw -> mvtc r0, bpsw
|
||||
8: 69 02 56 40 mvfc r0, pc -> mvtc r0, pc
|
||||
c: 69 03 56 60 mvfc r0, bpc -> mvtc r0, bpc
|
||||
10: 69 07 56 e0 mvfc r0, rpt_c -> mvtc r0, rpt_c
|
||||
14: 69 08 57 00 mvfc r0, rpt_s -> mvtc r0, rpt_s
|
||||
18: 69 09 57 20 mvfc r0, rpt_e -> mvtc r0, rpt_e
|
||||
1c: 69 0a 57 40 mvfc r0, mod_s -> mvtc r0, mod_s
|
||||
20: 69 0b 57 60 mvfc r0, mod_e -> mvtc r0, mod_e
|
||||
24: 69 0e 57 c0 mvfc r0, iba -> mvtc r0, iba
|
||||
Disassembly of section .data:
|
25
gas/testsuite/gas/d10v/control-001.s
Normal file
25
gas/testsuite/gas/d10v/control-001.s
Normal file
@ -0,0 +1,25 @@
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
mvfc r0,cr0
|
||||
mvtc r0,psw ;; cr0=psw
|
||||
mvfc r0,cr1
|
||||
mvtc r0,bpsw ;; cr1=bpsw
|
||||
mvfc r0,cr2
|
||||
mvtc r0,pc ;; cr2=pc
|
||||
mvfc r0,cr3;
|
||||
mvtc r0,bpc ;; cr3=bpc
|
||||
mvfc r0,cr7
|
||||
mvtc r0,rpt_c ;; cr7=rpt_c
|
||||
mvfc r0,cr8
|
||||
mvtc r0,rpt_s ;; cr8=rpt_s
|
||||
mvfc r0,cr9
|
||||
mvtc r0,rpt_e ;; cr9=rpt_e
|
||||
mvfc r0,cr10
|
||||
mvtc r0,mod_s ;; cr10=mod_s
|
||||
mvfc r0,cr11
|
||||
mvtc r0,mod_e ;; cr11=mod_e
|
||||
mvfc r0,cr14
|
||||
mvtc r0,iba ;; cr14=iba
|
||||
|
||||
|
@ -58,4 +58,45 @@ if {[istarget d10v-*-*]} {
|
||||
run_list_test "address-040" ""
|
||||
run_list_test "address-041" ""
|
||||
run_dump_test "instruction_packing"
|
||||
run_dump_test "instruction_packing-001"
|
||||
run_dump_test "instruction_packing-002"
|
||||
run_dump_test "instruction_packing-003"
|
||||
run_dump_test "instruction_packing-004"
|
||||
run_dump_test "instruction_packing-005"
|
||||
run_dump_test "instruction_packing-006"
|
||||
run_dump_test "instruction_packing-007"
|
||||
run_dump_test "instruction_packing-008"
|
||||
run_dump_test "instruction_packing-009"
|
||||
run_dump_test "instruction_packing-010"
|
||||
run_dump_test "error-001"
|
||||
run_dump_test "error-002"
|
||||
run_dump_test "immediate-001"
|
||||
run_dump_test "immediate-002"
|
||||
run_dump_test "immediate-003"
|
||||
run_dump_test "immediate-004"
|
||||
run_dump_test "immediate-005"
|
||||
run_dump_test "immediate-006"
|
||||
run_dump_test "immediate-007"
|
||||
run_dump_test "warning-001"
|
||||
run_dump_test "warning-002"
|
||||
run_dump_test "warning-003"
|
||||
run_dump_test "warning-004"
|
||||
run_dump_test "warning-005"
|
||||
run_dump_test "warning-006"
|
||||
run_dump_test "warning-007"
|
||||
run_dump_test "warning-008"
|
||||
run_dump_test "warning-009"
|
||||
run_dump_test "warning-010"
|
||||
run_dump_test "warning-011"
|
||||
run_dump_test "warning-012"
|
||||
run_dump_test "warning-013"
|
||||
run_dump_test "warning-014"
|
||||
run_dump_test "warning-015"
|
||||
run_dump_test "warning-015"
|
||||
run_dump_test "warning-016"
|
||||
run_dump_test "warning-017"
|
||||
run_dump_test "warning-018"
|
||||
run_dump_test "warning-019"
|
||||
run_dump_test "control-001"
|
||||
run_dump_test "label-001"
|
||||
}
|
||||
|
12
gas/testsuite/gas/d10v/error-001.d
Normal file
12
gas/testsuite/gas/d10v/error-001.d
Normal file
@ -0,0 +1,12 @@
|
||||
#objdump: -D
|
||||
#source: error-001.s
|
||||
|
||||
# Test expect's dump_run_test baseline
|
||||
|
||||
.*: +file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <foo>:
|
||||
0: 20 01 5e 00 mv r0, r1 || nop
|
||||
Disassembly of section .data:
|
9
gas/testsuite/gas/d10v/error-001.s
Normal file
9
gas/testsuite/gas/d10v/error-001.s
Normal file
@ -0,0 +1,9 @@
|
||||
;;
|
||||
;; error-001.s
|
||||
;; Not really an error but a baseline for the expect function
|
||||
;; run_dump_test
|
||||
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
mv r0,r1
|
4
gas/testsuite/gas/d10v/error-002.d
Normal file
4
gas/testsuite/gas/d10v/error-002.d
Normal file
@ -0,0 +1,4 @@
|
||||
#source: error-002.s
|
||||
#error: bad opcode or operands
|
||||
|
||||
# Test expect's dump_run_test error option
|
9
gas/testsuite/gas/d10v/error-002.s
Normal file
9
gas/testsuite/gas/d10v/error-002.s
Normal file
@ -0,0 +1,9 @@
|
||||
;;
|
||||
;; error-002.s
|
||||
;; Test new error feature of run_dump_test
|
||||
;; run_dump_test
|
||||
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
mv r0,0
|
25
gas/testsuite/gas/d10v/immediate-001.d
Normal file
25
gas/testsuite/gas/d10v/immediate-001.d
Normal file
@ -0,0 +1,25 @@
|
||||
#objdump: -Dr
|
||||
#source: immediate-001.s
|
||||
|
||||
.*: file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <foo>:
|
||||
0: e0 00 7f ff ldi.l r0, 0x7fff
|
||||
4: e0 00 ff ff ldi.l r0, -0x1
|
||||
8: 41 0f 8c 1f addi r0, 0xf -> bclri r0, 0xf
|
||||
c: 84 0f 8a 1f bseti r0, 0xf <- bnoti r0, 0xf
|
||||
10: a9 03 8e 1f rac r0, a0, 0x3 <- btsti r0, 0xf
|
||||
14: a1 03 d2 0d rachi r0, a0, 0x3 <- rac r0, a0, -0x2
|
||||
18: 91 0f c2 0d slli r0, 0xf <- rachi r0, a0, -0x2
|
||||
1c: 92 0f b3 1f srai r0, 0xf <- slli a1, 0xf
|
||||
20: 9a 0f b4 01 srai a0, 0xf <- srai a0, 0x0
|
||||
24: 98 00 a0 1f srli a0, 0x0 <- srli r0, 0xf
|
||||
28: 80 00 b0 1f subi r0, 0x0 <- srli a0, 0xf
|
||||
2c: 40 0f df 1e subi r0, 0xf -> trap 0xf
|
||||
30: c7 00 7f ff tst0i r0, 0x7fff
|
||||
34: c7 00 ff ff tst0i r0, -0x1
|
||||
38: cf 00 7f ff tst1i r0, 0x7fff
|
||||
3c: cf 00 ff ff tst1i r0, -0x1
|
||||
Disassembly of section .data:
|
32
gas/testsuite/gas/d10v/immediate-001.s
Normal file
32
gas/testsuite/gas/d10v/immediate-001.s
Normal file
@ -0,0 +1,32 @@
|
||||
;; ops with immediate args
|
||||
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
ldi r0,0x7fff
|
||||
ldi r0,0xffff
|
||||
addi r0,0xf
|
||||
bclri r0,0xf
|
||||
bnoti r0,0xf
|
||||
bseti r0,0xf
|
||||
btsti r0,0xf
|
||||
rac r0,a0,3
|
||||
rac r0,a0,-2
|
||||
rachi r0,a0,3
|
||||
rachi r0,a0,-2
|
||||
slli r0,0xf
|
||||
slli a1,0xf
|
||||
srai r0,0xf
|
||||
srai a0,0x10
|
||||
srai a0,0xf
|
||||
srli r0,0xf
|
||||
srli a0,0x10
|
||||
srli a0,0xf
|
||||
subi r0,0x10
|
||||
subi r0,0xf
|
||||
trap 0xf
|
||||
tst0i r0,0x7fff
|
||||
tst0i r0,0xffff
|
||||
tst1i r0,0x7fff
|
||||
tst1i r0,0xffff
|
||||
|
10
gas/testsuite/gas/d10v/immediate-002.d
Normal file
10
gas/testsuite/gas/d10v/immediate-002.d
Normal file
@ -0,0 +1,10 @@
|
||||
#objdump: -Dr
|
||||
#source: immediate-002.s
|
||||
|
||||
.*: file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <foo>:
|
||||
0: e0 00 12 34 ldi.l r0, 0x1234
|
||||
Disassembly of section .data:
|
9
gas/testsuite/gas/d10v/immediate-002.s
Normal file
9
gas/testsuite/gas/d10v/immediate-002.s
Normal file
@ -0,0 +1,9 @@
|
||||
;; ops with immediate args
|
||||
|
||||
.set VALUE,0x1234
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
ldi r0,VALUE
|
||||
|
||||
|
11
gas/testsuite/gas/d10v/immediate-003.d
Normal file
11
gas/testsuite/gas/d10v/immediate-003.d
Normal file
@ -0,0 +1,11 @@
|
||||
#objdump: -Dr
|
||||
#source: immediate-003.s
|
||||
|
||||
.*: file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <foo>:
|
||||
0: e0 00 00 00 ldi.l r0, 0x0
|
||||
2: R_D10V_16 sym
|
||||
Disassembly of section .data:
|
8
gas/testsuite/gas/d10v/immediate-003.s
Normal file
8
gas/testsuite/gas/d10v/immediate-003.s
Normal file
@ -0,0 +1,8 @@
|
||||
;; ops with immediate args
|
||||
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
ldi.l r0,sym
|
||||
|
||||
|
2
gas/testsuite/gas/d10v/immediate-004.d
Normal file
2
gas/testsuite/gas/d10v/immediate-004.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: immediate-004.s
|
||||
#error : operand is not an immediate
|
8
gas/testsuite/gas/d10v/immediate-004.s
Normal file
8
gas/testsuite/gas/d10v/immediate-004.s
Normal file
@ -0,0 +1,8 @@
|
||||
;; ops with immediate args
|
||||
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
btsti r3,bad_value
|
||||
|
||||
|
2
gas/testsuite/gas/d10v/immediate-005.d
Normal file
2
gas/testsuite/gas/d10v/immediate-005.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: immediate-005.s
|
||||
#error : operand is not an immediate
|
7
gas/testsuite/gas/d10v/immediate-005.s
Normal file
7
gas/testsuite/gas/d10v/immediate-005.s
Normal file
@ -0,0 +1,7 @@
|
||||
;; ops with immediate args
|
||||
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
rac r4,a0,bad_value
|
||||
|
20
gas/testsuite/gas/d10v/immediate-006.d
Normal file
20
gas/testsuite/gas/d10v/immediate-006.d
Normal file
@ -0,0 +1,20 @@
|
||||
#objdump: -Dr
|
||||
#source: immediate-006.s
|
||||
|
||||
.*: file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <foo>:
|
||||
0: e0 00 00 08 ldi.l r0, 0x8
|
||||
2: R_D10V_16 .rodata
|
||||
Disassembly of section .data:
|
||||
Disassembly of section .rodata:
|
||||
|
||||
00000000 <str0>:
|
||||
0: 6f 70 73 6f unknown -> unknown.long 0x6f70736f
|
||||
4: 6c 6f 70 00 unknown -> ldb r0, @r0
|
||||
|
||||
00000008 <str1>:
|
||||
8: 6d 6f 70 73 unknown -> unknown.long 0x6d6f7073
|
||||
c: 66 6c 6f 00 unknown -> unknown.long 0x666c6f00
|
14
gas/testsuite/gas/d10v/immediate-006.s
Normal file
14
gas/testsuite/gas/d10v/immediate-006.s
Normal file
@ -0,0 +1,14 @@
|
||||
;; ops with immediate args
|
||||
|
||||
.section .rodata
|
||||
str0:
|
||||
.string "opsolop"
|
||||
str1:
|
||||
.string "mopsflo"
|
||||
|
||||
.text
|
||||
.align 2
|
||||
.global foo
|
||||
foo:
|
||||
ldi r0,str1
|
||||
|
14
gas/testsuite/gas/d10v/immediate-007.d
Normal file
14
gas/testsuite/gas/d10v/immediate-007.d
Normal file
@ -0,0 +1,14 @@
|
||||
#objdump: -Dr
|
||||
#source: immediate-007.s
|
||||
|
||||
.*: file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <foo>:
|
||||
0: ef 02 00 05 repi 0x2, 14 <bar>
|
||||
4: 6f 00 5e 00 nop -> nop
|
||||
8: 6f 00 5e 00 nop -> nop
|
||||
c: 6f 00 5e 00 nop -> nop
|
||||
10: 6f 00 5e 00 nop -> nop
|
||||
Disassembly of section .data:
|
19
gas/testsuite/gas/d10v/immediate-007.s
Normal file
19
gas/testsuite/gas/d10v/immediate-007.s
Normal file
@ -0,0 +1,19 @@
|
||||
;; ops with immediate args
|
||||
|
||||
.text
|
||||
.align 2
|
||||
.global foo
|
||||
|
||||
foo:
|
||||
repi 2,bar
|
||||
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
bar:
|
||||
|
25
gas/testsuite/gas/d10v/instruction_packing-001.d
Normal file
25
gas/testsuite/gas/d10v/instruction_packing-001.d
Normal file
@ -0,0 +1,25 @@
|
||||
#objdump: -D
|
||||
#source: instruction_packing-001.s
|
||||
|
||||
.*: file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <foo>:
|
||||
0: e0 10 30 00 ldi.l r1, 0x3000
|
||||
4: 26 81 40 03 jl r1 || ldi.s r0, 0x1
|
||||
|
||||
00000008 <L0>:
|
||||
8: 2f 80 40 03 trap 0x0 || ldi.s r0, 0x1
|
||||
c: 24 ff c0 03 bl.s 8 <L0> || ldi.s r0, 0x1
|
||||
10: 26 01 40 03 jmp r1 || ldi.s r0, 0x1
|
||||
14: 2f f0 40 03 stop || ldi.s r0, 0x1
|
||||
18: 2f e0 40 03 sleep || ldi.s r0, 0x1
|
||||
1c: 2f c0 40 03 wait || ldi.s r0, 0x1
|
||||
|
||||
00000020 <L1>:
|
||||
20: 2f 90 40 03 dbt || ldi.s r0, 0x1
|
||||
24: 24 7f c0 03 bra.s 20 <L1> || ldi.s r0, 0x1
|
||||
28: 2f a0 40 03 rte || ldi.s r0, 0x1
|
||||
2c: 20 01 de 00 ldi.s r0, 0x1 || nop
|
||||
Disassembly of section .data:
|
29
gas/testsuite/gas/d10v/instruction_packing-001.s
Normal file
29
gas/testsuite/gas/d10v/instruction_packing-001.s
Normal file
@ -0,0 +1,29 @@
|
||||
.text
|
||||
.align 2
|
||||
foo:
|
||||
ldi r1,0x3000
|
||||
ldi r0, #1
|
||||
jl r1
|
||||
L0:
|
||||
ldi r0, #1
|
||||
trap #0
|
||||
ldi r0, #1
|
||||
bl L0
|
||||
ldi r0, #1
|
||||
jmp r1
|
||||
ldi r0, #1
|
||||
stop
|
||||
ldi r0, #1
|
||||
sleep
|
||||
ldi r0, #1
|
||||
wait
|
||||
L1:
|
||||
ldi r0, #1
|
||||
dbt
|
||||
ldi r0, #1
|
||||
bra L1
|
||||
ldi r0, #1
|
||||
rte
|
||||
ldi r0, #1
|
||||
|
||||
|
18
gas/testsuite/gas/d10v/instruction_packing-002.d
Normal file
18
gas/testsuite/gas/d10v/instruction_packing-002.d
Normal file
@ -0,0 +1,18 @@
|
||||
#objdump: -Dr
|
||||
#source: instruction_packing-002.s
|
||||
#as: -W
|
||||
|
||||
.*: file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
Disassembly of section .data:
|
||||
Disassembly of section s1:
|
||||
|
||||
00000000 <foo>:
|
||||
0: 01 1b 5e 00 add r1, r11 || nop
|
||||
Disassembly of section s2:
|
||||
|
||||
00000000 <bar>:
|
||||
0: 01 2b 02 76 add r2, r11 || add r3, r11
|
||||
4: 41 2b 02 76 add r2, r11 -> add r3, r11
|
||||
8: 81 2b 02 76 add r2, r11 <- add r3, r11
|
10
gas/testsuite/gas/d10v/instruction_packing-002.s
Normal file
10
gas/testsuite/gas/d10v/instruction_packing-002.s
Normal file
@ -0,0 +1,10 @@
|
||||
.section s1, "ax"
|
||||
foo:
|
||||
add r1,r11
|
||||
|
||||
.section s2, "ax"
|
||||
bar:
|
||||
add r2,r11 || add r3,r11
|
||||
add r2,r11 -> add r3,r11
|
||||
add r2,r11 <- add r3,r11
|
||||
|
17
gas/testsuite/gas/d10v/instruction_packing-003.d
Normal file
17
gas/testsuite/gas/d10v/instruction_packing-003.d
Normal file
@ -0,0 +1,17 @@
|
||||
#objdump: -Dr
|
||||
#source: instruction_packing-003.s
|
||||
#as: -W
|
||||
|
||||
.*: file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
Disassembly of section .data:
|
||||
Disassembly of section s1:
|
||||
|
||||
00000000 <foo>:
|
||||
0: 01 1b 5e 00 add r1, r11 || nop
|
||||
4: 01 2b 02 76 add r2, r11 || add r3, r11
|
||||
Disassembly of section s2:
|
||||
|
||||
00000000 <bar>:
|
||||
0: 01 4b 02 b6 add r4, r11 || add r5, r11
|
9
gas/testsuite/gas/d10v/instruction_packing-003.s
Normal file
9
gas/testsuite/gas/d10v/instruction_packing-003.s
Normal file
@ -0,0 +1,9 @@
|
||||
.section s1 ,"ax"
|
||||
foo:
|
||||
add r1,r11
|
||||
add r2,r11 || add r3,r11
|
||||
|
||||
.section s2 ,"ax"
|
||||
bar:
|
||||
add r4,r11 || add r5,r11
|
||||
|
15
gas/testsuite/gas/d10v/instruction_packing-004.d
Normal file
15
gas/testsuite/gas/d10v/instruction_packing-004.d
Normal file
@ -0,0 +1,15 @@
|
||||
#objdump: -Dr
|
||||
#source: instruction_packing-004.s
|
||||
#as: -W
|
||||
|
||||
.*: file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
Disassembly of section .data:
|
||||
Disassembly of section s1:
|
||||
|
||||
00000000 <foo>:
|
||||
0: 01 1b 5e 00 add r1, r11 || nop
|
||||
|
||||
00000004 <bar>:
|
||||
4: 01 2b 02 76 add r2, r11 || add r3, r11
|
8
gas/testsuite/gas/d10v/instruction_packing-004.s
Normal file
8
gas/testsuite/gas/d10v/instruction_packing-004.s
Normal file
@ -0,0 +1,8 @@
|
||||
.section s1 ,"ax"
|
||||
foo:
|
||||
add r1,r11
|
||||
|
||||
.section s1 ,"ax"
|
||||
bar:
|
||||
add r2,r11 || add r3,r11
|
||||
|
29
gas/testsuite/gas/d10v/instruction_packing-005.d
Normal file
29
gas/testsuite/gas/d10v/instruction_packing-005.d
Normal file
@ -0,0 +1,29 @@
|
||||
#objdump: -D
|
||||
#source: instruction_packing-005.s
|
||||
#as: -O
|
||||
|
||||
.*: file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <foo>:
|
||||
0: 36 df de 00 st r13, @-sp || nop
|
||||
4: f0 0e 00 00 ld r0, @\(0x0, r14\)
|
||||
8: e4 80 00 02 bl.l 10 <func_a>
|
||||
c: 70 df cc 1a ld r13, @sp\+ -> jmp r13
|
||||
|
||||
00000010 <func_a>:
|
||||
10: 20 20 40 61 mv r2, r0 || ldi.s r3, 0x0
|
||||
14: c6 12 80 00 and3 r1, r2, -0x8000
|
||||
18: 01 31 a2 43 addi r3, 0x1 || slli r2, 0x1
|
||||
1c: c2 10 80 00 cmpeqi.l r1, -0x8000
|
||||
20: 60 02 0a 1f mv r0, r2 -> bnoti r0, 0xf
|
||||
24: 22 20 de 00 mvf0t r2, r0 || nop
|
||||
28: e3 30 00 08 cmpui r3, 0x8
|
||||
2c: 65 fd 40 04 brf0t.s 14 <func_a\+0x4> -> mv r0, r2
|
||||
30: 26 0d 5e 00 jmp r13 || nop
|
||||
Disassembly of section .data:
|
||||
|
||||
00000000 <in_data>:
|
||||
0: Address 0x0 is out of bounds.
|
||||
|
40
gas/testsuite/gas/d10v/instruction_packing-005.s
Normal file
40
gas/testsuite/gas/d10v/instruction_packing-005.s
Normal file
@ -0,0 +1,40 @@
|
||||
.globl in_data
|
||||
.data
|
||||
.align 1
|
||||
.type in_data,@object
|
||||
.size in_data,2
|
||||
in_data:
|
||||
.word 8192
|
||||
.text
|
||||
.align 2
|
||||
.globl foo
|
||||
.type foo,@function
|
||||
foo:
|
||||
st r13,@-sp
|
||||
ld r0,@((in_data),r14)
|
||||
bl func_a
|
||||
ld r13,@sp+
|
||||
jmp r13
|
||||
.Lfe1:
|
||||
.size foo,.Lfe1-foo
|
||||
.align 2
|
||||
.globl func_a
|
||||
.type func_a,@function
|
||||
func_a:
|
||||
mv r2,r0
|
||||
ldi r3,0
|
||||
.L7:
|
||||
and3 r1,r2,-32768
|
||||
addi r3,1
|
||||
slli r2,1
|
||||
cmpeqi r1,-32768
|
||||
mv r0,r2
|
||||
bnoti r0,15
|
||||
mvf0t r2,r0
|
||||
cmpui r3,8
|
||||
brf0t .L7
|
||||
mv r0,r2
|
||||
jmp r13
|
||||
|
||||
|
||||
|
51
gas/testsuite/gas/d10v/instruction_packing-006.d
Normal file
51
gas/testsuite/gas/d10v/instruction_packing-006.d
Normal file
@ -0,0 +1,51 @@
|
||||
#objdump: -Dr
|
||||
#source: instruction_packing-006.s
|
||||
|
||||
.*: file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <test0>:
|
||||
0: 24 81 5e 00 bl.s 8 <test1> || nop
|
||||
4: 20 01 de 00 ldi.s r0, 0x1 || nop
|
||||
|
||||
00000008 <test1>:
|
||||
8: 26 81 5e 00 jl r1 || nop
|
||||
c: 20 01 de 00 ldi.s r0, 0x1 || nop
|
||||
|
||||
00000010 <test2>:
|
||||
10: 2f 81 5e 00 trap 0x1 || nop
|
||||
14: 20 01 de 00 ldi.s r0, 0x1 || nop
|
||||
|
||||
00000018 <test3>:
|
||||
18: 2f e0 5e 00 sleep || nop
|
||||
1c: 20 01 de 00 ldi.s r0, 0x1 || nop
|
||||
|
||||
00000020 <test4>:
|
||||
20: 2f c0 5e 00 wait || nop
|
||||
24: 20 01 de 00 ldi.s r0, 0x1 || nop
|
||||
|
||||
00000028 <test5>:
|
||||
28: 2f f0 5e 00 stop || nop
|
||||
2c: 20 01 de 00 ldi.s r0, 0x1 || nop
|
||||
|
||||
00000030 <test6>:
|
||||
30: 2f 90 5e 00 dbt || nop
|
||||
34: 20 01 de 00 ldi.s r0, 0x1 || nop
|
||||
|
||||
00000038 <test7>:
|
||||
38: 24 7e 5e 00 bra.s 28 <test5> || nop
|
||||
3c: 20 01 de 00 ldi.s r0, 0x1 || nop
|
||||
|
||||
00000040 <test8>:
|
||||
40: 26 01 5e 00 jmp r1 || nop
|
||||
44: 20 01 de 00 ldi.s r0, 0x1 || nop
|
||||
|
||||
00000048 <test9>:
|
||||
48: 2f a0 5e 00 rte || nop
|
||||
4c: 20 01 de 00 ldi.s r0, 0x1 || nop
|
||||
|
||||
00000050 <test10>:
|
||||
50: 2f b0 5e 00 rtd || nop
|
||||
54: 20 01 de 00 ldi.s r0, 0x1 || nop
|
||||
Disassembly of section .data:
|
38
gas/testsuite/gas/d10v/instruction_packing-006.s
Normal file
38
gas/testsuite/gas/d10v/instruction_packing-006.s
Normal file
@ -0,0 +1,38 @@
|
||||
;; sequence control operands need to be packed with nop's
|
||||
;; bl, jl, trap, sleep, stop, wait, dbt, bra, jmp, rte, rtd
|
||||
|
||||
.text
|
||||
.align 2
|
||||
test0:
|
||||
bl.s test1
|
||||
ldi r0, #1
|
||||
test1:
|
||||
jl r1
|
||||
ldi r0, #1
|
||||
test2:
|
||||
trap #1
|
||||
ldi r0, #1
|
||||
test3:
|
||||
sleep
|
||||
ldi r0, #1
|
||||
test4:
|
||||
wait
|
||||
ldi r0, #1
|
||||
test5:
|
||||
stop
|
||||
ldi r0, #1
|
||||
test6:
|
||||
dbt
|
||||
ldi r0, #1
|
||||
test7:
|
||||
bra.s test5
|
||||
ldi r0, #1
|
||||
test8:
|
||||
jmp r1
|
||||
ldi r0, #1
|
||||
test9:
|
||||
rte
|
||||
ldi r0, #1
|
||||
test10:
|
||||
rtd
|
||||
ldi r0, #1
|
14
gas/testsuite/gas/d10v/instruction_packing-007.d
Normal file
14
gas/testsuite/gas/d10v/instruction_packing-007.d
Normal file
@ -0,0 +1,14 @@
|
||||
#objdump: -D
|
||||
#source: instruction_packing-007.s
|
||||
|
||||
.*: file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <foo>:
|
||||
0: e0 00 00 00 ldi.l r0, 0x0
|
||||
4: e0 10 10 00 ldi.l r1, 0x1000
|
||||
8: 60 22 c0 67 ldi.s r2, 0x2 -> ldi.s r3, 0x3
|
||||
c: e0 40 40 00 ldi.l r4, 0x4000
|
||||
10: 60 55 cc 1a ldi.s r5, 0x5 -> jmp r13
|
||||
Disassembly of section .data:
|
18
gas/testsuite/gas/d10v/instruction_packing-007.s
Normal file
18
gas/testsuite/gas/d10v/instruction_packing-007.s
Normal file
@ -0,0 +1,18 @@
|
||||
;;
|
||||
;; -gstabs --no-gstabs-packing inserts nop's so gdb will have the
|
||||
;; correct line number information.
|
||||
;; -gstabs and -gstabs --gstabs-packing disable inserting nops.
|
||||
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
ldi.l r0, #0x0000
|
||||
ldi.l r1, #0x1000
|
||||
|
||||
ldi.s r2, #0x0002
|
||||
ldi.s r3, #0x0003
|
||||
|
||||
ldi.l r4, #0x4000
|
||||
ldi.s r5, #0x0005
|
||||
|
||||
jmp r13
|
15
gas/testsuite/gas/d10v/instruction_packing-008.d
Normal file
15
gas/testsuite/gas/d10v/instruction_packing-008.d
Normal file
@ -0,0 +1,15 @@
|
||||
#objdump: -D
|
||||
#source: instruction_packing-007.s
|
||||
#as: -gstabs
|
||||
|
||||
.*: file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <foo>:
|
||||
0: e0 00 00 00 ldi.l r0, 0x0
|
||||
4: e0 10 10 00 ldi.l r1, 0x1000
|
||||
8: 60 22 c0 67 ldi.s r2, 0x2 -> ldi.s r3, 0x3
|
||||
c: e0 40 40 00 ldi.l r4, 0x4000
|
||||
10: 60 55 cc 1a ldi.s r5, 0x5 -> jmp r13
|
||||
Disassembly of section .data:
|
17
gas/testsuite/gas/d10v/instruction_packing-009.d
Normal file
17
gas/testsuite/gas/d10v/instruction_packing-009.d
Normal file
@ -0,0 +1,17 @@
|
||||
#objdump: -D
|
||||
#source: instruction_packing-007.s
|
||||
#as: -gstabs --no-gstabs-packing
|
||||
|
||||
.*: file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <foo>:
|
||||
0: e0 00 00 00 ldi.l r0, 0x0
|
||||
4: e0 10 10 00 ldi.l r1, 0x1000
|
||||
8: 20 22 de 00 ldi.s r2, 0x2 || nop
|
||||
c: 20 33 de 00 ldi.s r3, 0x3 || nop
|
||||
10: e0 40 40 00 ldi.l r4, 0x4000
|
||||
14: 20 55 de 00 ldi.s r5, 0x5 || nop
|
||||
18: 26 0d 5e 00 jmp r13 || nop
|
||||
Disassembly of section .data:
|
15
gas/testsuite/gas/d10v/instruction_packing-010.d
Normal file
15
gas/testsuite/gas/d10v/instruction_packing-010.d
Normal file
@ -0,0 +1,15 @@
|
||||
#objdump: -D
|
||||
#source: instruction_packing-007.s
|
||||
#as: -gstabs --no-gstabs-packing --gstabs-packing
|
||||
|
||||
.*: file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <foo>:
|
||||
0: e0 00 00 00 ldi.l r0, 0x0
|
||||
4: e0 10 10 00 ldi.l r1, 0x1000
|
||||
8: 60 22 c0 67 ldi.s r2, 0x2 -> ldi.s r3, 0x3
|
||||
c: e0 40 40 00 ldi.l r4, 0x4000
|
||||
10: 60 55 cc 1a ldi.s r5, 0x5 -> jmp r13
|
||||
Disassembly of section .data:
|
1611
gas/testsuite/gas/d10v/label-001.d
Normal file
1611
gas/testsuite/gas/d10v/label-001.d
Normal file
File diff suppressed because it is too large
Load Diff
3132
gas/testsuite/gas/d10v/label-001.s
Normal file
3132
gas/testsuite/gas/d10v/label-001.s
Normal file
File diff suppressed because it is too large
Load Diff
2
gas/testsuite/gas/d10v/warning-001.d
Normal file
2
gas/testsuite/gas/d10v/warning-001.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: warning-001.s
|
||||
#error : cr6 is a reserved control register
|
4
gas/testsuite/gas/d10v/warning-001.s
Normal file
4
gas/testsuite/gas/d10v/warning-001.s
Normal file
@ -0,0 +1,4 @@
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
mvfc r0,cr6
|
2
gas/testsuite/gas/d10v/warning-002.d
Normal file
2
gas/testsuite/gas/d10v/warning-002.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: warning-002.s
|
||||
#error : cr6 is a reserved control register
|
4
gas/testsuite/gas/d10v/warning-002.s
Normal file
4
gas/testsuite/gas/d10v/warning-002.s
Normal file
@ -0,0 +1,4 @@
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
mvtc r0,cr6
|
2
gas/testsuite/gas/d10v/warning-003.d
Normal file
2
gas/testsuite/gas/d10v/warning-003.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: warning-003.s
|
||||
#error : cr12 is a reserved control register
|
4
gas/testsuite/gas/d10v/warning-003.s
Normal file
4
gas/testsuite/gas/d10v/warning-003.s
Normal file
@ -0,0 +1,4 @@
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
mvfc r0,cr12
|
2
gas/testsuite/gas/d10v/warning-004.d
Normal file
2
gas/testsuite/gas/d10v/warning-004.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: warning-004.s
|
||||
#error : cr12 is a reserved control register
|
4
gas/testsuite/gas/d10v/warning-004.s
Normal file
4
gas/testsuite/gas/d10v/warning-004.s
Normal file
@ -0,0 +1,4 @@
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
mvtc r0,cr12
|
2
gas/testsuite/gas/d10v/warning-005.d
Normal file
2
gas/testsuite/gas/d10v/warning-005.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: warning-005.s
|
||||
#error : Warning: cr13 is a reserved control register
|
4
gas/testsuite/gas/d10v/warning-005.s
Normal file
4
gas/testsuite/gas/d10v/warning-005.s
Normal file
@ -0,0 +1,4 @@
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
mvfc r0,cr13
|
2
gas/testsuite/gas/d10v/warning-006.d
Normal file
2
gas/testsuite/gas/d10v/warning-006.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: warning-006.s
|
||||
#error : cr13 is a reserved control register
|
4
gas/testsuite/gas/d10v/warning-006.s
Normal file
4
gas/testsuite/gas/d10v/warning-006.s
Normal file
@ -0,0 +1,4 @@
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
mvtc r0,cr13
|
2
gas/testsuite/gas/d10v/warning-007.d
Normal file
2
gas/testsuite/gas/d10v/warning-007.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: warning-007.s
|
||||
#error : Warning: cr13 is a reserved control register
|
4
gas/testsuite/gas/d10v/warning-007.s
Normal file
4
gas/testsuite/gas/d10v/warning-007.s
Normal file
@ -0,0 +1,4 @@
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
mvfc r0,cr13
|
2
gas/testsuite/gas/d10v/warning-008.d
Normal file
2
gas/testsuite/gas/d10v/warning-008.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: warning-008.s
|
||||
#error : cr15 is a reserved control register
|
5
gas/testsuite/gas/d10v/warning-008.s
Normal file
5
gas/testsuite/gas/d10v/warning-008.s
Normal file
@ -0,0 +1,5 @@
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
mvfc r0,cr15
|
||||
|
2
gas/testsuite/gas/d10v/warning-009.d
Normal file
2
gas/testsuite/gas/d10v/warning-009.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: warning-009.s
|
||||
#error : cr15 is a reserved control register
|
5
gas/testsuite/gas/d10v/warning-009.s
Normal file
5
gas/testsuite/gas/d10v/warning-009.s
Normal file
@ -0,0 +1,5 @@
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
mvtc r0,cr15
|
||||
|
2
gas/testsuite/gas/d10v/warning-010.d
Normal file
2
gas/testsuite/gas/d10v/warning-010.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: warning-010.s
|
||||
#error : cr4 is a reserved control register
|
6
gas/testsuite/gas/d10v/warning-010.s
Normal file
6
gas/testsuite/gas/d10v/warning-010.s
Normal file
@ -0,0 +1,6 @@
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
mvfc r0,cr4
|
||||
|
||||
|
2
gas/testsuite/gas/d10v/warning-011.d
Normal file
2
gas/testsuite/gas/d10v/warning-011.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: warning-011.s
|
||||
#error : cr4 is a reserved control register
|
7
gas/testsuite/gas/d10v/warning-011.s
Normal file
7
gas/testsuite/gas/d10v/warning-011.s
Normal file
@ -0,0 +1,7 @@
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
mvtc r0,dpsw ;; cr4=dpsw
|
||||
|
||||
|
||||
|
2
gas/testsuite/gas/d10v/warning-012.d
Normal file
2
gas/testsuite/gas/d10v/warning-012.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: warning-012.s
|
||||
#error : cr5 is a reserved control register
|
6
gas/testsuite/gas/d10v/warning-012.s
Normal file
6
gas/testsuite/gas/d10v/warning-012.s
Normal file
@ -0,0 +1,6 @@
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
mvfc r0,cr5
|
||||
|
||||
|
2
gas/testsuite/gas/d10v/warning-013.d
Normal file
2
gas/testsuite/gas/d10v/warning-013.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: warning-013.s
|
||||
#error : cr5 is a reserved control register
|
6
gas/testsuite/gas/d10v/warning-013.s
Normal file
6
gas/testsuite/gas/d10v/warning-013.s
Normal file
@ -0,0 +1,6 @@
|
||||
.text
|
||||
.global foo
|
||||
foo:
|
||||
mvtc r0,dpc ;; cr5=dpc
|
||||
|
||||
|
11
gas/testsuite/gas/d10v/warning-014.d
Normal file
11
gas/testsuite/gas/d10v/warning-014.d
Normal file
@ -0,0 +1,11 @@
|
||||
#objdump: -D
|
||||
#source: warning-014.s
|
||||
|
||||
.*: file format elf32-d10v
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <foo>:
|
||||
0: 30 12 8e 2d ld r1, @r2+ || btsti r1, 0x6
|
||||
4: 01 12 0e 2d add r1, r2 || btsti r1, 0x6
|
||||
Disassembly of section .data:
|
8
gas/testsuite/gas/d10v/warning-014.s
Normal file
8
gas/testsuite/gas/d10v/warning-014.s
Normal file
@ -0,0 +1,8 @@
|
||||
; btsti does not modify r1
|
||||
; There is no resource conflict so no warning.
|
||||
|
||||
.text
|
||||
foo:
|
||||
ld r1,@r2+ || btsti r1 , #6
|
||||
add r1,r2 || btsti r1 , #6
|
||||
|
2
gas/testsuite/gas/d10v/warning-015.d
Normal file
2
gas/testsuite/gas/d10v/warning-015.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: instruction_packing-002.s
|
||||
#error : Warning: resource conflict \(C flag\)
|
2
gas/testsuite/gas/d10v/warning-016.d
Normal file
2
gas/testsuite/gas/d10v/warning-016.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: warning-016.s
|
||||
#error : Warning: resource conflict \(F flag\)
|
6
gas/testsuite/gas/d10v/warning-016.s
Normal file
6
gas/testsuite/gas/d10v/warning-016.s
Normal file
@ -0,0 +1,6 @@
|
||||
;; F flag conflict
|
||||
|
||||
.text
|
||||
foo:
|
||||
cmpeqi r0,#0x0 || cmpeqi r1,#0x1
|
||||
|
2
gas/testsuite/gas/d10v/warning-017.d
Normal file
2
gas/testsuite/gas/d10v/warning-017.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: warning-017.s
|
||||
#error : Warning: resource conflict \(C flag\)
|
6
gas/testsuite/gas/d10v/warning-017.s
Normal file
6
gas/testsuite/gas/d10v/warning-017.s
Normal file
@ -0,0 +1,6 @@
|
||||
;; C flag conflict
|
||||
|
||||
.text
|
||||
foo:
|
||||
add r0,r1 || add r2,r3
|
||||
|
2
gas/testsuite/gas/d10v/warning-018.d
Normal file
2
gas/testsuite/gas/d10v/warning-018.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: warning-018.s
|
||||
#error : Warning: resource conflict \(C flag\)
|
6
gas/testsuite/gas/d10v/warning-018.s
Normal file
6
gas/testsuite/gas/d10v/warning-018.s
Normal file
@ -0,0 +1,6 @@
|
||||
;; C flag conflict
|
||||
|
||||
.text
|
||||
foo:
|
||||
sub r0,r1 || sub r2,r3
|
||||
|
2
gas/testsuite/gas/d10v/warning-019.d
Normal file
2
gas/testsuite/gas/d10v/warning-019.d
Normal file
@ -0,0 +1,2 @@
|
||||
#source: warning-019.s
|
||||
#error : Warning: resource conflict \(R0\)
|
6
gas/testsuite/gas/d10v/warning-019.s
Normal file
6
gas/testsuite/gas/d10v/warning-019.s
Normal file
@ -0,0 +1,6 @@
|
||||
;; Dest reg conflict
|
||||
|
||||
.text
|
||||
foo:
|
||||
add r0,r1 || mv r0,r2
|
||||
|
@ -233,6 +233,11 @@ proc gas_init { args } {
|
||||
# Assemble the file SOURCE.s. If omitted, this defaults to FILE.s.
|
||||
# This is useful if several .d files want to share a .s file.
|
||||
#
|
||||
# error: REGEX
|
||||
# An error with message matching REGEX must be emitted for the test
|
||||
# to pass. The PROG, objdump, nm and objcopy options have no
|
||||
# meaning and need not supplied if this is present.
|
||||
#
|
||||
# Each option may occur at most once.
|
||||
#
|
||||
# After the option lines come regexp lines. `run_dump_test' calls
|
||||
@ -267,6 +272,7 @@ proc run_dump_test { name } {
|
||||
set opts(PROG) {}
|
||||
set opts(source) {}
|
||||
set opts(stderr) {}
|
||||
set opts(error) {}
|
||||
|
||||
foreach i $opt_array {
|
||||
set opt_name [lindex $i 0]
|
||||
@ -299,6 +305,10 @@ proc run_dump_test { name } {
|
||||
unresolved $subdir/$name
|
||||
return }
|
||||
}
|
||||
} elseif { $opts(error) != "" } {
|
||||
# It's meaningless to require an output-testing method when we
|
||||
# expect an error. For simplicity, we fake an arbitrary method.
|
||||
set program "nm"
|
||||
} else {
|
||||
# Guess which program to run, by seeing which option was specified.
|
||||
set program ""
|
||||
@ -343,6 +353,14 @@ proc run_dump_test { name } {
|
||||
if { $opts(stderr) == "" } then {
|
||||
send_log "$comp_output\n"
|
||||
verbose "$comp_output" 3
|
||||
|
||||
if { $opts(error) != "" } {
|
||||
verbose -log "failed with: <$comp_output>, expected: <$opts(error)>"
|
||||
if [regexp $opts(error) $comp_output] {
|
||||
pass $testname
|
||||
return
|
||||
}
|
||||
}
|
||||
fail $testname
|
||||
return
|
||||
} else {
|
||||
@ -359,6 +377,13 @@ proc run_dump_test { name } {
|
||||
send_log "wrote pruned stderr to dump.stderr\n"
|
||||
verbose "wrote pruned stderr to dump.stderr" 3
|
||||
if { [regexp_diff "dump.stderr" "$stderrfile"] } then {
|
||||
if { $opts(error) != "" } {
|
||||
verbose -log "failed with: <$comp_output>, expected: <$opts(error)>"
|
||||
if [regexp $opts(error) $comp_output] {
|
||||
pass $testname
|
||||
return
|
||||
}
|
||||
}
|
||||
fail $testname
|
||||
verbose "pruned stderr is [file_contents "dump.stderr"]" 2
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user