* gas/h8300/cbranchh.s: Switch into h8300h mode.
authorJeff Law <law@redhat.com>
Tue, 18 Jun 1996 19:50:54 +0000 (19:50 +0000)
committerJeff Law <law@redhat.com>
Tue, 18 Jun 1996 19:50:54 +0000 (19:50 +0000)
        * gas/h8300/h8300.exp (H8/300H misc tests): Fix test names.
Just something I noticed.

        * gas/h8300/{addsubs.s,bitops1s.s,bitops2s.s}: New tests for the
        H8/S.
        * gas/h8300/{bitops3.s,bitops4.s,cbranchs.s,logicals.s}: Likewise.
        * gas/h8300/{branchess.s,compares.s,macs.s,decimals.s}: Likewise.
        * gas/h8300/{incdecs.s,divmuls.s,miscs.s,multiples.s}: Likewise.
        * gas/h8300/{movbs.s,movws.s,movls.s,pushpops.s}: Likewise.
        * gas/h8300/{rotshifts.s,extends.s}: Likewise.
        * gas/h8300/h8300.exp: Run them.
Sanitized away until status is clarified.

23 files changed:
gas/testsuite/.Sanitize
gas/testsuite/gas/h8300/.Sanitize
gas/testsuite/gas/h8300/addsubs.s [new file with mode: 0644]
gas/testsuite/gas/h8300/bitops1s.s [new file with mode: 0644]
gas/testsuite/gas/h8300/bitops2s.s [new file with mode: 0644]
gas/testsuite/gas/h8300/bitops3s.s [new file with mode: 0644]
gas/testsuite/gas/h8300/bitops4s.s [new file with mode: 0644]
gas/testsuite/gas/h8300/branchess.s [new file with mode: 0644]
gas/testsuite/gas/h8300/cbranchs.s [new file with mode: 0644]
gas/testsuite/gas/h8300/compares.s [new file with mode: 0644]
gas/testsuite/gas/h8300/decimals.s [new file with mode: 0644]
gas/testsuite/gas/h8300/divmuls.s [new file with mode: 0644]
gas/testsuite/gas/h8300/extends.s [new file with mode: 0644]
gas/testsuite/gas/h8300/incdecs.s [new file with mode: 0644]
gas/testsuite/gas/h8300/logicals.s [new file with mode: 0644]
gas/testsuite/gas/h8300/macs.s [new file with mode: 0644]
gas/testsuite/gas/h8300/miscs.s [new file with mode: 0644]
gas/testsuite/gas/h8300/movbs.s [new file with mode: 0644]
gas/testsuite/gas/h8300/movls.s [new file with mode: 0644]
gas/testsuite/gas/h8300/movws.s [new file with mode: 0644]
gas/testsuite/gas/h8300/multiples.s [new file with mode: 0644]
gas/testsuite/gas/h8300/pushpops.s [new file with mode: 0644]
gas/testsuite/gas/h8300/rotshifts.s [new file with mode: 0644]

index a1efe6316f84bcfa5d4ce6d15be309240c04b93b..319cc339df753644dcd04ac292361e44c4853584 100644 (file)
@@ -72,4 +72,36 @@ else
        done
 fi
 
