OSDN Git Service

* ld-h8300/h8300.exp: Addition of gcsection test case.
authornickc <nickc>
Tue, 13 Jul 2004 16:56:08 +0000 (16:56 +0000)
committernickc <nickc>
Tue, 13 Jul 2004 16:56:08 +0000 (16:56 +0000)
* ld-h8300/gcsection.s: New test source file.
* ld-h8300/gcsection.d: New test expected disassembly file.

ld/testsuite/ChangeLog
ld/testsuite/ld-h8300/gcsection.d [new file with mode: 0644]
ld/testsuite/ld-h8300/gcsection.s [new file with mode: 0644]
ld/testsuite/ld-h8300/h8300.exp

index 4069b4b..ec18521 100644 (file)
@@ -1,3 +1,9 @@
+2004-07-13  Nitin Yewale <nitiny@kpitcummins.com>
+
+       * ld-h8300/h8300.exp: Addition of gcsection test case.
+       * ld-h8300/gcsection.s: New test source file.
+       * ld-h8300/gcsection.d: New test expected disassembly file.
+
 2004-07-08  Maciej W. Rozycki  <macro@linux-mips.org>
 
        * ld-mips-elf/reloc-merge-lo16.{s,d,ld}: New test.
diff --git a/ld/testsuite/ld-h8300/gcsection.d b/ld/testsuite/ld-h8300/gcsection.d
new file mode 100644 (file)
index 0000000..f0e2564
--- /dev/null
@@ -0,0 +1,27 @@
+# name: H8300 GCC section test case
+# ld: --gc-sections  -m h8300helf
+# objdump: -d --no-show-raw-insn
+.*:     file format .*-h8300
+
+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   
+
+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   
diff --git a/ld/testsuite/ld-h8300/gcsection.s b/ld/testsuite/ld-h8300/gcsection.s
new file mode 100644 (file)
index 0000000..2149ee9
--- /dev/null
@@ -0,0 +1,43 @@
+       .h8300h
+       .section        .text.functionWeUse,"ax",@progbits
+       .align 1
+       .global _functionWeUse
+_functionWeUse:
+       mov.l   er6,@-er7
+       mov.l   er7,er6
+       subs    #4,er7
+       mov.w   r0,@(-2,er6)
+       mov.w   @(-2,er6),r2
+       mov.w   r2,r0
+       adds    #4,er7
+       mov.l   @er7+,er6
+       rts
+       .size   _functionWeUse, .-_functionWeUse
+       .section        .text.functionWeDontUse,"ax",@progbits
+       .align 1
+       .global _functionWeDontUse
+_functionWeDontUse:
+       mov.l   er6,@-er7
+       mov.l   er7,er6
+       subs    #4,er7
+       mov.w   r0,@(-2,er6)
+       mov.w   @(-2,er6),r2
+       mov.w   r2,r0
+       adds    #4,er7
+       mov.l   @er7+,er6
+       rts
+       .size   _functionWeDontUse, .-_functionWeDontUse
+       .section        .text.start,"ax",@progbits
+       .align 1
+       .global _start
+_start:
+       mov.l   er6,@-er7
+       mov.l   er7,er6
+       mov.w   #75,r0
+       jsr     @_functionWeUse
+       mov.w   r0,r2
+       mov.w   r2,r0
+       mov.l   @er7+,er6
+       rts
+       .size   _start, .-_start
+       .end
index a063f4e..0c109ce 100644 (file)
@@ -31,6 +31,7 @@ if {[istarget *-elf]} {
     run_dump_test relax-3
     run_dump_test relax-4
     run_dump_test relax-5
+    run_dump_test gcsection    
 } else {
     run_dump_test relax-3-coff
     run_dump_test relax-4-coff