summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/gas/testsuite
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-09-04 17:50:20 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-09-04 17:50:20 +0000
commit4ba440a6e788da3a64fa29b782c37150a3f5cc18 (patch)
tree6ca9e3446a5c8dcc3673e0a1f34a58453df9f19d /gnu/usr.bin/binutils/gas/testsuite
parentf2ffb0ddad855456f20a67d1fc3838fb81d727be (diff)
Import of binutils, gas, ld & gprof from Cygnus 960904 tree
Diffstat (limited to 'gnu/usr.bin/binutils/gas/testsuite')
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/all/cofftag.d25
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/all/cofftag.s57
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/arm/arch4t.s21
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/arm/arm7t.d68
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/arm/arm7t.s79
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/arm/immed.s11
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/arm/inst.d168
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/arm/thumb.s185
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/addsubs.s25
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/bitops1s.s29
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/bitops2s.s23
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/bitops3s.s24
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/bitops4s.s29
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/branch.s10
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/branchh.s12
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/branchs.s12
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/cbranchs.s44
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/compares.s10
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/decimals.s6
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/divmuls.s12
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/extends.s8
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/incdecs.s14
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/logicals.s34
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/macs.s9
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/miscs.s41
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/movbs.s20
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/movls.s18
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/movws.s18
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/multiples.s10
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/pushpops.s8
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/rotsh.s11
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/rotshh.s27
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/h8300/rotshs.s51
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/m68k/pcrel.d88
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/m68k/pcrel.s59
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/div-ilocks.d117
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/mips/mul-ilocks.d81
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/sh/basic.exp87
-rw-r--r--gnu/usr.bin/binutils/gas/testsuite/gas/sh/fp.s45
39 files changed, 1596 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/all/cofftag.d b/gnu/usr.bin/binutils/gas/testsuite/gas/all/cofftag.d
new file mode 100644
index 00000000000..59898b621ed
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/all/cofftag.d
@@ -0,0 +1,25 @@
+#objdump: -t
+#name: cofftag
+
+.*: file format .*
+
+SYMBOL TABLE:
+\[ 0\]\(sec -2\)\(fl 0x00\)\(ty 0\)\(scl 103\) \(nx 1\) 0x0+0000 foo.c
+File
+\[ 2\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 6\) \(nx 0\) 0x0+0000 gcc2_compiled.
+\[ 3\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 6\) \(nx 0\) 0x0+0000 ___gnu_compiled_c
+\[ 4\]\(sec -2\)\(fl 0x00\)\(ty a\)\(scl 15\) \(nx 1\) 0x0+0000 _token
+AUX lnno 0 size 0x4 tagndx 0 endndx 10
+\[ 6\]\(sec -1\)\(fl 0x00\)\(ty b\)\(scl 16\) \(nx 0\) 0x0+0000 _operator
+\[ 7\]\(sec -1\)\(fl 0x00\)\(ty b\)\(scl 16\) \(nx 0\) 0x0+0001 _flags
+\[ 8\]\(sec -1\)\(fl 0x00\)\(ty 0\)\(scl 102\) \(nx 1\) 0x0+0004 .eos
+AUX lnno 0 size 0x4 tagndx 4
+\[ 10\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 3\) \(nx 1\) 0x[0-9a-f]+ .text
+AUX scnlen 0x[0-9a-f]+ nreloc 0 nlnno 0
+\[ 12\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 3\) \(nx 1\) 0x[0-9a-f]+ .data
+AUX scnlen 0x[0-9a-f]+ nreloc 0 nlnno 0
+\[ 14\]\(sec 3\)\(fl 0x00\)\(ty 0\)\(scl 3\) \(nx 1\) 0x[0-9a-f]+ .bss
+AUX scnlen 0x[0-9a-f]+ nreloc 0 nlnno 0
+\[ 16\]\(sec 2\)\(fl 0x00\)\(ty 2\)\(scl 2\) \(nx 0\) 0x0+0000 _token
+\[ 17\]\(sec 2\)\(fl 0x00\)\(ty a\)\(scl 2\) \(nx 1\) 0x[0-9a-f]+ _what
+AUX lnno 0 size 0x4 tagndx 4
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/all/cofftag.s b/gnu/usr.bin/binutils/gas/testsuite/gas/all/cofftag.s
new file mode 100644
index 00000000000..432aa9a8f9f
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/all/cofftag.s
@@ -0,0 +1,57 @@
+/* This file was compiled from this C source:
+ char token =0;
+ enum token {
+ operator,
+ flags
+ };
+
+ enum token what= operator;
+ */
+
+ .file "foo.c"
+gcc2_compiled.:
+___gnu_compiled_c:
+.globl _token
+.data
+_token:
+ .byte 0
+.text
+ .def _token
+ .scl 15
+ .type 012
+ .size 4
+ .endef
+ .def _operator
+ .val 0
+ .scl 16
+ .type 013
+ .endef
+ .def _flags
+ .val 1
+ .scl 16
+ .type 013
+ .endef
+ .def .eos
+ .val 4
+ .scl 102
+ .tag _token
+ .size 4
+ .endef
+.globl _what
+.data
+ .align 2
+_what:
+ .long 0
+.text
+ .def _token
+ .val _token
+ .scl 2
+ .type 02
+ .endef
+ .def _what
+ .val _what
+ .scl 2
+ .tag _token
+ .size 4
+ .type 012
+ .endef
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/arm/arch4t.s b/gnu/usr.bin/binutils/gas/testsuite/gas/arm/arch4t.s
new file mode 100644
index 00000000000..8d28f7f3ec1
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/arm/arch4t.s
@@ -0,0 +1,21 @@
+.text
+.align 0
+
+ bx r0
+ bxeq r1
+
+foo:
+ ldrh r3, foo
+ ldrsh r4, [r5]
+ ldrsb r4, [r1, r3]
+ ldrsh r1, [r4, r4]!
+ ldreqsb r1, [r5, -r3]
+ ldrneh r2, [r6], r7
+ ldrccsh r2, [r7], +r8
+ ldrsb r2, [r3, #255]
+ ldrsh r1, [r4, #-250]
+ ldrsb r1, [r5, #+240]
+
+ strh r2, bar
+ strneh r3, [r3]
+bar:
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/arm/arm7t.d b/gnu/usr.bin/binutils/gas/testsuite/gas/arm/arm7t.d
new file mode 100644
index 00000000000..92613f9dabf
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/arm/arm7t.d
@@ -0,0 +1,68 @@
+#objdump: -dr
+#name: ARM arm7t
+#as: -marm7t -EL
+
+# Test the halfword and signextend memory transfers:
+
+.*: +file format .*arm.*little
+
+Disassembly of section .text:
+00000000 <[^>]*> e1d100b0 ldrh r0, \[r1\]
+00000004 <[^>]*> e1f100b0 ldrh r0, \[r1\]!
+00000008 <[^>]*> e19100b2 ldrh r0, \[r1, r2\]
+0000000c <[^>]*> e1b100b2 ldrh r0, \[r1, r2\]!
+00000010 <[^>]*> e1d100bc ldrh r0, \[r1, #c\]
+00000014 <[^>]*> e1f100bc ldrh r0, \[r1, #c\]!
+00000018 <[^>]*> e15100bc ldrh r0, \[r1, -#c\]
+0000001c <[^>]*> e09100b2 ldrh r0, \[r1\], r2
+00000020 <[^>]*> e3a00cff mov r0, #ff00
+00000024 <[^>]*> e1df0bb4 ldrh r0, 000000e0 <\$\$lit_1>
+00000028 <[^>]*> e1df0abc ldrh r0, 000000dc <.L2>
+0000002c <[^>]*> e1c100b0 strh r0, \[r1\]
+00000030 <[^>]*> e1e100b0 strh r0, \[r1\]!
+00000034 <[^>]*> e18100b2 strh r0, \[r1, r2\]
+00000038 <[^>]*> e1a100b2 strh r0, \[r1, r2\]!
+0000003c <[^>]*> e1c100bc strh r0, \[r1, #c\]
+00000040 <[^>]*> e1e100bc strh r0, \[r1, #c\]!
+00000044 <[^>]*> e14100bc strh r0, \[r1, -#c\]
+00000048 <[^>]*> e08100b2 strh r0, \[r1\], r2
+0000004c <[^>]*> e1cf08b8 strh r0, 000000dc <.L2>
+00000050 <[^>]*> e1d100d0 ldrsb r0, \[r1\]
+00000054 <[^>]*> e1f100d0 ldrsb r0, \[r1\]!
+00000058 <[^>]*> e19100d2 ldrsb r0, \[r1, r2\]
+0000005c <[^>]*> e1b100d2 ldrsb r0, \[r1, r2\]!
+00000060 <[^>]*> e1d100dc ldrsb r0, \[r1, #c\]
+00000064 <[^>]*> e1f100dc ldrsb r0, \[r1, #c\]!
+00000068 <[^>]*> e15100dc ldrsb r0, \[r1, -#c\]
+0000006c <[^>]*> e09100d2 ldrsb r0, \[r1\], r2
+00000070 <[^>]*> e3a000de mov r0, #de
+00000074 <[^>]*> e1df06d0 ldrsb r0, 000000dc <.L2>
+00000078 <[^>]*> e1d100f0 ldrsh r0, \[r1\]
+0000007c <[^>]*> e1f100f0 ldrsh r0, \[r1\]!
+00000080 <[^>]*> e19100f2 ldrsh r0, \[r1, r2\]
+00000084 <[^>]*> e1b100f2 ldrsh r0, \[r1, r2\]!
+00000088 <[^>]*> e1d100fc ldrsh r0, \[r1, #c\]
+0000008c <[^>]*> e1f100fc ldrsh r0, \[r1, #c\]!
+00000090 <[^>]*> e15100fc ldrsh r0, \[r1, -#c\]
+00000094 <[^>]*> e09100f2 ldrsh r0, \[r1\], r2
+00000098 <[^>]*> e3a00cff mov r0, #ff00
+0000009c <[^>]*> e1df03fc ldrsh r0, 000000e0 <\$\$lit_1>
+000000a0 <[^>]*> e1df03f4 ldrsh r0, 000000dc <.L2>
+000000a4 <[^>]*> e19100b2 ldrh r0, \[r1, r2\]
+000000a8 <[^>]*> 119100b2 ldrneh r0, \[r1, r2\]
+000000ac <[^>]*> 819100b2 ldrhih r0, \[r1, r2\]
+000000b0 <[^>]*> b19100b2 ldrlth r0, \[r1, r2\]
+000000b4 <[^>]*> e19100f2 ldrsh r0, \[r1, r2\]
+000000b8 <[^>]*> 119100f2 ldrnesh r0, \[r1, r2\]
+000000bc <[^>]*> 819100f2 ldrhish r0, \[r1, r2\]
+000000c0 <[^>]*> b19100f2 ldrltsh r0, \[r1, r2\]
+000000c4 <[^>]*> e19100d2 ldrsb r0, \[r1, r2\]
+000000c8 <[^>]*> 119100d2 ldrnesb r0, \[r1, r2\]
+000000cc <[^>]*> 819100d2 ldrhisb r0, \[r1, r2\]
+000000d0 <[^>]*> b19100d2 ldrltsb r0, \[r1, r2\]
+000000d4 <[^>]*> e1df00f4 ldrsh r0, 000000e0 <\$\$lit_1>
+000000d8 <[^>]*> e1df00f4 ldrsh r0, 000000e4 <\$\$lit_1\+4>
+...
+[ ]*RELOC: 000000dc 32 .LC0
+000000e0 <[^>]*> 0000c0de .*
+000000e4 <[^>]*> 0000dead .*
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/arm/arm7t.s b/gnu/usr.bin/binutils/gas/testsuite/gas/arm/arm7t.s
new file mode 100644
index 00000000000..656e90e0330
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/arm/arm7t.s
@@ -0,0 +1,79 @@
+ .section .rdata
+ .align 0
+.LC0:
+ .ascii "some data\000"
+
+ .text
+ .align 0
+
+loadhalfwords:
+ ldrh r0, [r1]
+ ldrh r0, [r1]!
+ ldrh r0, [r1, r2]
+ ldrh r0, [r1, r2]!
+ ldrh r0, [r1,#0x0C]
+ ldrh r0, [r1,#0x0C]!
+ ldrh r0, [r1,#-0x0C]
+ ldrh r0, [r1], r2
+ ldrh r0, =0xFF00
+ ldrh r0, =0xC0DE
+ ldrh r0, .L2
+
+storehalfwords:
+ strh r0, [r1]
+ strh r0, [r1]!
+ strh r0, [r1, r2]
+ strh r0, [r1, r2]!
+ strh r0, [r1,#0x0C]
+ strh r0, [r1,#0x0C]!
+ strh r0, [r1,#-0x0C]
+ strh r0, [r1], r2
+ strh r0, .L2
+
+loadsignedbytes:
+ ldrsb r0, [r1]
+ ldrsb r0, [r1]!
+ ldrsb r0, [r1, r2]
+ ldrsb r0, [r1, r2]!
+ ldrsb r0, [r1,#0x0C]
+ ldrsb r0, [r1,#0x0C]!
+ ldrsb r0, [r1,#-0x0C]
+ ldrsb r0, [r1], r2
+ ldrsb r0, =0xDE
+ ldrsb r0, .L2
+
+loadsignedhalfwords:
+ ldrsh r0, [r1]
+ ldrsh r0, [r1]!
+ ldrsh r0, [r1, r2]
+ ldrsh r0, [r1, r2]!
+ ldrsh r0, [r1, #0x0C]
+ ldrsh r0, [r1, #0x0C]!
+ ldrsh r0, [r1, #-0x0C]
+ ldrsh r0, [r1], r2
+ ldrsh r0, =0xFF00
+ ldrsh r0, =0xC0DE
+ ldrsh r0, .L2
+
+misc:
+ ldralh r0, [r1, r2]
+ ldrneh r0, [r1, r2]
+ ldrhih r0, [r1, r2]
+ ldrlth r0, [r1, r2]
+
+ ldralsh r0, [r1, r2]
+ ldrnesh r0, [r1, r2]
+ ldrhish r0, [r1, r2]
+ ldrltsh r0, [r1, r2]
+
+ ldralsb r0, [r1, r2]
+ ldrnesb r0, [r1, r2]
+ ldrhisb r0, [r1, r2]
+ ldrltsb r0, [r1, r2]
+
+ ldrsh r0, =0xC0DE
+ ldrsh r0, =0xDEAD
+
+ .align
+.L2:
+ .word .LC0
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/arm/immed.s b/gnu/usr.bin/binutils/gas/testsuite/gas/arm/immed.s
new file mode 100644
index 00000000000..5d2092be18b
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/arm/immed.s
@@ -0,0 +1,11 @@
+@ Tests for complex immediate expressions - none of these need
+@ relocations
+ .text
+bar:
+ mov r0, #0
+ mov r0, #(. - bar - 8)
+ ldr r0, bar
+ ldr r0, [pc, # (bar - . -8)]
+ .space 4096
+ mov r0, #(. - bar - 8) & 0xff
+ ldr r0, [pc, # (bar - . -8) & 0xff]
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/arm/inst.d b/gnu/usr.bin/binutils/gas/testsuite/gas/arm/inst.d
new file mode 100644
index 00000000000..23c7f21f382
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/arm/inst.d
@@ -0,0 +1,168 @@
+#objdump: -dr
+#name: ARM basic instructions
+#as: -marm2 -EL
+
+# Test the standard ARM instructions:
+
+.*: +file format .*arm.*little
+
+Disassembly of section .text:
+00000000 <[^>]*> e3a00000 mov r0, #0
+00000004 <[^>]*> e1a01002 mov r1, r2
+00000008 <[^>]*> e1a03184 mov r3, r4, lsl #3
+0000000c <[^>]*> e1a05736 mov r5, r6, lsr r7
+00000010 <[^>]*> e1a08a59 mov r8, r9, asr sl
+00000014 <[^>]*> e1a0bd1c mov fp, ip, lsl sp
+00000018 <[^>]*> e1a0e06f mov lr, pc, rrx
+0000001c <[^>]*> e1a01002 mov r1, r2
+00000020 <[^>]*> 01a02003 moveq r2, r3
+00000024 <[^>]*> 11a04005 movne r4, r5
+00000028 <[^>]*> b1a06007 movlt r6, r7
+0000002c <[^>]*> a1a08009 movge r8, r9
+00000030 <[^>]*> d1a0a00b movle sl, fp
+00000034 <[^>]*> c1a0c00d movgt ip, sp
+00000038 <[^>]*> 31a01002 movcc r1, r2
+0000003c <[^>]*> 21a01003 movcs r1, r3
+00000040 <[^>]*> 41a03006 movmi r3, r6
+00000044 <[^>]*> 51a07009 movpl r7, r9
+00000048 <[^>]*> 61a01008 movvs r1, r8
+0000004c <[^>]*> 71a09fa1 movvc r9, r1, lsr #1f
+00000050 <[^>]*> 81a0800f movhi r8, pc
+00000054 <[^>]*> 91a0f00e movls pc, lr
+00000058 <[^>]*> 21a09008 movcs r9, r8
+0000005c <[^>]*> 31a01003 movcc r1, r3
+00000060 <[^>]*> e1b00008 movs r0, r8
+00000064 <[^>]*> 31b00007 movccs r0, r7
+00000068 <[^>]*> e281000a add r0, r1, #a
+0000006c <[^>]*> e0832004 add r2, r3, r4
+00000070 <[^>]*> e0865287 add r5, r6, r7, lsl #5
+00000074 <[^>]*> e0821113 add r1, r2, r3, lsl r1
+00000078 <[^>]*> e201000a and r0, r1, #a
+0000007c <[^>]*> e0032004 and r2, r3, r4
+00000080 <[^>]*> e0065287 and r5, r6, r7, lsl #5
+00000084 <[^>]*> e0021113 and r1, r2, r3, lsl r1
+00000088 <[^>]*> e221000a eor r0, r1, #a
+0000008c <[^>]*> e0232004 eor r2, r3, r4
+00000090 <[^>]*> e0265287 eor r5, r6, r7, lsl #5
+00000094 <[^>]*> e0221113 eor r1, r2, r3, lsl r1
+00000098 <[^>]*> e241000a sub r0, r1, #a
+0000009c <[^>]*> e0432004 sub r2, r3, r4
+000000a0 <[^>]*> e0465287 sub r5, r6, r7, lsl #5
+000000a4 <[^>]*> e0421113 sub r1, r2, r3, lsl r1
+000000a8 <[^>]*> e2a1000a adc r0, r1, #a
+000000ac <[^>]*> e0a32004 adc r2, r3, r4
+000000b0 <[^>]*> e0a65287 adc r5, r6, r7, lsl #5
+000000b4 <[^>]*> e0a21113 adc r1, r2, r3, lsl r1
+000000b8 <[^>]*> e2c1000a sbc r0, r1, #a
+000000bc <[^>]*> e0c32004 sbc r2, r3, r4
+000000c0 <[^>]*> e0c65287 sbc r5, r6, r7, lsl #5
+000000c4 <[^>]*> e0c21113 sbc r1, r2, r3, lsl r1
+000000c8 <[^>]*> e261000a rsb r0, r1, #a
+000000cc <[^>]*> e0632004 rsb r2, r3, r4
+000000d0 <[^>]*> e0665287 rsb r5, r6, r7, lsl #5
+000000d4 <[^>]*> e0621113 rsb r1, r2, r3, lsl r1
+000000d8 <[^>]*> e2e1000a rsc r0, r1, #a
+000000dc <[^>]*> e0e32004 rsc r2, r3, r4
+000000e0 <[^>]*> e0e65287 rsc r5, r6, r7, lsl #5
+000000e4 <[^>]*> e0e21113 rsc r1, r2, r3, lsl r1
+000000e8 <[^>]*> e381000a orr r0, r1, #a
+000000ec <[^>]*> e1832004 orr r2, r3, r4
+000000f0 <[^>]*> e1865287 orr r5, r6, r7, lsl #5
+000000f4 <[^>]*> e1821113 orr r1, r2, r3, lsl r1
+000000f8 <[^>]*> e3c1000a bic r0, r1, #a
+000000fc <[^>]*> e1c32004 bic r2, r3, r4
+00000100 <[^>]*> e1c65287 bic r5, r6, r7, lsl #5
+00000104 <[^>]*> e1c21113 bic r1, r2, r3, lsl r1
+00000108 <[^>]*> e3e0000a mvn r0, #a
+0000010c <[^>]*> e1e02004 mvn r2, r4
+00000110 <[^>]*> e1e05287 mvn r5, r7, lsl #5
+00000114 <[^>]*> e1e01113 mvn r1, r3, lsl r1
+00000118 <[^>]*> e310000a tst r0, #a
+0000011c <[^>]*> e1120004 tst r2, r4
+00000120 <[^>]*> e1150287 tst r5, r7, lsl #5
+00000124 <[^>]*> e1110113 tst r1, r3, lsl r1
+00000128 <[^>]*> e330000a teq r0, #a
+0000012c <[^>]*> e1320004 teq r2, r4
+00000130 <[^>]*> e1350287 teq r5, r7, lsl #5
+00000134 <[^>]*> e1310113 teq r1, r3, lsl r1
+00000138 <[^>]*> e350000a cmp r0, #a
+0000013c <[^>]*> e1520004 cmp r2, r4
+00000140 <[^>]*> e1550287 cmp r5, r7, lsl #5
+00000144 <[^>]*> e1510113 cmp r1, r3, lsl r1
+00000148 <[^>]*> e370000a cmn r0, #a
+0000014c <[^>]*> e1720004 cmn r2, r4
+00000150 <[^>]*> e1750287 cmn r5, r7, lsl #5
+00000154 <[^>]*> e1710113 cmn r1, r3, lsl r1
+00000158 <[^>]*> e330f00a teqp r0, #a
+0000015c <[^>]*> e132f004 teqp r2, r4
+00000160 <[^>]*> e135f287 teqp r5, r7, lsl #5
+00000164 <[^>]*> e131f113 teqp r1, r3, lsl r1
+00000168 <[^>]*> e370f00a cmnp r0, #a
+0000016c <[^>]*> e172f004 cmnp r2, r4
+00000170 <[^>]*> e175f287 cmnp r5, r7, lsl #5
+00000174 <[^>]*> e171f113 cmnp r1, r3, lsl r1
+00000178 <[^>]*> e350f00a cmpp r0, #a
+0000017c <[^>]*> e152f004 cmpp r2, r4
+00000180 <[^>]*> e155f287 cmpp r5, r7, lsl #5
+00000184 <[^>]*> e151f113 cmpp r1, r3, lsl r1
+00000188 <[^>]*> e310f00a tstp r0, #a
+0000018c <[^>]*> e112f004 tstp r2, r4
+00000190 <[^>]*> e115f287 tstp r5, r7, lsl #5
+00000194 <[^>]*> e111f113 tstp r1, r3, lsl r1
+00000198 <[^>]*> e0000291 mul r0, r1, r2
+0000019c <[^>]*> e0110392 muls r1, r2, r3
+000001a0 <[^>]*> 10000091 mulne r0, r1, r0
+000001a4 <[^>]*> 90190798 mullss r9, r8, r7
+000001a8 <[^>]*> e021ba99 mla r1, r9, sl, fp
+000001ac <[^>]*> e033c994 mlas r3, r4, r9, ip
+000001b0 <[^>]*> b029d798 mlalt r9, r8, r7, sp
+000001b4 <[^>]*> a034e391 mlages r4, r1, r3, lr
+000001b8 <[^>]*> e5910000 ldr r0, \[r1\]
+000001bc <[^>]*> e7911002 ldr r1, \[r1, r2\]
+000001c0 <[^>]*> e7b32004 ldr r2, \[r3, r4\]!
+000001c4 <[^>]*> e5922020 ldr r2, \[r2, #20\]
+000001c8 <[^>]*> e7932424 ldr r2, \[r3, r4, lsr #8\]
+000001cc <[^>]*> 07b54484 ldreq r4, \[r5, r4, lsl #9\]!
+000001d0 <[^>]*> 14954006 ldrne r4, \[r5\], #6
+000001d4 <[^>]*> e6b21003 ldrt r1, \[r2\], r3
+000001d8 <[^>]*> e6942425 ldr r2, \[r4\], r5, lsr #8
+000001dc <[^>]*> e51f0008 ldr r0, 000001dc <[^>]*>
+000001e0 <[^>]*> e5d43000 ldrb r3, \[r4\]
+000001e4 <[^>]*> 14f85000 ldrnebt r5, \[r8\]
+000001e8 <[^>]*> e5810000 str r0, \[r1\]
+000001ec <[^>]*> e7811002 str r1, \[r1, r2\]
+000001f0 <[^>]*> e7a33004 str r3, \[r3, r4\]!
+000001f4 <[^>]*> e5822020 str r2, \[r2, #20\]
+000001f8 <[^>]*> e7832424 str r2, \[r3, r4, lsr #8\]
+000001fc <[^>]*> 07a54484 streq r4, \[r5, r4, lsl #9\]!
+00000200 <[^>]*> 14854006 strne r4, \[r5\], #6
+00000204 <[^>]*> e6821003 str r1, \[r2\], r3
+00000208 <[^>]*> e6a42425 strt r2, \[r4\], r5, lsr #8
+0000020c <[^>]*> e50f1004 str r1, 00000210 <[^>]*>
+00000210 <[^>]*> e5c71000 strb r1, \[r7\]
+00000214 <[^>]*> e4e02000 strbt r2, \[r0\]
+00000218 <[^>]*> e8900002 ldmia r0, {r1}
+0000021c <[^>]*> 09920038 ldmeqib r2, {r3, r4, r5}
+00000220 <[^>]*> e853ffff ldmda r3, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, sp, lr, pc}\^
+00000224 <[^>]*> e93b05ff ldmdb fp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, sl}
+00000228 <[^>]*> e99100f7 ldmib r1, {r0, r1, r2, r4, r5, r6, r7}
+0000022c <[^>]*> e89201f8 ldmia r2, {r3, r4, r5, r6, r7, r8}
+00000230 <[^>]*> e9130003 ldmdb r3, {r0, r1}
+00000234 <[^>]*> e8740300 ldmda r4!, {r8, r9}\^
+00000238 <[^>]*> e8800002 stmia r0, {r1}
+0000023c <[^>]*> 09820038 stmeqib r2, {r3, r4, r5}
+00000240 <[^>]*> e843ffff stmda r3, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, sp, lr, pc}\^
+00000244 <[^>]*> e92a05ff stmdb sl!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, sl}
+00000248 <[^>]*> e8010007 stmda r1, {r0, r1, r2}
+0000024c <[^>]*> e9020018 stmdb r2, {r3, r4}
+00000250 <[^>]*> e8830003 stmia r3, {r0, r1}
+00000254 <[^>]*> e9e40300 stmib r4!, {r8, r9}\^
+00000258 <[^>]*> ef123456 swi 0x00123456
+0000025c <[^>]*> 2f000033 swics 0x00000033
+00000260 <[^>]*> ebfffffe bl 00000260 <[^>]*>
+[ ]*RELOC: 00000260 ARM26 _wombat
+00000264 <[^>]*> 5bffffe9 blpl 00000210 <bar>
+00000268 <[^>]*> eafffffe b 00000268 <[^>]*>
+[ ]*RELOC: 00000268 ARM26 _wibble
+0000026c <[^>]*> dafffffe ble 0000026c <[^>]*>
+[ ]*RELOC: 0000026c ARM26 testerfunc
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/arm/thumb.s b/gnu/usr.bin/binutils/gas/testsuite/gas/arm/thumb.s
new file mode 100644
index 00000000000..095befbcde8
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/arm/thumb.s
@@ -0,0 +1,185 @@
+ .text
+ .code 16
+foo:
+ lsl r2, r1, #3
+ lsr r3, r4, #31
+wibble/data:
+ asr r7, r0, #5
+
+ lsl r1, r2, #0
+ lsr r3, r4, #0
+ asr r4, r5, #0
+
+ lsr r6, r7, #32
+ asr r0, r1, #32
+
+ add r1, r2, r3
+ add r2, r4, #2
+ sub r3, r5, r7
+ sub r2, r4, #7
+
+ mov r4, #255
+ cmp r3, #250
+ add r6, #123
+ sub r5, #128
+
+ and r3, r5
+ eor r4, r6
+ lsl r1, r0
+ lsr r2, r3
+ asr r4, r6
+ adc r5, r7
+ sbc r0, r4
+ ror r1, r4
+ tst r2, r5
+ neg r1, r1
+ cmp r2, r3
+ cmn r1, r4
+ orr r0, r3
+ mul r4, r5
+ bic r5, r7
+ mvn r5, r5
+
+ add r1, r13
+ add r12, r2
+ add r9, r9
+ cmp r1, r14
+ cmp r8, r0
+ cmp r12, r14
+ mov r0, r9
+ mov r9, r4
+ mov r8, r8
+ bx r7
+ bx r8
+ .align 0
+ bx pc
+
+ ldr r3, [pc, #128]
+ ldr r4, bar
+
+ str r0, [r1, r2]
+ strb r1, [r2, r4]
+ ldr r5, [r6, r7]
+ ldrb r2, [r4, r5]
+
+ .align 0
+bar:
+ strh r1, [r2, r3]
+ ldrh r3, [r4, r0]
+ ldsb r1, [r6, r7]
+ ldsh r2, [r0, r5]
+
+ str r3, [r3, #124]
+ ldr r1, [r4, #124]
+ ldr r5, [r5]
+ strb r1, [r5, #31]
+ strb r1, [r4, #5]
+ strb r2, [r6]
+
+ strh r4, [r5, #62]
+ ldrh r5, [r0, #4]
+ ldrh r3, [r2]
+
+ str r3, [r13, #1020]
+ ldr r1, [r13, #44]
+ ldr r2, [r13]
+
+ add r7, r15, #1020
+ add r4, r13, #512
+
+ add r13, #268
+ add r13, #-104
+ sub r13, #268
+ sub r13, #-108
+
+ push {r0, r1, r2, r4}
+ push {r0, r3-r7, lr}
+ pop {r3, r4, r7}
+ pop {r0-r7, r15}
+
+ stmia r3!, {r0, r1, r4-r7}
+ ldmia r0!, {r1-r7}
+
+ beq bar
+ bne bar
+ bcs bar
+ bcc bar
+ bmi bar
+ bpl bar
+ bvs bar
+ bvc bar
+ bhi bar
+ bls bar
+ bge bar
+ bgt bar
+ blt bar
+ bgt bar
+ ble bar
+ bhi bar
+ blo bar
+ bul bar
+
+close:
+ lsl r4, r5, #near - close
+near:
+ add r2, r3, #near - close
+
+ add sp, sp, #127 << 2
+ sub sp, sp, #127 << 2
+ add r0, sp, #255 << 2
+ add r0, pc, #255 << 2
+
+ add sp, sp, #bar - foo
+ sub sp, sp, #bar - foo
+ add r0, sp, #bar - foo
+ add r0, pc, #bar - foo
+
+ add r1, #bar - foo
+ mov r6, #bar - foo
+ cmp r7, #bar - foo
+
+ nop
+ nop
+
+ .arm
+localbar:
+ b localbar
+ b wombat
+ bl localbar
+ bl wombat
+
+ bx r0
+ swi 0x123456
+
+ .thumb
+
+ adr r0, forwardonly
+
+ b foo
+ b wombat
+ bl foo
+ bl wombat
+
+ bx r0
+
+ swi 0xff
+ .align 0
+forwardonly:
+ beq wombat
+ bne wombat
+ bcs wombat
+ bcc wombat
+ bmi wombat
+ bpl wombat
+ bvs wombat
+ bvc wombat
+ bhi wombat
+ bls wombat
+ bge wombat
+ bgt wombat
+ blt wombat
+ bgt wombat
+ ble wombat
+ bhi wombat
+ blo wombat
+ bul wombat
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/addsubs.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/addsubs.s
new file mode 100644
index 00000000000..b0b3699e458
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/addsubs.s
@@ -0,0 +1,25 @@
+ .h8300s
+ .text
+h8300s_add_sub:
+ add.b #16,r1l
+ add.b r1h,r1l
+ add.w #32,r1
+ add.w r1,r2
+ add.l #64,er1
+ add.l er1,er2
+ adds #1,er4
+ adds #2,er5
+ adds #4,er6
+ addx r0l,r1l
+ addx #16,r2h
+ sub.b r0l,r1l
+ sub.w #16,r1
+ sub.w r0,r1
+ sub.l #64,er1
+ sub.l er1,er2
+ subs #1,er4
+ subs #2,er5
+ subs #4,er6
+ subx r0l,r1l
+ subx #16,r2h
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/bitops1s.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/bitops1s.s
new file mode 100644
index 00000000000..c6599d41a9a
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/bitops1s.s
@@ -0,0 +1,29 @@
+ .h8300s
+ .text
+h8300s_bit_ops_1:
+ band #0,r0l
+ band #0,@er0
+ band #0,@64:8
+ band #0,@128:16
+ band #0,@65536:32
+ bclr #0,r0l
+ bclr #0,@er0
+ bclr #0,@64:8
+ bclr #0,@128:16
+ bclr #0,@65536:32
+ bclr r1l,r0l
+ bclr r1l,@er0
+ bclr r1l,@64:8
+ bclr r1l,@128:16
+ bclr r1l,@65536:32
+ biand #0,r0l
+ biand #0,@er0
+ biand #0,@64:8
+ biand #0,@128:16
+ biand #0,@65536:32
+ bild #0,r0l
+ bild #0,@er0
+ bild #0,@64:8
+ bild #0,@128:16
+ bild #0,@65536:32
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/bitops2s.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/bitops2s.s
new file mode 100644
index 00000000000..94705201f0d
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/bitops2s.s
@@ -0,0 +1,23 @@
+ .h8300s
+ .text
+h8300s_bit_ops_2:
+ bior #0,r0l
+ bior #0,@er0
+ bior #0,@64:8
+ bior #0,@128:16
+ bior #0,@65536:32
+ bist #0,r0l
+ bist #0,@er0
+ bist #0,@64:8
+ bist #0,@128:16
+ bist #0,@65536:32
+ bixor #0,r0l
+ bixor #0,@er0
+ bixor #0,@64:8
+ bixor #0,@128:16
+ bixor #0,@65536:32
+ bld #0,r0l
+ bld #0,@er0
+ bld #0,@64:8
+ bld #0,@128:16
+ bld #0,@65536:32
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/bitops3s.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/bitops3s.s
new file mode 100644
index 00000000000..7c64e06d783
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/bitops3s.s
@@ -0,0 +1,24 @@
+ .h8300s
+ .text
+h8300s_bit_ops_3:
+ bnot #0,r0l
+ bnot #0,@er0
+ bnot #0,@64:8
+ bnot #0,@128:16
+ bnot #0,@65536:32
+ bnot r1l,r0l
+ bnot r1l,@er0
+ bnot r1l,@64:8
+ bnot r1l,@128:16
+ bnot r1l,@65536:32
+ bset #0,r0l
+ bset #0,@er0
+ bset #0,@64:8
+ bset #0,@128:16
+ bset #0,@65536:32
+ bset r1l,r0l
+ bset r1l,@er0
+ bset r1l,@64:8
+ bset r1l,@128:16
+ bset r1l,@65536:32
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/bitops4s.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/bitops4s.s
new file mode 100644
index 00000000000..e8f47b6dc21
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/bitops4s.s
@@ -0,0 +1,29 @@
+ .h8300s
+ .text
+h8300s_bit_ops_4:
+ bor #0,r0l
+ bor #0,@er0
+ bor #0,@64:8
+ bor #0,@128:16
+ bor #0,@65536:32
+ bst #0,r0l
+ bst #0,@er0
+ bst #0,@64:8
+ bst #0,@128:16
+ bst #0,@65536:32
+ btst #0,r0l
+ btst #0,@er0
+ btst #0,@64:8
+ btst #0,@128:16
+ btst #0,@65536:32
+ btst r1l,r0l
+ btst r1l,@er0
+ btst r1l,@64:8
+ btst r1l,@128:16
+ btst r1l,@65536:32
+ bxor #0,r0l
+ bxor #0,@er0
+ bxor #0,@64:8
+ bxor #0,@128:16
+ bxor #0,@65536:32
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/branch.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/branch.s
new file mode 100644
index 00000000000..25806153c42
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/branch.s
@@ -0,0 +1,10 @@
+ .text
+h8300_branches:
+ bsr h8300_branches
+ jmp h8300_branches
+ jmp @r0
+ jmp @@16:8
+ jsr h8300_branches
+ jsr @r0
+ jsr @@16:8
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/branchh.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/branchh.s
new file mode 100644
index 00000000000..7cbc62f3e2b
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/branchh.s
@@ -0,0 +1,12 @@
+ .h8300h
+ .text
+h8300h_branches:
+ bsr h8300h_branches:8
+ bsr h8300h_branches:16
+ jmp h8300h_branches
+ jmp @er0
+ jmp @@16:8
+ jsr h8300h_branches
+ jsr @er0
+ jsr @@16:8
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/branchs.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/branchs.s
new file mode 100644
index 00000000000..8f33e17967a
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/branchs.s
@@ -0,0 +1,12 @@
+ .h8300s
+ .text
+h8300s_branches:
+ bsr h8300s_branches:8
+ bsr h8300s_branches:16
+ jmp h8300s_branches
+ jmp @er0
+ jmp @@16:8
+ jsr h8300s_branches
+ jsr @er0
+ jsr @@16:8
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/cbranchs.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/cbranchs.s
new file mode 100644
index 00000000000..14222ea7721
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/cbranchs.s
@@ -0,0 +1,44 @@
+ .text
+ .h8300s
+h8300s_cbranch:
+ bra h8300s_cbranch:8
+ bt h8300s_cbranch:8
+ brn h8300s_cbranch:8
+ bf h8300s_cbranch:8
+ bhi h8300s_cbranch:8
+ bls h8300s_cbranch:8
+ bcc h8300s_cbranch:8
+ bhs h8300s_cbranch:8
+ bcs h8300s_cbranch:8
+ blo h8300s_cbranch:8
+ bne h8300s_cbranch:8
+ beq h8300s_cbranch:8
+ bvc h8300s_cbranch:8
+ bvs h8300s_cbranch:8
+ bpl h8300s_cbranch:8
+ bmi h8300s_cbranch:8
+ bge h8300s_cbranch:8
+ blt h8300s_cbranch:8
+ bgt h8300s_cbranch:8
+ ble h8300s_cbranch:8
+ bra h8300s_cbranch:16
+ bt h8300s_cbranch:16
+ brn h8300s_cbranch:16
+ bf h8300s_cbranch:16
+ bhi h8300s_cbranch:16
+ bls h8300s_cbranch:16
+ bcc h8300s_cbranch:16
+ bhs h8300s_cbranch:16
+ bcs h8300s_cbranch:16
+ blo h8300s_cbranch:16
+ bne h8300s_cbranch:16
+ beq h8300s_cbranch:16
+ bvc h8300s_cbranch:16
+ bvs h8300s_cbranch:16
+ bpl h8300s_cbranch:16
+ bmi h8300s_cbranch:16
+ bge h8300s_cbranch:16
+ blt h8300s_cbranch:16
+ bgt h8300s_cbranch:16
+ ble h8300s_cbranch:16
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/compares.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/compares.s
new file mode 100644
index 00000000000..e23f3fe8e94
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/compares.s
@@ -0,0 +1,10 @@
+ .h8300s
+ .text
+h8300s_cmp:
+ cmp.b #0,r0l
+ cmp.b r0h,r0l
+ cmp.w #32,r0
+ cmp.w r0,r1
+ cmp.l #64,er0
+ cmp.l er0,er1
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/decimals.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/decimals.s
new file mode 100644
index 00000000000..b7802fcf1ac
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/decimals.s
@@ -0,0 +1,6 @@
+ .h8300s
+ .text
+h8300s_decimal:
+ daa r0l
+ das r0l
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/divmuls.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/divmuls.s
new file mode 100644
index 00000000000..db60f8f49aa
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/divmuls.s
@@ -0,0 +1,12 @@
+ .h8300h
+ .text
+h8300h_div_mul:
+ divxu.b r0l,r1
+ divxu.w r0,er1
+ divxs.b r0l,r1
+ divxs.w r0,er1
+ mulxu.b r0l,r1
+ mulxu.w r0,er1
+ mulxs.b r0l,r1
+ mulxs.w r0,er1
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/extends.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/extends.s
new file mode 100644
index 00000000000..a26e9ba70a3
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/extends.s
@@ -0,0 +1,8 @@
+ .h8300s
+ .text
+h8300s_extend:
+ exts.w r0
+ exts.l er0
+ extu.w r0
+ extu.l er0
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/incdecs.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/incdecs.s
new file mode 100644
index 00000000000..2345708b023
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/incdecs.s
@@ -0,0 +1,14 @@
+ .h8300s
+ .text
+h8300s_incdec:
+ dec.b r0l
+ dec.w #1,r0
+ dec.w #2,r0
+ dec.l #1,er0
+ dec.l #2,er0
+ inc.b r0l
+ inc.w #1,r0
+ inc.w #2,r0
+ inc.l #1,er0
+ inc.l #2,er0
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/logicals.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/logicals.s
new file mode 100644
index 00000000000..c3c4cbaaf0f
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/logicals.s
@@ -0,0 +1,34 @@
+ .h8300s
+ .text
+h8300s_logical:
+ and.b #16,r1l
+ and.b r1l,r1h
+ and.w #32,r1
+ and.w r1,r1
+ and.l #64,er1
+ and.l er1,er1
+ andc #16,ccr
+ andc #16,exr
+ or.b #16,r0l
+ or.b r1l,r0l
+ or.w #32,r1
+ or.w r1,r1
+ or.l #64,er1
+ or.l er1,er1
+ orc #16,ccr
+ orc #16,exr
+ xor.b #16,r0l
+ xor.b r0l,r1l
+ xor.w #32,r1
+ xor.w r1,r1
+ xor.l #64,er1
+ xor.l er1,er1
+ xorc #16,ccr
+ xorc #16,exr
+ neg.b r0l
+ neg.w r0
+ neg.l er0
+ not.b r0l
+ not.w r0
+ not.l er0
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/macs.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/macs.s
new file mode 100644
index 00000000000..3623ea36117
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/macs.s
@@ -0,0 +1,9 @@
+ .h8300s
+ .text
+h8300s_mac:
+ clrmac
+ ldmac er0,mach
+ ldmac er1,macl
+ mac @er0+,@er1+
+
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/miscs.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/miscs.s
new file mode 100644
index 00000000000..d37a1770c75
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/miscs.s
@@ -0,0 +1,41 @@
+ .h8300s
+ .text
+h8300s_misc:
+ eepmov.b
+ eepmov.w
+ ldc.b #0,ccr
+ ldc.b r0l,ccr
+ ldc.b #0,exr
+ ldc.b r0l,exr
+ ldc.w @er0,ccr
+ ldc.w @(16:16,er0),ccr
+ ldc.w @(32:32,er0),ccr
+ ldc.w @er0+,ccr
+ ldc.w @h8300s_misc:16,ccr
+ ldc.w @h8300s_misc:32,ccr
+ ldc.w @er0,exr
+ ldc.w @(16:16,er0),exr
+ ldc.w @(32:32,er0),exr
+ ldc.w @er0+,exr
+ ldc.w @h8300s_misc:16,exr
+ ldc.w @h8300s_misc:32,exr
+; movfpe 16:16,r0l
+; movtpe r0l,16:16
+ nop
+ rte
+ rts
+ sleep
+ stc.b ccr,r0l
+ stc.b exr,r0l
+ stc.w ccr,@er0
+ stc.w ccr,@(16:16,er0)
+ stc.w ccr,@(32:32,er0)
+ stc.w ccr,@-er0
+ stc.w ccr,@h8300s_misc:16
+ stc.w ccr,@h8300s_misc:32
+ stc.w exr,@er0
+ stc.w exr,@(16:16,er0)
+ stc.w exr,@(32:32,er0)
+ stc.w exr,@-er0
+ stc.w exr,@h8300s_misc:16
+ stc.w exr,@h8300s_misc:32
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/movbs.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/movbs.s
new file mode 100644
index 00000000000..925002c811a
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/movbs.s
@@ -0,0 +1,20 @@
+ .h8300s
+ .text
+h8300s_movb:
+ mov.b r0l,r1l
+ mov.b #16,r0l
+ mov.b @er1,r0l
+ mov.b @(16:16,er1),r0l
+ mov.b @(32:32,er1),r0l
+ mov.b @er1+,r0l
+ mov.b @16:8,r0l
+ mov.b @h8300s_movb:16,r0l
+ mov.b @h8300s_movb:32,r0l
+ mov.b r0l,@er1
+ mov.b r0l,@(16:16,er1)
+ mov.b r0l,@(32:32,er1)
+ mov.b r0l,@-er1
+ mov.b r0l,@16:8
+ mov.b r0l,@h8300s_movb:16
+ mov.b r0l,@h8300s_movb:32
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/movls.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/movls.s
new file mode 100644
index 00000000000..46437677389
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/movls.s
@@ -0,0 +1,18 @@
+ .h8300s
+ .text
+h8300s_movl:
+ mov.l er0,er1
+ mov.l #64,er0
+ mov.l @er1,er0
+ mov.l @(16:16,er1),er0
+ mov.l @(32:32,er1),er0
+ mov.l @er1+,er0
+ mov.l @h8300s_movl:16,er0
+ mov.l @h8300s_movl:32,er0
+ mov.l er0,@er1
+ mov.l er0,@(16:16,er1)
+ mov.l er0,@(32:32,er1)
+ mov.l er0,@-er1
+ mov.l er0,@h8300s_movl:16
+ mov.l er0,@h8300s_movl:32
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/movws.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/movws.s
new file mode 100644
index 00000000000..a4f21df2542
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/movws.s
@@ -0,0 +1,18 @@
+ .h8300s
+ .text
+h8300s_movw:
+ mov.w r0,r1
+ mov.w #16,r0
+ mov.w @er1,r0
+ mov.w @(16:16,er1),r0
+ mov.w @(32:32,er1),r0
+ mov.w @er1+,r0
+ mov.w @h8300s_movw:16,r0
+ mov.w @h8300s_movw:32,r0
+ mov.w r0,@er1
+ mov.w r0,@(16:16,er1)
+ mov.w r0,@(32:32,er1)
+ mov.w r0,@-er1
+ mov.w r0,@h8300s_movw:16
+ mov.w r0,@h8300s_movw:32
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/multiples.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/multiples.s
new file mode 100644
index 00000000000..52079b6d219
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/multiples.s
@@ -0,0 +1,10 @@
+ .h8300s
+ .text
+h8300s_multiple:
+ ldm.l @sp+,er0-er1
+ ldm.l @sp+,er0-er2
+ ldm.l @sp+,er0-er3
+ stm.l er0-er1,@-sp
+ stm.l er0-er2,@-sp
+ stm.l er0-er3,@-sp
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/pushpops.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/pushpops.s
new file mode 100644
index 00000000000..741df04ecc5
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/pushpops.s
@@ -0,0 +1,8 @@
+ .h8300s
+ .text
+h8300s_push_pop:
+ pop.w r0
+ pop.l er0
+ push.w r0
+ push.l er0
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/rotsh.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/rotsh.s
new file mode 100644
index 00000000000..a9aa87df95e
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/rotsh.s
@@ -0,0 +1,11 @@
+ .text
+h8300_rotate_shift:
+ rotl r0l
+ rotr r0l
+ rotxl r0l
+ rotxr r0l
+ shal r0l
+ shar r0l
+ shll r0l
+ shlr r0l
+
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/rotshh.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/rotshh.s
new file mode 100644
index 00000000000..c7abe40a28f
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/rotshh.s
@@ -0,0 +1,27 @@
+ .h8300h
+ .text
+h8300h_rotate_shift:
+ rotl.b r0l
+ rotl.w r0
+ rotl.l er0
+ rotr.b r0l
+ rotr.w r0
+ rotr.l er0
+ rotxl.b r0l
+ rotxl.w r0
+ rotxl.l er0
+ rotxr.b r0l
+ rotxr.w r0
+ rotxr.l er0
+ shal.b r0l
+ shal.w r0
+ shal.l er0
+ shar.b r0l
+ shar.w r0
+ shar.l er0
+ shll.b r0l
+ shll.w r0
+ shll.l er0
+ shlr.b r0l
+ shlr.w r0
+ shlr.l er0
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/rotshs.s b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/rotshs.s
new file mode 100644
index 00000000000..36c41cb59c5
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/h8300/rotshs.s
@@ -0,0 +1,51 @@
+ .h8300s
+ .text
+h8300s_rotate_shift:
+ rotl.b r0l
+ rotl.b #2,r0l
+ rotl.w r0
+ rotl.w #2,r0
+ rotl.l er0
+ rotl.l #2,er0
+ rotr.b r0l
+ rotr.b #2,r0l
+ rotr.w r0
+ rotr.w #2,r0
+ rotr.l er0
+ rotr.l #2,er0
+ rotxl.b r0l
+ rotxl.b #2,r0l
+ rotxl.w r0
+ rotxl.w #2,r0
+ rotxl.l er0
+ rotxl.l #2,er0
+ rotxr.b r0l
+ rotxr.b #2,r0l
+ rotxr.w r0
+ rotxr.w #2,r0
+ rotxr.l er0
+ rotxr.l #2,er0
+ shal.b r0l
+ shal.b #2,r0l
+ shal.w r0
+ shal.w #2,r0
+ shal.l er0
+ shal.l #2,er0
+ shar.b r0l
+ shar.b #2,r0l
+ shar.w r0
+ shar.w #2,r0
+ shar.l er0
+ shar.l #2,er0
+ shll.b r0l
+ shll.b #2,r0l
+ shll.w r0
+ shll.w #2,r0
+ shll.l er0
+ shll.l #2,er0
+ shlr.b r0l
+ shlr.b #2,r0l
+ shlr.w r0
+ shlr.w #2,r0
+ shlr.l er0
+ shlr.l #2,er0
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/m68k/pcrel.d b/gnu/usr.bin/binutils/gas/testsuite/gas/m68k/pcrel.d
new file mode 100644
index 00000000000..c5ced5bf2e1
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/m68k/pcrel.d
@@ -0,0 +1,88 @@
+#name: pcrel
+#objdump: -drs -j .text
+
+.*: file format .*
+
+Contents of section .text:
+ 0000 4e714e71 4cfa0300 fffa4cfa 0300fff4 NqNqL.....L.....
+ 0010 4cfb0300 08ee41fa ffea41fa ffe641fa L.....A...A...A.
+ 0020 ff6241fb 08de41fb 08da41fb 08d641fb .bA...A...A...A.
+ 0030 0920ffd2 41fb0920 ffcc41fb 0930ffff . ..A.. ..A..0..
+ 0040 ffc641fb 0930ffff ffbe4e71 61ff0000 ..A..0....Nqa...
+ 0050 00586100 0052614e 614c4e71 41f90000 .Xa..RaNaLNqA...
+ 0060 00(a6|00)41fa 004241fa 00be41fb 083a41fb ..A..BA...A..:A.
+ 0070 083641fb 083241fb 0920002e 41fb0920 .6A..2A.. ..A..
+ 0080 002841fb 09300000 002241fb 09300000 .\(A..0..."A..0..
+ 0090 001a41fb 09300000 001241fb 0920000a ..A..0....A.. ..
+ 00a0 41fb0804 4e714e71 4e7141fb 088041fb A...NqNqNqA...A.
+ 00b0 0920ff7f 41fb0920 800041fb 0930ffff . ..A.. ..A..0..
+ 00c0 7fff4e71 41fb087f 41fb0920 008041fb ..NqA...A.. ..A.
+ 00d0 09207fff 41fb0930 00008000 4e7141fa . ..A..0....NqA.
+ 00e0 800041fb 0170ffff 7fff4e71 41fa7fff ..A..p....NqA...
+ 00f0 41fb0170 00008000 4e7141fb 0170(ffff|0000) A..p....NqA..p..
+ 0100 (ff04|0000)41fb 0930(ffff|0000) (fefc|0000)4e71 41f90000 ..A..0....NqA...
+ 0110 0000............................... ................
+Disassembly of section \.text:
+0+0000 <.*> nop
+0+0002 <lbl_b> nop
+0+0004 <lbl_b\+2> moveml 0+0002 <lbl_b>,%a0-%a1
+0+000a <lbl_b\+8> moveml 0+0002 <lbl_b>,%a0-%a1
+0+0010 <lbl_b\+e> moveml %pc@\(0+02 <lbl_b>,%d0:l\),%a0-%a1
+0+0016 <lbl_b\+14> lea 0+0002 <lbl_b>,%a0
+0+001a <lbl_b\+18> lea 0+0002 <lbl_b>,%a0
+0+001e <lbl_b\+1c> lea f+ff82 <.*>,%a0
+0+0022 <lbl_b\+20> lea %pc@\(0+02 <lbl_b>,%d0:l\),%a0
+0+0026 <lbl_b\+24> lea %pc@\(0+02 <lbl_b>,%d0:l\),%a0
+0+002a <lbl_b\+28> lea %pc@\(0+02 <lbl_b>,%d0:l\),%a0
+0+002e <lbl_b\+2c> lea %pc@\(0+02 <lbl_b>,%d0:l\),%a0
+0+0034 <lbl_b\+32> lea %pc@\(0+02 <lbl_b>,%d0:l\),%a0
+0+003a <lbl_b\+38> lea %pc@\(0+02 <lbl_b>,%d0:l\),%a0
+0+0042 <lbl_b\+40> lea %pc@\(0+02 <lbl_b>,%d0:l\),%a0
+0+004a <lbl_b\+48> nop
+0+004c <lbl_b\+4a> bsrl 0+00a6 <lbl_a>
+0+0052 <lbl_b\+50> bsrw 0+00a6 <lbl_a>
+0+0056 <lbl_b\+54> bsrs 0+00a6 <lbl_a>
+0+0058 <lbl_b\+56> bsrs 0+00a6 <lbl_a>
+0+005a <lbl_b\+58> nop
+0+005c <lbl_b\+5a> lea (0+00a6 <lbl_a>|0+0 <.*>),%a0
+ RELOC: 0+005e (32 \.text|R_68K_32 \.text\+0x0+00a6)
+0+0062 <lbl_b\+60> lea 0+00a6 <lbl_a>,%a0
+0+0066 <lbl_b\+64> lea 0+0126 <.*>,%a0
+0+006a <lbl_b\+68> lea %pc@\(0+a6 <lbl_a>,%d0:l\),%a0
+0+006e <lbl_b\+6c> lea %pc@\(0+a6 <lbl_a>,%d0:l\),%a0
+0+0072 <lbl_b\+70> lea %pc@\(0+a6 <lbl_a>,%d0:l\),%a0
+0+0076 <lbl_b\+74> lea %pc@\(0+a6 <lbl_a>,%d0:l\),%a0
+0+007c <lbl_b\+7a> lea %pc@\(0+a6 <lbl_a>,%d0:l\),%a0
+0+0082 <lbl_b\+80> lea %pc@\(0+a6 <lbl_a>,%d0:l\),%a0
+0+008a <lbl_b\+88> lea %pc@\(0+a6 <lbl_a>,%d0:l\),%a0
+0+0092 <lbl_b\+90> lea %pc@\(0+a6 <lbl_a>,%d0:l\),%a0
+0+009a <lbl_b\+98> lea %pc@\(0+a6 <lbl_a>,%d0:l\),%a0
+0+00a0 <lbl_b\+9e> lea %pc@\(0+a6 <lbl_a>,%d0:l\),%a0
+0+00a4 <lbl_b\+a2> nop
+0+00a6 <lbl_a> nop
+0+00a8 <lbl_a\+2> nop
+0+00aa <lbl_a\+4> lea %pc@\(0+2c <lbl_b\+2a>,%d0:l\),%a0
+0+00ae <lbl_a\+8> lea %pc@\(0+2f <lbl_b\+2d>,%d0:l\),%a0
+0+00b4 <lbl_a\+e> lea %pc@\(f+80b6 <.*>,%d0:l\),%a0
+0+00ba <lbl_a\+14> lea %pc@\(f+80bb <.*>,%d0:l\),%a0
+0+00c2 <lbl_a\+1c> nop
+0+00c4 <lbl_a\+1e> lea %pc@\(0+145 <.*>,%d0:l\),%a0
+0+00c8 <lbl_a\+22> lea %pc@\(0+14a <.*>,%d0:l\),%a0
+0+00ce <lbl_a\+28> lea %pc@\(0+80cf <.*>,%d0:l\),%a0
+0+00d4 <lbl_a\+2e> lea %pc@\(0+80d6 <.*>,%d0:l\),%a0
+0+00dc <lbl_a\+36> nop
+0+00de <lbl_a\+38> lea f+80e0 <.*>,%a0
+0+00e2 <lbl_a\+3c> lea %pc@\(f+80e3 <.*>\),%a0
+0+00ea <lbl_a\+44> nop
+0+00ec <lbl_a\+46> lea 0+80ed <.*>,%a0
+0+00f0 <lbl_a\+4a> lea %pc@\(0+80f2 <.*>\),%a0
+0+00f8 <lbl_a\+52> nop
+0+00fa <lbl_a\+54> lea %pc@\((0+0 <.*>|0+0fc <lbl_a\+56>)\),%a0
+ RELOC: 0+00fe (DISP32 undef|R_68K_PC32 undef\+0x0+02)
+0+0102 <lbl_a\+5c> lea %pc@\((0+0 <.*>|0+0104 <lbl_a\+5e>),%d0:l\),%a0
+ RELOC: 0+0106 (DISP32 undef|R_68K_PC32 undef\+0x0+02)
+0+010a <lbl_a\+64> nop
+0+010c <lbl_a\+66> lea 0+0 <.*>,%a0
+ RELOC: 0+010e (R_68K_)?32 undef
+0+0112 <lbl_a\+6c> nop
+\.\.\.
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/m68k/pcrel.s b/gnu/usr.bin/binutils/gas/testsuite/gas/m68k/pcrel.s
new file mode 100644
index 00000000000..9c5c22b90fb
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/m68k/pcrel.s
@@ -0,0 +1,59 @@
+ nop
+lbl_b: nop
+ moveml lbl_b,%a0-%a1
+ moveml %pc@(lbl_b),%a0-%a1
+ moveml %pc@(lbl_b,%d0),%a0-%a1
+ lea lbl_b,%a0
+ lea %pc@(lbl_b),%a0
+ lea %pc@(lbl_b-128),%a0
+ lea %pc@(lbl_b,%d0),%a0
+ lea %pc@(lbl_b:b,%d0),%a0
+ lea %pc@(lbl_b-.-2:b,%d0),%a0
+ lea %pc@(lbl_b:w,%d0),%a0
+ lea %pc@(lbl_b-.-2:w,%d0),%a0
+ lea %pc@(lbl_b:l,%d0),%a0
+ lea %pc@(lbl_b-.-2:l,%d0),%a0
+ nop
+ bsrl lbl_a
+ bsr lbl_a
+ bsrs lbl_a
+ jbsr lbl_a
+ nop
+ lea lbl_a,%a0
+ lea %pc@(lbl_a),%a0
+ lea %pc@(lbl_a+128),%a0
+ lea %pc@(lbl_a,%d0),%a0
+ lea %pc@(lbl_a:b,%d0),%a0
+ lea %pc@(lbl_a-.-2:b,%d0),%a0
+ lea %pc@(lbl_a:w,%d0),%a0
+ lea %pc@(lbl_a-.-2:w,%d0),%a0
+ lea %pc@(lbl_a:l,%d0),%a0
+ lea %pc@(lbl_a-.-2:l,%d0),%a0
+ lea %pc@(18:l,%d0),%a0
+ lea %pc@(10:w,%d0),%a0
+ lea %pc@(4:b,%d0),%a0
+ nop
+lbl_a: nop
+ nop
+ lea %pc@(.-126,%d0),%a0
+ lea %pc@(.-127,%d0),%a0
+ lea %pc@(.-32766,%d0),%a0
+ lea %pc@(.-32767,%d0),%a0
+ nop
+ lea %pc@(.+129,%d0),%a0
+ lea %pc@(.+130,%d0),%a0
+ lea %pc@(.+32769,%d0),%a0
+ lea %pc@(.+32770,%d0),%a0
+ nop
+ lea %pc@(.-32766),%a0
+ lea %pc@(.-32767),%a0
+ nop
+ lea %pc@(.+32769),%a0
+ lea %pc@(.+32770),%a0
+ nop
+ lea %pc@(undef),%a0
+ lea %pc@(undef,%d0),%a0
+ nop
+ lea undef,%a0
+ nop
+ .long 0
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/div-ilocks.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/div-ilocks.d
new file mode 100644
index 00000000000..282fb41ed50
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/div-ilocks.d
@@ -0,0 +1,117 @@
+#objdump: -dr
+#name: MIPS div
+#source: div.s
+
+# Test the div macro.
+
+.*: +file format .*mips.*
+
+No symbols in .*
+Disassembly of section .text:
+0+0000 div \$zero,\$a0,\$a1
+0+0004 div \$zero,\$a0,\$a1
+0+0008 bnez \$a1,0+0014
+...
+0+0010 break 0x7
+0+0014 li \$at,-1
+0+0018 bne \$a1,\$at,0+002c
+0+001c lui \$at,0x8000
+0+0020 bne \$a0,\$at,0+002c
+...
+0+0028 break 0x6
+0+002c mflo \$a0
+0+0030 div \$zero,\$a1,\$a2
+0+0034 bnez \$a2,0+0040
+...
+0+003c break 0x7
+0+0040 li \$at,-1
+0+0044 bne \$a2,\$at,0+0058
+0+0048 lui \$at,0x8000
+0+004c bne \$a1,\$at,0+0058
+...
+0+0054 break 0x6
+0+0058 mflo \$a0
+0+005c move \$a0,\$a0
+0+0060 move \$a0,\$a1
+0+0064 neg \$a0,\$a0
+0+0068 neg \$a0,\$a1
+0+006c li \$at,2
+0+0070 div \$zero,\$a0,\$at
+0+0074 mflo \$a0
+0+0078 li \$at,2
+0+007c div \$zero,\$a1,\$at
+0+0080 mflo \$a0
+0+0084 li \$at,0x8000
+0+0088 div \$zero,\$a0,\$at
+0+008c mflo \$a0
+0+0090 li \$at,0x8000
+0+0094 div \$zero,\$a1,\$at
+0+0098 mflo \$a0
+0+009c li \$at,-32768
+0+00a0 div \$zero,\$a0,\$at
+0+00a4 mflo \$a0
+0+00a8 li \$at,-32768
+0+00ac div \$zero,\$a1,\$at
+0+00b0 mflo \$a0
+0+00b4 lui \$at,0x1
+0+00b8 div \$zero,\$a0,\$at
+0+00bc mflo \$a0
+0+00c0 lui \$at,0x1
+0+00c4 div \$zero,\$a1,\$at
+0+00c8 mflo \$a0
+0+00cc lui \$at,0x1
+0+00d0 ori \$at,\$at,0xa5a5
+0+00d4 div \$zero,\$a0,\$at
+0+00d8 mflo \$a0
+0+00dc lui \$at,0x1
+0+00e0 ori \$at,\$at,0xa5a5
+0+00e4 div \$zero,\$a1,\$at
+0+00e8 mflo \$a0
+0+00ec divu \$zero,\$a0,\$a1
+0+00f0 divu \$zero,\$a0,\$a1
+0+00f4 bnez \$a1,0+0100
+...
+0+00fc break 0x7
+0+0100 mflo \$a0
+0+0104 divu \$zero,\$a1,\$a2
+0+0108 bnez \$a2,0+0114
+...
+0+0110 break 0x7
+0+0114 mflo \$a0
+0+0118 move \$a0,\$a0
+0+011c div \$zero,\$a1,\$a2
+0+0120 bnez \$a2,0+012c
+...
+0+0128 break 0x7
+0+012c li \$at,-1
+0+0130 bne \$a2,\$at,0+0144
+0+0134 lui \$at,0x8000
+0+0138 bne \$a1,\$at,0+0144
+...
+0+0140 break 0x6
+0+0144 mfhi \$a0
+0+0148 li \$at,2
+0+014c divu \$zero,\$a1,\$at
+0+0150 mfhi \$a0
+0+0154 ddiv \$zero,\$a1,\$a2
+0+0158 bnez \$a2,0+0164
+...
+0+0160 break 0x7
+0+0164 daddiu \$at,\$zero,-1
+0+0168 bne \$a2,\$at,0+0180
+0+016c daddiu \$at,\$zero,1
+0+0170 dsll32 \$at,\$at,0x1f
+0+0174 bne \$a1,\$at,0+0180
+...
+0+017c break 0x6
+0+0180 mflo \$a0
+0+0184 li \$at,2
+0+0188 ddivu \$zero,\$a1,\$at
+0+018c mflo \$a0
+0+0190 li \$at,0x8000
+0+0194 ddiv \$zero,\$a1,\$at
+0+0198 mfhi \$a0
+0+019c li \$at,-32768
+0+01a0 ddivu \$zero,\$a1,\$at
+0+01a4 mfhi \$a0
+...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/mips/mul-ilocks.d b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/mul-ilocks.d
new file mode 100644
index 00000000000..257e2ad4c64
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/mips/mul-ilocks.d
@@ -0,0 +1,81 @@
+#objdump: -dr
+#name: MIPS mul
+#source: mul.s
+
+# Test the mul macro.
+
+.*: +file format .*mips.*
+
+No symbols in .*
+Disassembly of section .text:
+0+0000 multu \$a0,\$a1
+0+0004 mflo \$a0
+0+0008 multu \$a1,\$a2
+0+000c mflo \$a0
+0+0010 li \$at,0
+0+0014 mult \$a1,\$at
+0+0018 mflo \$a0
+0+001c li \$at,1
+0+0020 mult \$a1,\$at
+0+0024 mflo \$a0
+0+0028 li \$at,0x8000
+0+002c mult \$a1,\$at
+0+0030 mflo \$a0
+0+0034 li \$at,-32768
+0+0038 mult \$a1,\$at
+0+003c mflo \$a0
+0+0040 lui \$at,0x1
+0+0044 mult \$a1,\$at
+0+0048 mflo \$a0
+0+004c lui \$at,0x1
+0+0050 ori \$at,\$at,0xa5a5
+0+0054 mult \$a1,\$at
+0+0058 mflo \$a0
+0+005c mult \$a0,\$a1
+0+0060 mflo \$a0
+0+0064 sra \$a0,\$a0,0x1f
+0+0068 mfhi \$at
+0+006c beq \$a0,\$at,0+78
+...
+0+0074 break 0x6
+0+0078 mflo \$a0
+0+007c mult \$a1,\$a2
+0+0080 mflo \$a0
+0+0084 sra \$a0,\$a0,0x1f
+0+0088 mfhi \$at
+0+008c beq \$a0,\$at,0+98
+...
+0+0094 break 0x6
+0+0098 mflo \$a0
+0+009c multu \$a0,\$a1
+0+00a0 mfhi \$at
+0+00a4 mflo \$a0
+0+00a8 beqz \$at,0+b4
+...
+0+00b0 break 0x6
+0+00b4 multu \$a1,\$a2
+0+00b8 mfhi \$at
+0+00bc mflo \$a0
+0+00c0 beqz \$at,0+cc
+...
+0+00c8 break 0x6
+0+00cc dmultu \$a1,\$a2
+0+00d0 mflo \$a0
+0+00d4 li \$at,1
+0+00d8 dmult \$a1,\$at
+0+00dc mflo \$a0
+0+00e0 dmult \$a1,\$a2
+0+00e4 mflo \$a0
+0+00e8 dsra32 \$a0,\$a0,0x1f
+0+00ec mfhi \$at
+0+00f0 beq \$a0,\$at,0+fc
+...
+0+00f8 break 0x6
+0+00fc mflo \$a0
+0+0100 dmultu \$a1,\$a2
+0+0104 mfhi \$at
+0+0108 mflo \$a0
+0+010c beqz \$at,0+118
+...
+0+0114 break 0x6
+...
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/sh/basic.exp b/gnu/usr.bin/binutils/gas/testsuite/gas/sh/basic.exp
new file mode 100644
index 00000000000..869246e80c5
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/sh/basic.exp
@@ -0,0 +1,87 @@
+# Copyright (C) 1995 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Please email any bugs, comments, and/or additions to this file to:
+# DejaGnu@cygnus.com
+
+# Written by Cygnus Support.
+
+proc do_fp {} {
+ set testname "fp.s: floating point tests (sh3e)"
+ set x 0
+
+ gas_start "fp.s" "-al"
+
+ # Check the assembled instruction against a table built by the HP assembler
+ # Any differences should be checked by hand -- with the number of problems
+ # I've seen in the HP assembler I don't completely trust it.
+ #
+ # Instead of having a variable for each match string just increment the
+ # total number of matches seen. That's simpler when testing large numbers
+ # of instructions (as these tests to).
+ while 1 {
+ expect {
+ -re "^ +\[0-9\]+ 0000 F008\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0002 F00A\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0004 F009\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0006 F00B\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0008 F006\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 000a F007\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 000c F10C\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 000e F08D\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0010 F09D\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0012 F100\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0014 F101\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0016 F102\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0018 F103\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 001a F10E\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 001c F104\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 001e F105\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0020 F07D\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0022 F04D\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0024 F05D\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0026 F06D\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0028 F02D\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 002a F03D\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 002c F00D\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 002e F01D\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0030 435A\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0032 4356\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0034 436A\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0036 4366\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 0038 035A\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 003a 4352\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 003c 036A\[^\n\]*\n" { set x [expr $x+1] }
+ -re "^ +\[0-9\]+ 003e 4362\[^\n\]*\n" { set x [expr $x+1] }
+ -re "\[^\n\]*\n" { }
+ timeout { perror "timeout\n"; break }
+ eof { break }
+ }
+ }
+
+ # This was intended to do any cleanup necessary. It kinda looks like it
+ # isn't needed, but just in case, please keep it in for now.
+ gas_finish
+
+ # Did we find what we were looking for? If not, flunk it.
+ if [expr $x==32] then { pass $testname } else { fail $testname }
+}
+
+
+if [istarget sh*-*-*] then {
+ # Test the basic instruction parser.
+ do_fp
+}
diff --git a/gnu/usr.bin/binutils/gas/testsuite/gas/sh/fp.s b/gnu/usr.bin/binutils/gas/testsuite/gas/sh/fp.s
new file mode 100644
index 00000000000..3da72499f44
--- /dev/null
+++ b/gnu/usr.bin/binutils/gas/testsuite/gas/sh/fp.s
@@ -0,0 +1,45 @@
+ .file "test.c"
+ .data
+
+! Hitachi SH cc1 (cygnus-2.7.1-950728) arguments: -O -fpeephole
+! -ffunction-cse -freg-struct-return -fdelayed-branch -fcommon -fgnu-linker
+
+gcc2_compiled.:
+___gnu_compiled_c:
+ .text
+ .align 2
+ .global _foo
+_foo:
+ fmov.s @r0,fr0
+ fmov.s fr0,@r0
+ fmov.s @r0+,fr0
+ fmov.s fr0,@-r0
+ fmov.s @(r0,r0),fr0
+ fmov.s fr0,@(r0,r0)
+ fmov fr0,fr1
+ fldi0 fr0
+ fldi1 fr0
+ fadd fr0,fr1
+ fsub fr0,fr1
+ fmul fr0,fr1
+ fdiv fr0,fr1
+ fmac fr0,fr0,fr1
+ fcmp/eq fr0,fr1
+ fcmp/gt fr0,fr1
+ ftst/nan fr0
+ fneg fr0
+ fabs fr0
+ fsqrt fr0
+ float fpul,fr0
+ ftrc fr0,fpul
+ fsts fpul,fr0
+ flds fr0,fpul
+ lds r3,fpul
+ lds.l @r3+,fpul
+ lds r3,fpscr
+ lds.l @r3+,fpscr
+ sts fpul,r3
+ sts.l fpul,@-r3
+ sts fpscr,r3
+ sts.l fpscr,@-r3
+