+if [ -n "${verbose}" ] ; then
+       echo Processing \"h8s\"...
+fi
+
+h8s_files="ChangeLog"
+if ( echo $* | grep keep\-h8s > /dev/null ) ; then
+       for i in $h8s_files ; do
+               if test ! -d $i && (grep sanitize-h8s $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Keeping h8s stuff in $i
+                       fi
+               fi
+       done
+else
+       for i in $h8s_files ; do
+               if test ! -d $i && (grep sanitize-h8s $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Removing traces of \"h8s\" from $i...
+                       fi
+                       cp $i new
+                       sed '/start\-sanitize\-h8s/,/end-\sanitize\-h8s/d' < $i > new
+                       if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
+                               if [ -n "${verbose}" ] ; then
+                                       echo Caching $i in .Recover...
+                               fi
+                               mv $i .Recover
+                       fi
+                       mv new $i
+               fi
+       done
+fi
+
 # End of file.
index 953ef66a620b3fdb8afd97d436647882966856a4..9c0fb2c60c11a1424be035f3b0b71e5aea09a0da 100644 (file)
@@ -70,6 +70,60 @@ rotshifth.s
 
 Things-to-lose:
 
+addsubs.s
+bitops1s.s
+bitops2s.s
+bitops3s.s
+bitops4s.s
+branchess.s
+cbranchs.s
+compares.s
+decimals.s
+divmuls.s
+extends.s
+incdecs.s
+logicals.s
+macs.s
+miscs.s
+movbs.s
+movls.s
+movws.s
+multiples.s
+pushpops.s
+rotshifts.s
+
 Do-last:
 
+if [ -n "${verbose}" ] ; then
+       echo Processing \"h8s\"...
+fi
+
+h8s_files="h8300.exp"
+if ( echo $* | grep keep\-h8s > /dev/null ) ; then
+       for i in $h8s_files ; do
+               if test ! -d $i && (grep sanitize-h8s $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Keeping h8s stuff in $i
+                       fi
+               fi
+       done
+else
+       for i in $h8s_files ; do
+               if test ! -d $i && (grep sanitize-h8s $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Removing traces of \"h8s\" from $i...
+                       fi
+                       cp $i new
+                       sed '/start\-sanitize\-h8s/,/end-\sanitize\-h8s/d' < $i > new
+                       if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
+                               if [ -n "${verbose}" ] ; then
+                                       echo Caching $i in .Recover...
+                               fi
+                               mv $i .Recover
+                       fi
+                       mv new $i
+               fi
+       done
+fi
+
 # End of file.
diff --git a/gas/testsuite/gas/h8300/addsubs.s b/gas/testsuite/gas/h8300/addsubs.s
new file mode 100644 (file)
index 0000000..b0b3699
--- /dev/null
@@ -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/gas/testsuite/gas/h8300/bitops1s.s b/gas/testsuite/gas/h8300/bitops1s.s
new file mode 100644 (file)
index 0000000..c6599d4
--- /dev/null
@@ -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/gas/testsuite/gas/h8300/bitops2s.s b/gas/testsuite/gas/h8300/bitops2s.s
new file mode 100644 (file)
index 0000000..9470520
--- /dev/null
@@ -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/gas/testsuite/gas/h8300/bitops3s.s b/gas/testsuite/gas/h8300/bitops3s.s
new file mode 100644 (file)
index 0000000..7c64e06
--- /dev/null
@@ -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/gas/testsuite/gas/h8300/bitops4s.s b/gas/testsuite/gas/h8300/bitops4s.s
new file mode 100644 (file)
index 0000000..e8f47b6
--- /dev/null
@@ -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/gas/testsuite/gas/h8300/branchess.s b/gas/testsuite/gas/h8300/branchess.s
new file mode 100644 (file)
index 0000000..8f33e17
--- /dev/null
@@ -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/gas/testsuite/gas/h8300/cbranchs.s b/gas/testsuite/gas/h8300/cbranchs.s
new file mode 100644 (file)
index 0000000..14222ea
--- /dev/null
@@ -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/gas/testsuite/gas/h8300/compares.s b/gas/testsuite/gas/h8300/compares.s
new file mode 100644 (file)
index 0000000..e23f3fe
--- /dev/null
@@ -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/gas/testsuite/gas/h8300/decimals.s b/gas/testsuite/gas/h8300/decimals.s
new file mode 100644 (file)
index 0000000..b7802fc
--- /dev/null
@@ -0,0 +1,6 @@
+       .h8300s
+       .text
+h8300s_decimal:
+       daa r0l
+       das r0l
+
diff --git a/gas/testsuite/gas/h8300/divmuls.s b/gas/testsuite/gas/h8300/divmuls.s
new file mode 100644 (file)
index 0000000..db60f8f
--- /dev/null
@@ -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/gas/testsuite/gas/h8300/extends.s b/gas/testsuite/gas/h8300/extends.s
new file mode 100644 (file)
index 0000000..a26e9ba
--- /dev/null
@@ -0,0 +1,8 @@
+       .h8300s
+       .text
+h8300s_extend:
+       exts.w r0
+       exts.l er0
+       extu.w r0
+       extu.l er0
+
diff --git a/gas/testsuite/gas/h8300/incdecs.s b/gas/testsuite/gas/h8300/incdecs.s
new file mode 100644 (file)
index 0000000..2345708
--- /dev/null
@@ -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/gas/testsuite/gas/h8300/logicals.s b/gas/testsuite/gas/h8300/logicals.s
new file mode 100644 (file)
index 0000000..c3c4cba
--- /dev/null
@@ -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/gas/testsuite/gas/h8300/macs.s b/gas/testsuite/gas/h8300/macs.s
new file mode 100644 (file)
index 0000000..3623ea3
--- /dev/null
@@ -0,0 +1,9 @@
+       .h8300s
+       .text
+h8300s_mac:
+       clrmac
+       ldmac er0,mach
+       ldmac er1,macl
+       mac @er0+,@er1+
+       
+
diff --git a/gas/testsuite/gas/h8300/miscs.s b/gas/testsuite/gas/h8300/miscs.s
new file mode 100644 (file)
index 0000000..783727d
--- /dev/null
@@ -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/gas/testsuite/gas/h8300/movbs.s b/gas/testsuite/gas/h8300/movbs.s
new file mode 100644 (file)
index 0000000..925002c
--- /dev/null
@@ -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/gas/testsuite/gas/h8300/movls.s b/gas/testsuite/gas/h8300/movls.s
new file mode 100644 (file)
index 0000000..4643767
--- /dev/null
@@ -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/gas/testsuite/gas/h8300/movws.s b/gas/testsuite/gas/h8300/movws.s
new file mode 100644 (file)
index 0000000..a4f21df
--- /dev/null
@@ -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/gas/testsuite/gas/h8300/multiples.s b/gas/testsuite/gas/h8300/multiples.s
new file mode 100644 (file)
index 0000000..52079b6
--- /dev/null
@@ -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/gas/testsuite/gas/h8300/pushpops.s b/gas/testsuite/gas/h8300/pushpops.s
new file mode 100644 (file)
index 0000000..741df04
--- /dev/null
@@ -0,0 +1,8 @@
+       .h8300s
+       .text
+h8300s_push_pop:
+       pop.w r0
+       pop.l er0
+       push.w r0
+       push.l er0
+
diff --git a/gas/testsuite/gas/h8300/rotshifts.s b/gas/testsuite/gas/h8300/rotshifts.s
new file mode 100644 (file)
index 0000000..36c41cb
--- /dev/null
@@ -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