diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/mips-elf.exp | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/mips16-fp-stub-1.s | 58 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/mips16-fp-stub-2.s | 43 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/mips16-fp-stub.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/mips16-intermix.d | 6 |
6 files changed, 124 insertions, 3 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index f0124f9..d775f11 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2015-10-29 Catherine Moore <clm@codesourcery.com> + + * ld-mips-elf/mips16-fp-stub-1.s: New. + * ld-mips-elf/mips16-fp-stub-2.s: New. + * ld-mips-elf/mips16-fp-stub.d: New. + * ld-mips-elf/mips-elf.exp: Run new tests. + * ld-mips-elf/mips16-intermix.d: Update expected output. + 2015-10-28 H.J. Lu <hongjiu.lu@intel.com> PR ld/19162 diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp index dd8b228..3b02bc0 100644 --- a/ld/testsuite/ld-mips-elf/mips-elf.exp +++ b/ld/testsuite/ld-mips-elf/mips-elf.exp @@ -666,6 +666,16 @@ run_ld_link_tests $mips16_intermix_test run_dump_test "mips16-local-stubs-1" +set mips16_fp_stub_test [list \ + [list "Floating-point stub for mips16 functions" \ + "$abi_ldflags(o32)" "" \ + "$abi_asflags(o32) -mips32r2" \ + {mips16-fp-stub-1.s mips16-fp-stub-2.s} \ + {{readelf --debug-dump=frames mips16-fp-stub.d}} \ + "mips16-fp-stub"]] + +run_ld_link_tests $mips16_fp_stub_test + set o32flagslist [list [list as $abi_asflags(o32)] [list ld $abi_ldflags(o32)]] foreach firstfpabi [list 0 1 2 3 4 5 6 7 ] { diff --git a/ld/testsuite/ld-mips-elf/mips16-fp-stub-1.s b/ld/testsuite/ld-mips-elf/mips16-fp-stub-1.s new file mode 100644 index 0000000..98a5067 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/mips16-fp-stub-1.s @@ -0,0 +1,58 @@ + .file 1 "mips-fp-stub-1.c" + .section .mdebug.abi32 + .previous + .nan legacy + .module fp=32 + .module oddspreg + # Stub function to call float foo (float, float) + .section .mips16.call.fp.foo,"ax",@progbits + .align 2 + .set nomips16 + .set nomicromips + .ent __call_stub_fp_foo + .type __call_stub_fp_foo, @function +__call_stub_fp_foo: + .cfi_startproc + .cfi_def_cfa 29,-4 + .cfi_escape 0x16,29,1,0x6d + move $18,$31 + mtc1 $4,$f12 + mtc1 $5,$f14 + jal foo + .cfi_register 31,18 + mfc1 $2,$f0 + jr $18 + .cfi_endproc + .size __call_stub_fp_foo, .-__call_stub_fp_foo + .end __call_stub_fp_foo + .text + .align 2 + .globl main + .set mips16 + .set nomicromips + .ent main + .type main, @function +main: + .frame $17,24,$31 # vars= 8, regs= 3/0, args= 16, gp= 0 + .mask 0x80060000,-4 + .fmask 0x00000000,0 + save 40,$17,$18,$31 + addiu $17,$sp,16 + lw $3,.L3 + lw $2,.L4 + move $5,$3 + move $4,$2 + jal foo + sw $2,0($17) + li $2,0 + move $sp,$17 + restore 24,$17,$18,$31 + j $31 + .align 2 +.L3: + .word 1085485875 +.L4: + .word 1065353216 + .end main + .size main, .-main + .ident "GCC: (Sourcery CodeBench Lite 2015.11-12 - Preview) 5.2.0" diff --git a/ld/testsuite/ld-mips-elf/mips16-fp-stub-2.s b/ld/testsuite/ld-mips-elf/mips16-fp-stub-2.s new file mode 100644 index 0000000..d63cc7c --- /dev/null +++ b/ld/testsuite/ld-mips-elf/mips16-fp-stub-2.s @@ -0,0 +1,43 @@ + .file 1 "mips-fp-stub-2.c" + .section .mdebug.abi32 + .previous + .nan legacy + .module fp=32 + .module oddspreg + .text + .align 2 + .globl foo + # Stub function for foo (float, float) + .section .mips16.fn.foo,"ax",@progbits + .align 2 + .set nomips16 + .set nomicromips + .ent __fn_stub_foo + .type __fn_stub_foo, @function +__fn_stub_foo: + la $25,foo + mfc1 $4,$f12 + mfc1 $5,$f14 + jr $25 + .end __fn_stub_foo + __fn_local_foo = foo + .text + .set mips16 + .set nomicromips + .ent foo + .type foo, @function +foo: + .frame $17,8,$31 # vars= 0, regs= 2/0, args= 0, gp= 0 + .mask 0x80020000,-4 + .fmask 0x00000000,0 + save 8,$17,$31 + move $17,$sp + sw $4,8($17) + sw $5,12($17) + lw $2,8($17) + move $sp,$17 + restore 8,$17,$31 + j $31 + .end foo + .size foo, .-foo + .ident "GCC: (Sourcery CodeBench Lite 2015.11-12 - Preview) 5.2.0" diff --git a/ld/testsuite/ld-mips-elf/mips16-fp-stub.d b/ld/testsuite/ld-mips-elf/mips16-fp-stub.d new file mode 100644 index 0000000..1d4aa28 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/mips16-fp-stub.d @@ -0,0 +1,2 @@ + +Section '\.eh_frame' has no debugging data\. diff --git a/ld/testsuite/ld-mips-elf/mips16-intermix.d b/ld/testsuite/ld-mips-elf/mips16-intermix.d index 10c7270..9318e3b 100644 --- a/ld/testsuite/ld-mips-elf/mips16-intermix.d +++ b/ld/testsuite/ld-mips-elf/mips16-intermix.d @@ -60,9 +60,6 @@ SYMBOL TABLE: .* l F .text 0+[0-9a-f]+ 0xf0 m16_static32_d_l .* l F .text 0+[0-9a-f]+ m32_static16_d_l .* l F .text 0+[0-9a-f]+ 0xf0 m16_static16_d_l -# ??? We aren't yet able to get rid of the symbol table entry for -# __fn_stub_m16_d_d, or its .pdr entry. -.* l F .text 0+[0-9a-f]+ * .* l F .text 0+[0-9a-f]+ m32_static_d_d .* l F .text 0+[0-9a-f]+ 0xf0 m16_static_d_d .* l F .text 0+[0-9a-f]+ m32_static1_d_d @@ -94,6 +91,9 @@ SYMBOL TABLE: .* l F .text 0+[0-9a-f]+ __call_stub_fp_m16_static16_d_l .* l F .text 0+[0-9a-f]+ __call_stub_fp_m32_static16_d_d .* l F .text 0+[0-9a-f]+ __call_stub_fp_m16_static16_d_d +# ??? We aren't yet able to get rid of the symbol table entry for +# __fn_stub_m16_d_d, or its .pdr entry. +.* l df \*ABS\* 0+[0-9a-f]+ * #... .* g F .text 0+[0-9a-f]+ m32_ld #... |