diff options
author | Michael Snyder <msnyder@vmware.com> | 2003-12-05 01:59:55 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2003-12-05 01:59:55 +0000 |
commit | 88da98f3d4f49910317f92e6bbae8e4b43acd685 (patch) | |
tree | bc658859f5d12838097ea7dd36268007b1c2684c /gas/testsuite | |
parent | b74b6d0b9f1e7fa82b548ac6122726eb825be96d (diff) | |
download | gdb-88da98f3d4f49910317f92e6bbae8e4b43acd685.zip gdb-88da98f3d4f49910317f92e6bbae8e4b43acd685.tar.gz gdb-88da98f3d4f49910317f92e6bbae8e4b43acd685.tar.bz2 |
2003-12-03 Alexandre Oliva <aoliva@redhat.com>
* config/tc-sh.c: Add support for sh4a and no-fpu variants,
with appropriate additions to md_show_usage.
* testsuite/gas/sh/basic.exp: Call tests for sh4a.
* testsuite/gas/sh/{err-sh4a-fp.s, err-sh4a.s,
err-sh4al-dsp.s, sh4a-dsp.d, sh4a-dsp.s, sh4a-fp.d,
sh4a-fp.s, sh4a.d, sh4a.s, sh4al-dsp.d, sh4al-dsp.s:
New files, tests for sh4a and related variants.
* doc/c-sh.texi: Document new -isa options.
* doc/c-sh64.texi: Ditto.
* NEWS: Mention new support for sh4a.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/sh/basic.exp | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/sh/err-sh4a-fp.s | 15 | ||||
-rw-r--r-- | gas/testsuite/gas/sh/err-sh4a.s | 29 | ||||
-rw-r--r-- | gas/testsuite/gas/sh/err-sh4al-dsp.s | 20 | ||||
-rw-r--r-- | gas/testsuite/gas/sh/sh4a-dsp.d | 40 | ||||
-rw-r--r-- | gas/testsuite/gas/sh/sh4a-dsp.s | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/sh/sh4a-fp.d | 15 | ||||
-rw-r--r-- | gas/testsuite/gas/sh/sh4a-fp.s | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/sh/sh4a.d | 27 | ||||
-rw-r--r-- | gas/testsuite/gas/sh/sh4a.s | 28 | ||||
-rw-r--r-- | gas/testsuite/gas/sh/sh4al-dsp.d | 104 | ||||
-rw-r--r-- | gas/testsuite/gas/sh/sh4al-dsp.s | 104 |
12 files changed, 442 insertions, 1 deletions
diff --git a/gas/testsuite/gas/sh/basic.exp b/gas/testsuite/gas/sh/basic.exp index cbb1bb9..1fab0cc 100644 --- a/gas/testsuite/gas/sh/basic.exp +++ b/gas/testsuite/gas/sh/basic.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1995, 1996, 1997, 2002 Free Software Foundation, Inc. +# Copyright (C) 1995, 1996, 1997, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -140,6 +140,12 @@ if [istarget sh*-*-*] then { } if {[istarget sh*-*elf] || [istarget sh*-linux*]} then { + run_dump_test "sh4a" + run_dump_test "sh4a-fp" + + run_dump_test "sh4a-dsp" + run_dump_test "sh4al-dsp" + run_dump_test "pic" # Test TLS. diff --git a/gas/testsuite/gas/sh/err-sh4a-fp.s b/gas/testsuite/gas/sh/err-sh4a-fp.s new file mode 100644 index 0000000..d15736c --- /dev/null +++ b/gas/testsuite/gas/sh/err-sh4a-fp.s @@ -0,0 +1,15 @@ +! { dg-do assemble } + + .text + .p2align 2 + + fpchg fpul ! { dg-error "excess operands" } + + fsrra fr1, fr2 ! { dg-error "excess operands" } + fsrra ! { dg-error "invalid operands|missing operand" } + fsrra fpul ! { dg-error "invalid operands" } + fsrra dr0, dr2 ! { dg-error "invalid operands" } + + fsca dr0, fpul ! { dg-error "invalid operands" } + fsca fpul, fr0 ! { dg-error "invalid operands" } + fsca fpul ! { dg-error "invalid operands|missing operand" } diff --git a/gas/testsuite/gas/sh/err-sh4a.s b/gas/testsuite/gas/sh/err-sh4a.s new file mode 100644 index 0000000..6e5965d --- /dev/null +++ b/gas/testsuite/gas/sh/err-sh4a.s @@ -0,0 +1,29 @@ +! { dg-do assemble } + + .text + .p2align 2 + + movli.l @r7,r13 ! { dg-error "invalid operands" } + movco.l r1,@r0 ! { dg-error "invalid operands" } + + movli.l r0,@r0 ! { dg-error "invalid operands" } + movco.l @r0,r0 ! { dg-error "invalid operands" } + + movli.l r1 ! { dg-error "invalid operands|missing operand" } + movco.l r0 ! { dg-error "invalid operands|missing operand" } + + movli.l @r1,r0,r2 ! { dg-error "excess operands" } + movco.l r0,@r1,r2 ! { dg-error "excess operands" } + + movua.l @r0,r1 ! { dg-error "invalid operands" } + movua.l @r0,r1,r2 ! { dg-error "invalid operands" } + movua.l @r1+ ! { dg-error "invalid operands|missing operand" } + movua.l r0,@r1 ! { dg-error "invalid operands" } + movua.l @(r0,r1),r2 ! { dg-error "invalid operands" } + movua.l @-r5,r1 ! { dg-error "invalid operands" } + + icbi r0 ! { dg-error "invalid operands" } + + prefi r7 ! { dg-error "invalid operands" } + + synco r0 ! { dg-error "excess operands" } diff --git a/gas/testsuite/gas/sh/err-sh4al-dsp.s b/gas/testsuite/gas/sh/err-sh4al-dsp.s new file mode 100644 index 0000000..ec2338a --- /dev/null +++ b/gas/testsuite/gas/sh/err-sh4al-dsp.s @@ -0,0 +1,20 @@ +! { dg-do assemble } +! { dg-options "-dsp" } + + .text + .p2align 2 + + ldrc a0 ! { dg-error "invalid operand" } + + movx.w @r3,x0 ! { dg-error "invalid operand" } + movx.w @r0,x0 movy.w a0,@r7+ ! { dg-error "requires nopy" } + movy.w a0,@r2+ movx.w @r4,x0 ! { dg-error "requires nopx" } + movx.w @r4,x0 movy.w a0,@r3+ ! { dg-error "combined with non-nopx" } + movy.w a0,@r6+ movx.w @r1,x0 ! { dg-error "combined with non-nopy" } + movx.l @r5,x1 movx.w @r0,x0 ! { dg-error "multiple movx" } + movx.l @r1+,y0 nopx ! { dg-error "multiple movx" } + movy.w @r7,y1 movy.l @r2,y0 ! { dg-error "multiple movy" } + movy.l @r3+,x0 nopy ! { dg-error "multiple movy" } + + dct pclr x0 pmuls a1,x0,m0 ! { dg-error "combined with pmuls" } + pclr a0 pmuls x1,y1,a0 ! { dg-warning "register is same" } diff --git a/gas/testsuite/gas/sh/sh4a-dsp.d b/gas/testsuite/gas/sh/sh4a-dsp.d new file mode 100644 index 0000000..73d7e8d --- /dev/null +++ b/gas/testsuite/gas/sh/sh4a-dsp.d @@ -0,0 +1,40 @@ +#as: -dsp +#objdump: -fdr --prefix-addresses --show-raw-insn +#name: SH4al-dsp constructs shared with sh4a (and sh4) + +.*: file format elf.*sh.* +architecture: sh4a-nofpu, flags 0x00000010: +HAS_SYMS +start address 0x00000000 + +Disassembly of section \.text: +0x00000000 01 63 movli\.l @r1,r0 +0x00000002 00 73 movco\.l r0,@r0 +0x00000004 06 63 movli\.l @r6,r0 +0x00000006 03 73 movco\.l r0,@r3 +0x00000008 0a 63 movli\.l @r10,r0 +0x0000000a 0c 73 movco\.l r0,@r12 +0x0000000c 40 a9 movua\.l @r0,r0 +0x0000000e 4d a9 movua\.l @r13,r0 +0x00000010 47 a9 movua\.l @r7,r0 +0x00000012 45 e9 movua\.l @r5\+,r0 +0x00000014 42 e9 movua\.l @r2\+,r0 +0x00000016 4b e9 movua\.l @r11\+,r0 +0x00000018 04 e3 icbi @r4 +0x0000001a 0f e3 icbi @r15 +0x0000001c 02 e3 icbi @r2 +0x0000001e 05 d3 prefi @r5 +0x00000020 0a d3 prefi @r10 +0x00000022 00 ab synco +0x00000024 45 fa ldc r5,dbr +0x00000026 4a f6 ldc.l @r10\+,dbr +0x00000028 0b 3a stc sgr,r11 +0x0000002a 49 32 stc.l sgr,@-r9 +0x0000002c 02 fa stc dbr,r2 +0x0000002e 46 f2 stc.l dbr,@-r6 +0x00000030 03 c3 movca.l r0,@r3 +0x00000032 0c 93 ocbi @r12 +0x00000034 07 a3 ocbp @r7 +0x00000036 0d b3 ocbwb @r13 +0x00000038 0e 83 pref @r14 +0x0000003a 00 09 nop diff --git a/gas/testsuite/gas/sh/sh4a-dsp.s b/gas/testsuite/gas/sh/sh4a-dsp.s new file mode 100644 index 0000000..b884c4b --- /dev/null +++ b/gas/testsuite/gas/sh/sh4a-dsp.s @@ -0,0 +1,42 @@ + .text + .p2align 2 + + movli.l @r1,r0 + movco.l r0,@r0 + + movli.l @r6,r0 + movco.l r0,@r3 + + movli.l @r10,r0 + movco.l r0,@r12 + + movua.l @r0,r0 + movua.l @r13,r0 + movua.l @r7,r0 + + movua.l @r5+,r0 + movua.l @r2+,r0 + movua.l @r11+,r0 + + icbi @r4 + icbi @r15 + icbi @r2 + + prefi @r5 + prefi @r10 + + synco + +# Instructions present in SH4 but not in SH3-DSP + ldc r5,dbr + ldc.l @r10+,dbr + stc sgr,r11 + stc.l sgr,@-r9 + stc dbr,r2 + stc.l dbr,@-r6 + + movca.l r0,@r3 + ocbi @r12 + ocbp @r7 + ocbwb @r13 + pref @r14 diff --git a/gas/testsuite/gas/sh/sh4a-fp.d b/gas/testsuite/gas/sh/sh4a-fp.d new file mode 100644 index 0000000..0605553 --- /dev/null +++ b/gas/testsuite/gas/sh/sh4a-fp.d @@ -0,0 +1,15 @@ +#objdump: -fdr --prefix-addresses --show-raw-insn +#name: SH4a FP constructs + +.*: file format elf.*sh.* +architecture: sh4a, flags 0x00000010: +HAS_SYMS +start address 0x00000000 + +Disassembly of section \.text: +0x00000000 f7 fd fpchg +0x00000002 f1 7d fsrra fr1 +0x00000004 f9 7d fsrra fr9 +0x00000006 f6 7d fsrra fr6 +0x00000008 f2 fd fsca fpul,dr2 +0x0000000a fc fd fsca fpul,dr12 diff --git a/gas/testsuite/gas/sh/sh4a-fp.s b/gas/testsuite/gas/sh/sh4a-fp.s new file mode 100644 index 0000000..f2c9682 --- /dev/null +++ b/gas/testsuite/gas/sh/sh4a-fp.s @@ -0,0 +1,11 @@ + .text + .p2align 2 + + fpchg + + fsrra fr1 + fsrra fr9 + fsrra fr6 + + fsca fpul, dr2 + fsca fpul, dr12 diff --git a/gas/testsuite/gas/sh/sh4a.d b/gas/testsuite/gas/sh/sh4a.d new file mode 100644 index 0000000..0cdbf33 --- /dev/null +++ b/gas/testsuite/gas/sh/sh4a.d @@ -0,0 +1,27 @@ +#objdump: -fdr --prefix-addresses --show-raw-insn +#name: SH4a non-FP constructs + +.*: file format elf.*sh.* +architecture: sh4a-nofpu, flags 0x00000010: +HAS_SYMS +start address 0x00000000 + +Disassembly of section \.text: +0x00000000 01 63 movli\.l @r1,r0 +0x00000002 00 73 movco\.l r0,@r0 +0x00000004 06 63 movli\.l @r6,r0 +0x00000006 03 73 movco\.l r0,@r3 +0x00000008 0a 63 movli\.l @r10,r0 +0x0000000a 0c 73 movco\.l r0,@r12 +0x0000000c 40 a9 movua\.l @r0,r0 +0x0000000e 4d a9 movua\.l @r13,r0 +0x00000010 47 a9 movua\.l @r7,r0 +0x00000012 45 e9 movua\.l @r5\+,r0 +0x00000014 42 e9 movua\.l @r2\+,r0 +0x00000016 4b e9 movua\.l @r11\+,r0 +0x00000018 04 e3 icbi @r4 +0x0000001a 0f e3 icbi @r15 +0x0000001c 02 e3 icbi @r2 +0x0000001e 05 d3 prefi @r5 +0x00000020 0a d3 prefi @r10 +0x00000022 00 ab synco diff --git a/gas/testsuite/gas/sh/sh4a.s b/gas/testsuite/gas/sh/sh4a.s new file mode 100644 index 0000000..51c2382 --- /dev/null +++ b/gas/testsuite/gas/sh/sh4a.s @@ -0,0 +1,28 @@ + .text + .p2align 2 + + movli.l @r1,r0 + movco.l r0,@r0 + + movli.l @r6,r0 + movco.l r0,@r3 + + movli.l @r10,r0 + movco.l r0,@r12 + + movua.l @r0,r0 + movua.l @r13,r0 + movua.l @r7,r0 + + movua.l @r5+,r0 + movua.l @r2+,r0 + movua.l @r11+,r0 + + icbi @r4 + icbi @r15 + icbi @r2 + + prefi @r5 + prefi @r10 + + synco diff --git a/gas/testsuite/gas/sh/sh4al-dsp.d b/gas/testsuite/gas/sh/sh4al-dsp.d new file mode 100644 index 0000000..d49abd2 --- /dev/null +++ b/gas/testsuite/gas/sh/sh4al-dsp.d @@ -0,0 +1,104 @@ +#as: -dsp +#objdump: -fdr --prefix-addresses --show-raw-insn +#name: SH4al DSP constructs + +.*: file format elf.*sh.* +architecture: sh4al-dsp, flags 0x00000010: +HAS_SYMS +start address 0x00000000 + +Disassembly of section \.text: +0x00000000 43 34 ldrc r3 +0x00000002 4c 34 ldrc r12 +0x00000004 8c 0a ldrc #10 +0x00000006 8c f3 ldrc #-13 +0x00000008 00 c8 setdmx +0x0000000a 00 98 setdmy +0x0000000c 00 88 clrdmxy + +0x0000000e f1 16 movx\.w @r4,x0 movy\.w a0,@r7\+ +0x00000010 f1 84 movx\.w @r0,x1 +0x00000012 f3 48 movx\.w @r1\+,y0 +0x00000014 f2 cc movx\.w @r5\+r8,y1 +0x00000016 f2 94 movx\.l @r5,x1 +0x00000018 f1 14 movx\.l @r0,x0 +0x0000001a f3 58 movx\.l @r1\+,y0 +0x0000001c f0 dc movx\.l @r4\+r8,y1 + +0x0000001e f0 2b movx\.w a0,@r4\+ movy\.w @r6\+r9,y0 +0x00000020 f3 64 movx\.w x0,@r1 +0x00000022 f1 a8 movx\.w a1,@r0\+ +0x00000024 f2 ec movx\.w x1,@r5\+r8 +0x00000026 f2 34 movx\.l a0,@r5 +0x00000028 f1 74 movx\.l x0,@r0 +0x0000002a f3 f8 movx\.l x1,@r1\+ +0x0000002c f0 bc movx\.l a1,@r4\+r8 + +0x0000002e f1 ed movx\.w a1,@r4\+r8 movy\.w @r7,y1 +0x00000030 f3 01 movy\.w @r3,y0 +0x00000032 f2 c2 movy\.w @r2\+,x1 +0x00000034 f0 83 movy\.w @r6\+r9,x0 +0x00000036 f0 61 movy\.l @r6,y1 +0x00000038 f2 21 movy\.l @r2,y0 +0x0000003a f3 a2 movy\.l @r3\+,x0 +0x0000003c f1 e3 movy\.l @r7\+r9,x1 + +0x0000003e f2 de movx\.w @r5\+r8,x1 movy\.w a1,@r6\+ +0x00000040 f2 d1 movy\.w y1,@r2 +0x00000042 f3 12 movy\.w a0,@r3\+ +0x00000044 f1 93 movy\.w y0,@r7\+r9 +0x00000046 f1 71 movy\.l a1,@r7 +0x00000048 f3 b1 movy\.l y0,@r3 +0x0000004a f2 f2 movy\.l y1,@r2\+ +0x0000004c f0 33 movy\.l a0,@r6\+r9 + +0x0000004e f8 00 88 47 pabs x1,a0 +0x00000052 f8 00 a8 0e pabs y0,m1 +0x00000056 f8 00 8a dc dct pabs a1,m0 +0x0000005a f8 00 8a 19 dct pabs x0,x1 +0x0000005e f8 00 8b 9b dcf pabs a0,y1 +0x00000062 f8 00 8b 57 dcf pabs x1,a0 +0x00000066 f8 00 aa 58 dct pabs y1,x0 +0x0000006a f8 00 aa 6e dct pabs m0,m1 +0x0000006e f8 00 ab 7a dcf pabs m1,y0 +0x00000072 f8 00 ab 45 dcf pabs y0,a1 +0x00000076 f8 00 4e 00 pmuls a1,x0,m0 +0x0000007a f8 00 4b 04 pmuls y0,a1,m1 +0x0000007e f8 00 8d 07 pclr a0 +0x00000082 f8 00 8e 05 dct pclr a1 +0x00000086 f8 00 4e 10 pclr x0 pmuls a1,x0,m0 +0x0000008a f8 00 40 1b pclr a1 pmuls x0,y0,a0 +0x0000008e f8 00 45 1e pclr a0 pmuls x1,y1,a1 +0x00000092 f8 00 4b 15 pclr y0 pmuls y0,a1,m1 +0x00000096 f8 00 a1 a8 psub a0,m0,x0 +0x0000009a f8 00 85 79 psub m1,x1,x1 +0x0000009e f8 00 85 8a psub y0,a0,y0 +0x000000a2 f8 00 a2 db dct psub a1,y1,y1 +0x000000a6 f8 00 86 67 dct psub m0,x1,a0 +0x000000aa f8 00 86 95 dct psub y1,a0,a1 +0x000000ae f8 00 a3 7c dcf psub x1,m1,m0 +0x000000b2 f8 00 87 4e dcf psub y0,x1,m1 +0x000000b6 f8 00 87 b5 dcf psub m1,a0,a1 +0x000000ba f8 00 9d de pswap a1,m1 +0x000000be f8 00 9d 17 pswap x0,a0 +0x000000c2 f8 00 bd 7a pswap m1,y0 +0x000000c6 f8 00 bd 49 pswap y0,x1 +0x000000ca f8 00 9e 9b dct pswap a0,y1 +0x000000ce f8 00 9e 58 dct pswap x1,x0 +0x000000d2 f8 00 be 55 dct pswap y1,a1 +0x000000d6 f8 00 be 6c dct pswap m0,m0 +0x000000da f8 00 9f 97 dcf pswap a0,a0 +0x000000de f8 00 9f 5e dcf pswap x1,m1 +0x000000e2 f8 00 bf 78 dcf pswap m1,x0 +0x000000e6 f8 00 bf 4b dcf pswap y0,y1 +0x000000ea f8 00 98 85 prnd a0,a1 +0x000000ee f8 00 b8 1c prnd y1,m0 +0x000000f2 f8 00 9a d8 dct prnd a1,x0 +0x000000f6 f8 00 9a 1b dct prnd x0,y1 +0x000000fa f8 00 ba 77 dct prnd m1,a0 +0x000000fe f8 00 ba 49 dct prnd y0,x1 +0x00000102 f8 00 9b 9a dcf prnd a0,y0 +0x00000106 f8 00 9b 5e dcf prnd x1,m1 +0x0000010a f8 00 bb 57 dcf prnd y1,a0 +0x0000010e f8 00 bb 65 dcf prnd m0,a1 +0x00000112 00 09 nop diff --git a/gas/testsuite/gas/sh/sh4al-dsp.s b/gas/testsuite/gas/sh/sh4al-dsp.s new file mode 100644 index 0000000..4a326ea --- /dev/null +++ b/gas/testsuite/gas/sh/sh4al-dsp.s @@ -0,0 +1,104 @@ + .text + .p2align 2 + + ldrc r3 + ldrc r12 + ldrc #10 + ldrc #243 + setdmx + setdmy + clrdmxy + + movx.w @r4,x0 movy.w a0,@r7+ + movx.w @r0,x1 + movx.w @r1+,y0 nopy +nopy movx.w @r5+r8,y1 + + movx.l @r5,x1 + movx.l @r0,x0 + movx.l @r1+,y0 nopy +nopy movx.l @r4+r8,y1 + + movx.w a0,@r4+ movy.w @r6+r9,y0 + movx.w x0,@r1 + movx.w a1,@r0+ nopy +nopy movx.w x1,@r5+r8 + + movx.l a0,@r5 + movx.l x0,@r0 + movx.l x1,@r1+ nopy +nopy movx.l a1,@r4+r8 + + movy.w @r7,y1 movx.w a1,@r4+r8 + movy.w @r3,y0 + movy.w @r2+,x1 nopx +nopx movy.w @r6+r9,x0 + + movy.l @r6,y1 + movy.l @r2,y0 + movy.l @r3+,x0 nopx +nopx movy.l @r7+r9,x1 + + movy.w a1,@r6+ movx.w @r5+r8,x1 + movy.w y1,@r2 + movy.w a0,@r3+ nopx +nopx movy.w y0,@r7+r9 + + movy.l a1,@r7 + movy.l y0,@r3 + movy.l y1,@r2+ nopx +nopx movy.l a0,@r6+r9 + + pabs x1,a0 + pabs y0,m1 + dct pabs a1,m0 + dct pabs x0,x1 + dcf pabs a0,y1 + dcf pabs x1,a0 + dct pabs y1,x0 + dct pabs m0,m1 + dcf pabs m1,y0 + dcf pabs y0,a1 + + pmuls a1,x0,m0 + pmuls y0,a1,m1 + pclr a0 + dct pclr a1 + pclr x0 pmuls a1,x0,m0 + pclr a1 pmuls x0,y0,a0 + pclr a0 pmuls x1,y1,a1 + pclr y0 pmuls y0,a1,m1 + + psub a0,m0,x0 + psub m1,x1,x1 + psub y0,a0,y0 + dct psub a1,y1,y1 + dct psub m0,x1,a0 + dct psub y1,a0,a1 + dcf psub x1,m1,m0 + dcf psub y0,x1,m1 + dcf psub m1,a0,a1 + + pswap a1,m1 + pswap x0,a0 + pswap m1,y0 + pswap y0,x1 + dct pswap a0,y1 + dct pswap x1,x0 + dct pswap y1,a1 + dct pswap m0,m0 + dcf pswap a0,a0 + dcf pswap x1,m1 + dcf pswap m1,x0 + dcf pswap y0,y1 + + prnd a0,a1 + prnd y1,m0 + dct prnd a1,x0 + dct prnd x0,y1 + dct prnd m1,a0 + dct prnd y0,x1 + dcf prnd a0,y0 + dcf prnd x1,m1 + dcf prnd y1,a0 + dcf prnd m0,a1 |