aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ld/testsuite/ChangeLog9
-rw-r--r--ld/testsuite/ld-h8300/gcsection.d34
-rw-r--r--ld/testsuite/ld-h8300/h8300.exp2
-rw-r--r--ld/testsuite/ld-h8300/relax-2.d4
-rw-r--r--ld/testsuite/ld-h8300/relax-3.d36
-rw-r--r--ld/testsuite/ld-h8300/relax-4.d86
-rw-r--r--ld/testsuite/ld-h8300/relax-5.d80
-rw-r--r--ld/testsuite/ld-h8300/relax-6-coff.d11
-rw-r--r--ld/testsuite/ld-h8300/relax-6.d11
-rw-r--r--ld/testsuite/ld-h8300/relax-6.s5
10 files changed, 160 insertions, 118 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 50a7f14..32d223b 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2004-07-27 Nitin Yewale <nitiny@kpitcummins.com>
+
+ * ld-h8300/h8300.exp: Addition of new test case to check
+ relaxation for H8S target.
+ * ld-h8300/relax-6.s: New test source file.
+ * ld-h8300/relax-6.d: New test expected disassembly file.
+ * ld-h8300/relax-6-coff.d: New test expected disassembly file for
+ coff format.
+
2004-07-22 Nick Clifton <nickc@redhat.com>
PR/280
diff --git a/ld/testsuite/ld-h8300/gcsection.d b/ld/testsuite/ld-h8300/gcsection.d
index f0e2564..638d985 100644
--- a/ld/testsuite/ld-h8300/gcsection.d
+++ b/ld/testsuite/ld-h8300/gcsection.d
@@ -6,22 +6,22 @@
Disassembly of section .text:
00000100 <_functionWeUse>:
- 100: 01 00 6d f6 mov.l er6,@-er7
- 104: 0f f6 mov.l er7,er6
- 106: 1b 97 subs #4,er7
- 108: 6f e0 ff fe mov.w r0,@\(0xfffe:16,er6\)
- 10c: 6f 62 ff fe mov.w @\(0xfffe:16,er6\),r2
- 110: 0d 20 mov.w r2,r0
- 112: 0b 97 adds #4,er7
- 114: 01 00 6d 76 mov.l @er7\+,er6
- 118: 54 70 rts
+ 100: mov.l er6,@-er7
+ 104: mov.l er7,er6
+ 106: subs #4,er7
+ 108: mov.w r0,@\(0xfffe:16,er6\)
+ 10c: mov.w @\(0xfffe:16,er6\),r2
+ 110: mov.w r2,r0
+ 112: adds #4,er7
+ 114: mov.l @er7\+,er6
+ 118: rts
0000011a <_start>:
- 11a: 01 00 6d f6 mov.l er6,@-er7
- 11e: 0f f6 mov.l er7,er6
- 120: 79 00 00 4b mov.w #0x4b,r0
- 124: 5e 00 01 00 jsr @0x100:24
- 128: 0d 02 mov.w r0,r2
- 12a: 0d 20 mov.w r2,r0
- 12c: 01 00 6d 76 mov.l @er7\+,er6
- 130: 54 70 rts
+ 11a: mov.l er6,@-er7
+ 11e: mov.l er7,er6
+ 120: mov.w #0x4b,r0
+ 124: jsr @0x100:24
+ 128: mov.w r0,r2
+ 12a: mov.w r2,r0
+ 12c: mov.l @er7\+,er6
+ 130: rts
diff --git a/ld/testsuite/ld-h8300/h8300.exp b/ld/testsuite/ld-h8300/h8300.exp
index 0c109ce..b4429d5 100644
--- a/ld/testsuite/ld-h8300/h8300.exp
+++ b/ld/testsuite/ld-h8300/h8300.exp
@@ -31,9 +31,11 @@ if {[istarget *-elf]} {
run_dump_test relax-3
run_dump_test relax-4
run_dump_test relax-5
+ run_dump_test relax-6
run_dump_test gcsection
} else {
run_dump_test relax-3-coff
run_dump_test relax-4-coff
run_dump_test relax-5-coff
+ run_dump_test relax-6-coff
}
diff --git a/ld/testsuite/ld-h8300/relax-2.d b/ld/testsuite/ld-h8300/relax-2.d
index d32c5b4..963139d 100644
--- a/ld/testsuite/ld-h8300/relax-2.d
+++ b/ld/testsuite/ld-h8300/relax-2.d
@@ -7,5 +7,5 @@
Disassembly of section .text:
00000100 <_start>:
- *100: 28 67 * mov.b @0x67:8,r0l
- *102: 6a 08 43 21 * mov.b @0x4321:16,r0l
+ *100: mov.b @0x67:8,r0l
+ *102: mov.b @0x4321:16,r0l
diff --git a/ld/testsuite/ld-h8300/relax-3.d b/ld/testsuite/ld-h8300/relax-3.d
index c2d6503..b9eded2 100644
--- a/ld/testsuite/ld-h8300/relax-3.d
+++ b/ld/testsuite/ld-h8300/relax-3.d
@@ -10,22 +10,26 @@ Disassembly of section .text:
#
# Relaxation of aa:16
#
-.*: 6a 08 00 00 * mov.b @0x0:16,r0l
-.*: 6a 08 7f ff * mov.b @0x7fff:16,r0l
-.*: 6a 08 80 00 * mov.b @0x8000:16,r0l
-.*: 6a 08 fe ff * mov.b @0xfeff:16,r0l
-.*: 28 00 * mov.b @0x0:8,r0l
-.*: 28 ff * mov.b @0xff:8,r0l
+.*: 6a 08 00 00 mov.b @0x0:16,r0l
+.*: 6a 08 7f ff mov.b @0x7fff:16,r0l
+.*: 6a 08 80 00 mov.b @0x8000:16,r0l
+.*: 6a 08 fe ff mov.b @0xfeff:16,r0l
+.*: 28 00 * mov.b @0x0:8,r0l
+.*: 28 ff * mov.b @0xff:8,r0l
#
# Relaxation of aa:32
#
-.*: 6a 08 00 00 * mov.b @0x0:16,r0l
-.*: 6a 08 7f ff * mov.b @0x7fff:16,r0l
-.*: 6a 28 00 00 80 00 * mov.b @0x8000:32,r0l
-.*: 6a 28 00 00 ff 00 * mov.b @0xff00:32,r0l
-.*: 6a 28 00 ff ff 00 * mov.b @0xffff00:32,r0l
-.*: 6a 28 ff ff 7f ff * mov.b @0xffff7fff:32,r0l
-.*: 6a 08 80 00 * mov.b @0x8000:16,r0l
-.*: 6a 08 fe ff * mov.b @0xfeff:16,r0l
-.*: 28 00 * mov.b @0x0:8,r0l
-.*: 28 ff * mov.b @0xff:8,r0l
+.*: 6a 08 00 00 mov.b @0x0:16,r0l
+.*: 6a 08 7f ff mov.b @0x7fff:16,r0l
+.*: 6a 28 00 00 mov.b @0x8000:32,r0l
+.*: 80 00
+.*: 6a 28 00 00 mov.b @0xff00:32,r0l
+.*: ff 00
+.*: 6a 28 00 ff mov.b @0xffff00:32,r0l
+.*: ff 00
+.*: 6a 28 ff ff mov.b @0xffff7fff:32,r0l
+.*: 7f ff
+.*: 6a 08 80 00 mov.b @0x8000:16,r0l
+.*: 6a 08 fe ff mov.b @0xfeff:16,r0l
+.*: 28 00 * mov.b @0x0:8,r0l
+.*: 28 ff * mov.b @0xff:8,r0l
diff --git a/ld/testsuite/ld-h8300/relax-4.d b/ld/testsuite/ld-h8300/relax-4.d
index e9b8c8a..b8d38ce 100644
--- a/ld/testsuite/ld-h8300/relax-4.d
+++ b/ld/testsuite/ld-h8300/relax-4.d
@@ -1,51 +1,51 @@
# name: H8300 Relaxation Test 4
# ld: --relax -m h8300self
-# objdump: -d
+# objdump: -d --no-show-raw-insn
.*: file format .*-h8300
Disassembly of section .text:
00000100 <_start>:
- 100: f8 03 mov.b #0x3,r0l
- 102: fa 05 mov.b #0x5,r2l
- 104: 7f ff 60 80 bset r0l,@0xff:8
- 108: 7f 00 60 a0 bset r2l,@0x0:8
- 10c: 7e ff 63 a0 btst r2l,@0xff:8
- 110: 7e 00 63 80 btst r0l,@0x0:8
- 114: 6a 18 00 00 70 50 bset #0x5,@0x0:16
- 11a: 6a 18 7f ff 70 50 bset #0x5,@0x7fff:16
- 120: 6a 18 80 00 70 50 bset #0x5,@0x8000:16
- 126: 6a 18 fe ff 70 50 bset #0x5,@0xfeff:16
- 12c: 7f 00 70 50 bset #0x5,@0x0:8
- 130: 7f ff 70 50 bset #0x5,@0xff:8
- 134: 6a 10 00 00 76 50 band #0x5,@0x0:16
- 13a: 6a 10 7f ff 76 50 band #0x5,@0x7fff:16
- 140: 6a 10 80 00 76 50 band #0x5,@0x8000:16
- 146: 6a 10 fe ff 76 50 band #0x5,@0xfeff:16
- 14c: 7e 00 76 50 band #0x5,@0x0:8
- 150: 7e ff 76 50 band #0x5,@0xff:8
- 154: 7f ff 60 a0 bset r2l,@0xff:8
- 158: 7f 00 60 80 bset r0l,@0x0:8
- 15c: 7e ff 63 80 btst r0l,@0xff:8
- 160: 7e 00 63 a0 btst r2l,@0x0:8
- 164: 6a 18 00 00 70 60 bset #0x6,@0x0:16
- 16a: 6a 18 7f ff 70 60 bset #0x6,@0x7fff:16
- 170: 6a 38 00 00 80 00 70 60 bset #0x6,@0x8000:32
- 178: 6a 38 00 00 ff 00 70 60 bset #0x6,@0xff00:32
- 180: 6a 38 00 ff ff 00 70 60 bset #0x6,@0xffff00:32
- 188: 6a 38 ff ff 7f ff 70 60 bset #0x6,@0xffff7fff:32
- 190: 6a 18 80 00 70 60 bset #0x6,@0x8000:16
- 196: 6a 18 fe ff 70 60 bset #0x6,@0xfeff:16
- 19c: 7f 00 70 60 bset #0x6,@0x0:8
- 1a0: 7f ff 70 60 bset #0x6,@0xff:8
- 1a4: 6a 10 00 00 76 60 band #0x6,@0x0:16
- 1aa: 6a 10 7f ff 76 60 band #0x6,@0x7fff:16
- 1b0: 6a 30 00 00 80 00 76 60 band #0x6,@0x8000:32
- 1b8: 6a 30 00 00 ff 00 76 60 band #0x6,@0xff00:32
- 1c0: 6a 30 00 ff ff 00 76 60 band #0x6,@0xffff00:32
- 1c8: 6a 30 ff ff 7f ff 76 60 band #0x6,@0xffff7fff:32
- 1d0: 6a 10 80 00 76 60 band #0x6,@0x8000:16
- 1d6: 6a 10 fe ff 76 60 band #0x6,@0xfeff:16
- 1dc: 7e 00 76 60 band #0x6,@0x0:8
- 1e0: 7e ff 76 60 band #0x6,@0xff:8
+ 100: mov.b #0x3,r0l
+ 102: mov.b #0x5,r2l
+ 104: bset r0l,@0xff:8
+ 108: bset r2l,@0x0:8
+ 10c: btst r2l,@0xff:8
+ 110: btst r0l,@0x0:8
+ 114: bset #0x5,@0x0:16
+ 11a: bset #0x5,@0x7fff:16
+ 120: bset #0x5,@0x8000:16
+ 126: bset #0x5,@0xfeff:16
+ 12c: bset #0x5,@0x0:8
+ 130: bset #0x5,@0xff:8
+ 134: band #0x5,@0x0:16
+ 13a: band #0x5,@0x7fff:16
+ 140: band #0x5,@0x8000:16
+ 146: band #0x5,@0xfeff:16
+ 14c: band #0x5,@0x0:8
+ 150: band #0x5,@0xff:8
+ 154: bset r2l,@0xff:8
+ 158: bset r0l,@0x0:8
+ 15c: btst r0l,@0xff:8
+ 160: btst r2l,@0x0:8
+ 164: bset #0x6,@0x0:16
+ 16a: bset #0x6,@0x7fff:16
+ 170: bset #0x6,@0x8000:32
+ 178: bset #0x6,@0xff00:32
+ 180: bset #0x6,@0xffff00:32
+ 188: bset #0x6,@0xffff7fff:32
+ 190: bset #0x6,@0x8000:16
+ 196: bset #0x6,@0xfeff:16
+ 19c: bset #0x6,@0x0:8
+ 1a0: bset #0x6,@0xff:8
+ 1a4: band #0x6,@0x0:16
+ 1aa: band #0x6,@0x7fff:16
+ 1b0: band #0x6,@0x8000:32
+ 1b8: band #0x6,@0xff00:32
+ 1c0: band #0x6,@0xffff00:32
+ 1c8: band #0x6,@0xffff7fff:32
+ 1d0: band #0x6,@0x8000:16
+ 1d6: band #0x6,@0xfeff:16
+ 1dc: band #0x6,@0x0:8
+ 1e0: band #0x6,@0xff:8
diff --git a/ld/testsuite/ld-h8300/relax-5.d b/ld/testsuite/ld-h8300/relax-5.d
index d33eb0f..01e12a5 100644
--- a/ld/testsuite/ld-h8300/relax-5.d
+++ b/ld/testsuite/ld-h8300/relax-5.d
@@ -8,43 +8,43 @@
Disassembly of section .text:
00000100 <_start>:
- 100: 01 40 6b 00 00 00 ldc @0x0:16,ccr
- 106: 01 40 6b 00 7f ff ldc @0x7fff:16,ccr
- 10c: 01 40 6b 20 00 00 80 00 ldc @0x8000:32,ccr
- 114: 01 40 6b 20 00 00 ff 00 ldc @0xff00:32,ccr
- 11c: 01 40 6b 20 00 ff ff 00 ldc @0xffff00:32,ccr
- 124: 01 40 6b 20 ff ff 7f ff ldc @0xffff7fff:32,ccr
- 12c: 01 40 6b 00 80 00 ldc @0x8000:16,ccr
- 132: 01 40 6b 00 fe ff ldc @0xfeff:16,ccr
- 138: 01 40 6b 00 ff 00 ldc @0xff00:16,ccr
- 13e: 01 40 6b 00 ff ff ldc @0xffff:16,ccr
- 144: 01 40 6b 80 00 00 stc ccr,@0x0:16
- 14a: 01 40 6b 80 7f ff stc ccr,@0x7fff:16
- 150: 01 40 6b a0 00 00 80 00 stc ccr,@0x8000:32
- 158: 01 40 6b a0 00 00 ff 00 stc ccr,@0xff00:32
- 160: 01 40 6b a0 00 ff ff 00 stc ccr,@0xffff00:32
- 168: 01 40 6b a0 ff ff 7f ff stc ccr,@0xffff7fff:32
- 170: 01 40 6b 80 80 00 stc ccr,@0x8000:16
- 176: 01 40 6b 80 fe ff stc ccr,@0xfeff:16
- 17c: 01 40 6b 80 ff 00 stc ccr,@0xff00:16
- 182: 01 40 6b 80 ff ff stc ccr,@0xffff:16
- 188: 01 41 6b 00 00 00 ldc @0x0:16,exr
- 18e: 01 41 6b 00 7f ff ldc @0x7fff:16,exr
- 194: 01 41 6b 20 00 00 80 00 ldc @0x8000:32,exr
- 19c: 01 41 6b 20 00 00 ff 00 ldc @0xff00:32,exr
- 1a4: 01 41 6b 20 00 ff ff 00 ldc @0xffff00:32,exr
- 1ac: 01 41 6b 20 ff ff 7f ff ldc @0xffff7fff:32,exr
- 1b4: 01 41 6b 00 80 00 ldc @0x8000:16,exr
- 1ba: 01 41 6b 00 fe ff ldc @0xfeff:16,exr
- 1c0: 01 41 6b 00 ff 00 ldc @0xff00:16,exr
- 1c6: 01 41 6b 00 ff ff ldc @0xffff:16,exr
- 1cc: 01 41 6b 80 00 00 stc exr,@0x0:16
- 1d2: 01 41 6b 80 7f ff stc exr,@0x7fff:16
- 1d8: 01 41 6b a0 00 00 80 00 stc exr,@0x8000:32
- 1e0: 01 41 6b a0 00 00 ff 00 stc exr,@0xff00:32
- 1e8: 01 41 6b a0 00 ff ff 00 stc exr,@0xffff00:32
- 1f0: 01 41 6b a0 ff ff 7f ff stc exr,@0xffff7fff:32
- 1f8: 01 41 6b 80 80 00 stc exr,@0x8000:16
- 1fe: 01 41 6b 80 fe ff stc exr,@0xfeff:16
- 204: 01 41 6b 80 ff 00 stc exr,@0xff00:16
- 20a: 01 41 6b 80 ff ff stc exr,@0xffff:16
+ 100: ldc @0x0:16,ccr
+ 106: ldc @0x7fff:16,ccr
+ 10c: ldc @0x8000:32,ccr
+ 114: ldc @0xff00:32,ccr
+ 11c: ldc @0xffff00:32,ccr
+ 124: ldc @0xffff7fff:32,ccr
+ 12c: ldc @0x8000:16,ccr
+ 132: ldc @0xfeff:16,ccr
+ 138: ldc @0xff00:16,ccr
+ 13e: ldc @0xffff:16,ccr
+ 144: stc ccr,@0x0:16
+ 14a: stc ccr,@0x7fff:16
+ 150: stc ccr,@0x8000:32
+ 158: stc ccr,@0xff00:32
+ 160: stc ccr,@0xffff00:32
+ 168: stc ccr,@0xffff7fff:32
+ 170: stc ccr,@0x8000:16
+ 176: stc ccr,@0xfeff:16
+ 17c: stc ccr,@0xff00:16
+ 182: stc ccr,@0xffff:16
+ 188: ldc @0x0:16,exr
+ 18e: ldc @0x7fff:16,exr
+ 194: ldc @0x8000:32,exr
+ 19c: ldc @0xff00:32,exr
+ 1a4: ldc @0xffff00:32,exr
+ 1ac: ldc @0xffff7fff:32,exr
+ 1b4: ldc @0x8000:16,exr
+ 1ba: ldc @0xfeff:16,exr
+ 1c0: ldc @0xff00:16,exr
+ 1c6: ldc @0xffff:16,exr
+ 1cc: stc exr,@0x0:16
+ 1d2: stc exr,@0x7fff:16
+ 1d8: stc exr,@0x8000:32
+ 1e0: stc exr,@0xff00:32
+ 1e8: stc exr,@0xffff00:32
+ 1f0: stc exr,@0xffff7fff:32
+ 1f8: stc exr,@0x8000:16
+ 1fe: stc exr,@0xfeff:16
+ 204: stc exr,@0xff00:16
+ 20a: stc exr,@0xffff:16
diff --git a/ld/testsuite/ld-h8300/relax-6-coff.d b/ld/testsuite/ld-h8300/relax-6-coff.d
new file mode 100644
index 0000000..b9c1e2f
--- /dev/null
+++ b/ld/testsuite/ld-h8300/relax-6-coff.d
@@ -0,0 +1,11 @@
+# name: H8300 Relaxation Test 6
+# source: relax-6.s
+# ld: --relax -m h8300s
+# objdump: -d --no-show-raw-insn
+
+.*: file format .*-h8300
+Disassembly of section .text:
+
+00000100 <_start>:
+ 100: mov.b r2l,@0xbd:8
+ 102: rts
diff --git a/ld/testsuite/ld-h8300/relax-6.d b/ld/testsuite/ld-h8300/relax-6.d
new file mode 100644
index 0000000..023af78
--- /dev/null
+++ b/ld/testsuite/ld-h8300/relax-6.d
@@ -0,0 +1,11 @@
+# name: H8300 Relaxation Test 6
+# source: relax-6.s
+# ld: --relax -m h8300self
+# objdump: -d --no-show-raw-insn
+
+.*: file format .*-h8300
+Disassembly of section .text:
+
+00000100 <_start>:
+ 100: mov.b r2l,@0xbd:8
+ 102: rts
diff --git a/ld/testsuite/ld-h8300/relax-6.s b/ld/testsuite/ld-h8300/relax-6.s
new file mode 100644
index 0000000..fb44b54
--- /dev/null
+++ b/ld/testsuite/ld-h8300/relax-6.s
@@ -0,0 +1,5 @@
+ .h8300s
+ .global _start
+_start:
+ mov.b r2l,@0xFFFFFFBD:32
+ rts