RISC-V: Tweak testcase for PIE
Linux toolchain may configured with --enable-default-pie, and that will cause lots of regression test failures because the function name will append with @plt suffix (e.g. `call foo` become `call foo@plt`), also some code generation will different due to the code model like the address generation for global variable, so we may add -fno-pie to those testcases to prevent that. We may consider just drop @plt suffix to prevent that at all, because it's not difference between w/ and w/o @plt suffix, the linker will pick the right one to do, however it's late stage of GCC development, so just tweak the testcase should be the best way to do now. Changes from v1: - Add more testcase for PIE (from rvv.exp). - Tweak the rule for match @plt. gcc/testsuite/ChangeLog: * gcc.target/riscv/rv32i_zcmp.c: Tweak testcase for PIE. * gcc.target/riscv/rv32e_zcmp.c: Likewise. * gcc.target/riscv/zcmp_stack_alignment.c: Likewise. * gcc.target/riscv/cm_mv_rv32.c: Likewise. * gcc.target/riscv/cpymem-64.c: Likewise. * gcc.target/riscv/fmax-snan.c: Likewise. * gcc.target/riscv/fmaxf-snan.c: Likewise. * gcc.target/riscv/fmin-snan.c: Likewise. * gcc.target/riscv/fminf-snan.c: Likewise. * gcc.target/riscv/large-model.c: Likewise. * gcc.target/riscv/predef-1.c: Likewise. * gcc.target/riscv/predef-4.c: Likewise. * gcc.target/riscv/predef-7.c: Likewise. * gcc.target/riscv/predef-9.c: Likewise. * gcc.target/riscv/rvv/base/abi-callee-saved-2-save-restore.c: Likewise. * gcc.target/riscv/rvv/base/abi-callee-saved-2-zcmp.c: Likewise. * gcc.target/riscv/rvv/base/abi-callee-saved-2.c: Likewise. * gcc.target/riscv/rvv/base/cmpmem-1.c: Likewise. * gcc.target/riscv/rvv/base/cmpmem-3.c: Likewise. * gcc.target/riscv/rvv/base/cmpmem-4.c: Likewise. * gcc.target/riscv/rvv/base/cpymem-1.c: Likewise. * gcc.target/riscv/rvv/base/movmem-1.c: Likewise. * gcc.target/riscv/rvv/base/pr114352-3.c: Likewise. * gcc.target/riscv/rvv/base/setmem-1.c: Likewise. * gcc.target/riscv/rvv/base/setmem-2.c: Likewise. * gcc.target/riscv/rvv/base/setmem-3.c: Likewise. * gcc.target/riscv/rvv/base/spill-9.c: Likewise. * g++.target/riscv/mv-symbols1.C: Likewise. * g++.target/riscv/mv-symbols3.C: Likewise. * g++.target/riscv/mv-symbols4.C: Likewise. * g++.target/riscv/mv-symbols5.C: Likewise. * g++.target/riscv/mvc-symbols1.C: Likewise. * g++.target/riscv/mvc-symbols3.C: Likewise.
This commit is contained in:
parent
d0cc14c62a
commit
fe1e8966cb
33 changed files with 56 additions and 56 deletions
|
@ -57,7 +57,7 @@ int bar(int x)
|
|||
/* { dg-final { scan-assembler-times "\n_Z3foov\.arch__v:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3foov\.arch__zba__zbb:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\call\t_Z3foov\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\call\t_Z3foov(?:@plt)?\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, @gnu_indirect_function\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 1 } } */
|
||||
|
||||
|
@ -65,6 +65,6 @@ int bar(int x)
|
|||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.arch__v:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.arch__zba__zbb:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.resolver:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\call\t_Z3fooi\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\call\t_Z3fooi(?:@plt)?\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3fooi, @gnu_indirect_function\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3fooi,_Z3fooi\.resolver\n" 1 } } */
|
||||
|
|
|
@ -37,7 +37,7 @@ int bar()
|
|||
/* { dg-final { scan-assembler-times "\n_Z3foov\.arch__v:\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3foov\.arch__zba__zbb:\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov(?:@plt)?\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, @gnu_indirect_function\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 1 } } */
|
||||
|
||||
|
@ -45,6 +45,6 @@ int bar()
|
|||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.arch__v:\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.arch__zba__zbb:\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.resolver:\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3fooi\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3fooi(?:@plt)?\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3fooi, @gnu_indirect_function\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3fooi,_Z3fooi\.resolver\n" 0 } } */
|
||||
|
|
|
@ -43,7 +43,7 @@ int bar()
|
|||
/* { dg-final { scan-assembler-times "\n_Z3foov\.arch__v:\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3foov\.arch__zba__zbb:\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov(?:@plt)?\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, @gnu_indirect_function\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 1 } } */
|
||||
|
||||
|
@ -51,6 +51,6 @@ int bar()
|
|||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.arch__v:\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.arch__zba__zbb:\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.resolver:\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3fooi\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3fooi(?:@plt)?\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3fooi, @gnu_indirect_function\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3fooi,_Z3fooi\.resolver\n" 0 } } */
|
||||
|
|
|
@ -49,7 +49,7 @@ int bar()
|
|||
/* { dg-final { scan-assembler-times "\n_Z3foov\.arch__v:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3foov\.arch__zba__zbb:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov(?:@plt)?\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, @gnu_indirect_function\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 1 } } */
|
||||
|
||||
|
@ -57,6 +57,6 @@ int bar()
|
|||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.arch__v:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.arch__zba__zbb:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.resolver:\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3fooi\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3fooi(?:@plt)?\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3fooi, @gnu_indirect_function\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3fooi,_Z3fooi\.resolver\n" 0 } } */
|
||||
|
|
|
@ -36,7 +36,7 @@ int bar(int x)
|
|||
/* { dg-final { scan-assembler-times "\n_Z3foov\.arch__v:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3foov\.arch__zba__zbb:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov(?:@plt)?\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, @gnu_indirect_function\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 1 } } */
|
||||
|
||||
|
@ -44,6 +44,6 @@ int bar(int x)
|
|||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.arch__v:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.arch__zba__zbb:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.resolver:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3fooi\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3fooi(?:@plt)?\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3fooi, @gnu_indirect_function\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3fooi,_Z3fooi\.resolver\n" 1 } } */
|
||||
|
|
|
@ -29,7 +29,7 @@ int bar(int x)
|
|||
/* { dg-final { scan-assembler-times "\n_Z3foov\.arch__v:\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3foov\.arch__zba__zbb:\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov(?:@plt)?\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, @gnu_indirect_function\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 1 } } */
|
||||
|
||||
|
@ -37,6 +37,6 @@ int bar(int x)
|
|||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.arch__v:\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.arch__zba__zbb:\n" 0 } } */
|
||||
/* { dg-final { scan-assembler-times "\n_Z3fooi\.resolver:\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3fooi\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\tcall\t_Z3fooi(?:@plt)?\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.type\t_Z3fooi, @gnu_indirect_function\n" 1 } } */
|
||||
/* { dg-final { scan-assembler-times "\n\t\.set\t_Z3fooi,_Z3fooi\.resolver\n" 1 } } */
|
||||
|
|
|
@ -10,10 +10,10 @@ func (int a, int b);
|
|||
**sum:
|
||||
** ...
|
||||
** cm.mvsa01 s1,s2
|
||||
** call func
|
||||
** call func(?:@plt)?
|
||||
** mv s0,a0
|
||||
** cm.mva01s s1,s2
|
||||
** call func
|
||||
** call func(?:@plt)?
|
||||
** ...
|
||||
*/
|
||||
int
|
||||
|
|
|
@ -95,7 +95,7 @@ COPY_ALIGNED_N(11)
|
|||
/*
|
||||
**copy_15:
|
||||
** ...
|
||||
** (call|tail)\tmemcpy
|
||||
** (call|tail)\tmemcpy(?:@plt)?
|
||||
** ...
|
||||
*/
|
||||
COPY_N(15)
|
||||
|
@ -116,7 +116,7 @@ COPY_ALIGNED_N(15)
|
|||
/*
|
||||
**copy_27:
|
||||
** ...
|
||||
** (call|tail)\tmemcpy
|
||||
** (call|tail)\tmemcpy(?:@plt)?
|
||||
** ...
|
||||
*/
|
||||
COPY_N(27)
|
||||
|
|
|
@ -10,4 +10,4 @@ fmax (double x, double y)
|
|||
|
||||
/* { dg-final { scan-assembler-not "\tfmax\\.d\t" } } */
|
||||
/* { dg-final { scan-assembler-not "\tfge\\.d\t" } } */
|
||||
/* { dg-final { scan-assembler "\t(call|tail)\tfmax\t" } } */
|
||||
/* { dg-final { scan-assembler "\t(call|tail)\tfmax(?:@plt)?\t" } } */
|
||||
|
|
|
@ -10,4 +10,4 @@ fmaxf (float x, float y)
|
|||
|
||||
/* { dg-final { scan-assembler-not "\tfmax\\.s\t" } } */
|
||||
/* { dg-final { scan-assembler-not "\tfge\\.s\t" } } */
|
||||
/* { dg-final { scan-assembler "\t(call|tail)\tfmaxf\t" } } */
|
||||
/* { dg-final { scan-assembler "\t(call|tail)\tfmaxf(?:@plt)?\t" } } */
|
||||
|
|
|
@ -10,4 +10,4 @@ fmin (double x, double y)
|
|||
|
||||
/* { dg-final { scan-assembler-not "\tfmin\\.d\t" } } */
|
||||
/* { dg-final { scan-assembler-not "\tfle\\.d\t" } } */
|
||||
/* { dg-final { scan-assembler "\t(call|tail)\tfmin\t" } } */
|
||||
/* { dg-final { scan-assembler "\t(call|tail)\tfmin(?:@plt)?\t" } } */
|
||||
|
|
|
@ -10,4 +10,4 @@ fminf (float x, float y)
|
|||
|
||||
/* { dg-final { scan-assembler-not "\tfmin\\.s\t" } } */
|
||||
/* { dg-final { scan-assembler-not "\tfle\\.s\t" } } */
|
||||
/* { dg-final { scan-assembler "\t(call|tail)\tfminf\t" } } */
|
||||
/* { dg-final { scan-assembler "\t(call|tail)\tfminf(?:@plt)?\t" } } */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-march=rv64gc -mabi=lp64 -fno-section-anchors -mcmodel=large" } */
|
||||
/* { dg-options "-march=rv64gc -mabi=lp64 -fno-section-anchors -mcmodel=large -fno-pie" } */
|
||||
/* { dg-skip-if "" { *-*-* } {"-O0"} } */
|
||||
int a, b;
|
||||
int foo1()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-march=rv32i -mabi=ilp32 -mcmodel=medlow" } */
|
||||
/* { dg-options "-march=rv32i -mabi=ilp32 -mcmodel=medlow -fno-pie" } */
|
||||
|
||||
int main () {
|
||||
#if !defined(__riscv)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-march=rv64ia -mabi=lp64 -mcmodel=medlow" } */
|
||||
/* { dg-options "-march=rv64ia -mabi=lp64 -mcmodel=medlow -fno-pie" } */
|
||||
|
||||
int main () {
|
||||
#if !defined(__riscv)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-march=rv32em -mabi=ilp32e -mno-div -mcmodel=medlow" } */
|
||||
/* { dg-options "-march=rv32em -mabi=ilp32e -mno-div -mcmodel=medlow -fno-pie" } */
|
||||
|
||||
int main () {
|
||||
#if !defined(__riscv)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-march=rv64em -mabi=lp64e -mno-div -mcmodel=medlow" } */
|
||||
/* { dg-options "-march=rv64em -mabi=lp64e -mno-div -mcmodel=medlow -fno-pie" } */
|
||||
/* { dg-warning "LP64E ABI is marked for deprecation in GCC" "" { target *-*-* } 0 } */
|
||||
/* { dg-note "if you need LP64E please notify the GCC project via PR116152" "" { target *-*-* } 0 } */
|
||||
|
||||
|
|
|
@ -244,9 +244,9 @@ test_f0 ()
|
|||
/*
|
||||
**foo:
|
||||
** cm.push {ra}, -16
|
||||
** call f1
|
||||
** call f1(?:@plt)?
|
||||
** cm.pop {ra}, 16
|
||||
** tail f2
|
||||
** tail f2(?:@plt)?
|
||||
*/
|
||||
void
|
||||
foo (void)
|
||||
|
@ -258,7 +258,7 @@ foo (void)
|
|||
/*
|
||||
**test_popretz:
|
||||
** cm.push {ra}, -16
|
||||
** call f1
|
||||
** call f1(?:@plt)?
|
||||
** li a0,0
|
||||
** cm.popret {ra}, 16
|
||||
*/
|
||||
|
|
|
@ -244,9 +244,9 @@ test_f0 ()
|
|||
/*
|
||||
**foo:
|
||||
** cm.push {ra}, -16
|
||||
** call f1
|
||||
** call f1(?:@plt)?
|
||||
** cm.pop {ra}, 16
|
||||
** tail f2
|
||||
** tail f2(?:@plt)?
|
||||
*/
|
||||
void
|
||||
foo (void)
|
||||
|
@ -258,7 +258,7 @@ foo (void)
|
|||
/*
|
||||
**test_popretz:
|
||||
** cm.push {ra}, -16
|
||||
** call f1
|
||||
** call f1(?:@plt)?
|
||||
** li a0,0
|
||||
** cm.popret {ra}, 16
|
||||
*/
|
||||
|
|
|
@ -51,7 +51,7 @@ foo1 (vint8m1_t a)
|
|||
** vs1r\.v\tv30,0\(sp\)
|
||||
** sub\tsp,sp,t0
|
||||
** vs1r\.v\tv31,0\(sp\)
|
||||
** call\tbar2
|
||||
** call\tbar2(?:@plt)?
|
||||
** csrr\tt0,vlenb
|
||||
** vl1re64\.v\tv31,0\(sp\)
|
||||
** add\tsp,sp,t0
|
||||
|
@ -96,8 +96,8 @@ foo2 (vint8m1_t a)
|
|||
** foo3:
|
||||
** call\tt0,__riscv_save_0
|
||||
** vl1re8\.v\tv8,0\(a0\)
|
||||
** call\tbar1
|
||||
** call\tbar2
|
||||
** call\tbar1(?:@plt)?
|
||||
** call\tbar2(?:@plt)?
|
||||
** tail\t__riscv_restore_0
|
||||
*/
|
||||
void
|
||||
|
|
|
@ -10,7 +10,7 @@ void bar2 ();
|
|||
/*
|
||||
** foo1:
|
||||
** cm.push\t{ra},\s*-16
|
||||
** call\tbar1
|
||||
** call\tbar1(?:@plt)?
|
||||
** cm.popret\t{ra},\s*16
|
||||
*/
|
||||
void
|
||||
|
@ -53,7 +53,7 @@ foo1 (vint8m1_t a)
|
|||
** vs1r\.v\tv30,0\(sp\)
|
||||
** sub\tsp,sp,t0
|
||||
** vs1r\.v\tv31,0\(sp\)
|
||||
** call\tbar2
|
||||
** call\tbar2(?:@plt)?
|
||||
** csrr\tt0,vlenb
|
||||
** vl1re64\.v\tv31,0\(sp\)
|
||||
** add\tsp,sp,t0
|
||||
|
@ -97,7 +97,7 @@ foo2 (vint8m1_t a)
|
|||
** foo3:
|
||||
** cm.push\t{ra},\s*-16
|
||||
** vl1re8\.v\tv8,0\(a0\)
|
||||
** call\tbar1
|
||||
** call\tbar1(?:@plt)?
|
||||
** cm.popret\t{ra},\s*16
|
||||
*/
|
||||
void
|
||||
|
|
|
@ -11,7 +11,7 @@ void bar2 ();
|
|||
** foo1:
|
||||
** addi\tsp,sp,-16
|
||||
** sd\tra,8\(sp\)
|
||||
** call\tbar1
|
||||
** call\tbar1(?:@plt)?
|
||||
** ld\tra,8\(sp\)
|
||||
** addi\tsp,sp,16
|
||||
** jr\tra
|
||||
|
@ -57,7 +57,7 @@ foo1 (vint8m1_t a)
|
|||
** vs1r\.v\tv30,0\(sp\)
|
||||
** sub\tsp,sp,t0
|
||||
** vs1r\.v\tv31,0\(sp\)
|
||||
** call\tbar2
|
||||
** call\tbar2(?:@plt)?
|
||||
** csrr\tt0,vlenb
|
||||
** vl1re64\.v\tv31,0\(sp\)
|
||||
** add\tsp,sp,t0
|
||||
|
@ -105,7 +105,7 @@ foo2 (vint8m1_t a)
|
|||
** addi\tsp,sp,-16
|
||||
** sd\tra,8\(sp\)
|
||||
** vl1re8\.v\tv8,0\(a0\)
|
||||
** call\tbar1
|
||||
** call\tbar1(?:@plt)?
|
||||
** ld\tra,8\(sp\)
|
||||
** addi\tsp,sp,16
|
||||
** jr\tra
|
||||
|
|
|
@ -21,7 +21,7 @@ f1 (void *a, void *b)
|
|||
/* Tiny __builtin_memcmp should use libc.
|
||||
** f2:
|
||||
** li\s+a\d,\d+
|
||||
** tail\s+memcmp
|
||||
** tail\s+memcmp(?:@plt)?
|
||||
*/
|
||||
int
|
||||
f2 (void *a, void *b)
|
||||
|
@ -79,7 +79,7 @@ f5 (void *a, void *b)
|
|||
/* Don't inline if the length is too large for one operation.
|
||||
** f6:
|
||||
** li\s+a2,\d+
|
||||
** tail\s+memcmp
|
||||
** tail\s+memcmp(?:@plt)?
|
||||
*/
|
||||
int
|
||||
f6 (void *a, void *b)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
/* Tiny __builtin_memcmp should use libc.
|
||||
** f1:
|
||||
** li\s+a\d,\d+
|
||||
** tail\s+memcmp
|
||||
** tail\s+memcmp(?:@plt)?
|
||||
*/
|
||||
int
|
||||
f1 (void *a, void *b)
|
||||
|
@ -36,7 +36,7 @@ f2 (void *a, void *b)
|
|||
/* Don't inline if the length is too large for one operation.
|
||||
** f3:
|
||||
** li\s+a2,\d+
|
||||
** tail\s+memcmp
|
||||
** tail\s+memcmp(?:@plt)?
|
||||
*/
|
||||
int
|
||||
f3 (void *a, void *b)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
/* Tiny __builtin_memcmp should use libc.
|
||||
** f1:
|
||||
** li\s+a\d,\d+
|
||||
** tail\s+memcmp
|
||||
** tail\s+memcmp(?:@plt)?
|
||||
*/
|
||||
int
|
||||
f1 (void *a, void *b)
|
||||
|
@ -53,7 +53,7 @@ f3 (void *a, void *b)
|
|||
/* Don't inline if the length is too large for one operation.
|
||||
** f4:
|
||||
** li\s+a2,\d+
|
||||
** tail\s+memcmp
|
||||
** tail\s+memcmp(?:@plt)?
|
||||
*/
|
||||
int
|
||||
f4 (void *a, void *b)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* { dg-do compile { target { ! riscv_abi_e } } } */
|
||||
/* { dg-additional-options "-O1 -fno-schedule-insns -fno-schedule-insns2" } */
|
||||
/* { dg-additional-options "-O1 -fno-schedule-insns -fno-schedule-insns2 -fno-pie" } */
|
||||
/* { dg-add-options riscv_v } */
|
||||
/* { dg-final { check-function-bodies "**" "" } } */
|
||||
|
||||
|
@ -109,4 +109,4 @@ void f3 ()
|
|||
memcpy (&a_a, &a_b, sizeof a_a);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-not {\m(tail|call)\s+memcpy\M} } } */
|
||||
/* { dg-final { scan-assembler-not {\m(tail|call)\s+memcpy(?:@plt)?\M} } } */
|
||||
|
|
|
@ -52,7 +52,7 @@ f3 (char *a, char const *b)
|
|||
/* Don't vectorise if the move is too large for one operation
|
||||
** f4:
|
||||
** li\s+a2,\d+
|
||||
** tail\s+memmove
|
||||
** tail\s+memmove(?:@plt)?
|
||||
*/
|
||||
char *
|
||||
f4 (char *a, char const *b)
|
||||
|
|
|
@ -93,9 +93,9 @@ test_5 (_Float16 *a, _Float16 *b, _Float16 *out, unsigned count)
|
|||
/*
|
||||
** test_6:
|
||||
** ...
|
||||
** call\s+__extendhfsf2
|
||||
** call\s+__extendhfsf2(?:@plt)?
|
||||
** ...
|
||||
** call\s+__truncsfhf2
|
||||
** call\s+__truncsfhf2(?:@plt)?
|
||||
** ...
|
||||
*/
|
||||
void
|
||||
|
|
|
@ -94,7 +94,7 @@ f6 (void *a, int const b)
|
|||
/* Don't vectorise if the move is too large for one operation.
|
||||
** f7:
|
||||
** li\s+a2,\d+
|
||||
** tail\s+memset
|
||||
** tail\s+memset(?:@plt)?
|
||||
*/
|
||||
void *
|
||||
f7 (void *a, int const b)
|
||||
|
|
|
@ -44,7 +44,7 @@ f2 (void *a, int const b)
|
|||
/* Don't vectorise if the move is too large for requested lmul.
|
||||
** f3:
|
||||
** li\s+a2,\d+
|
||||
** tail\s+memset
|
||||
** tail\s+memset(?:@plt)?
|
||||
*/
|
||||
void *
|
||||
f3 (void *a, int const b)
|
||||
|
|
|
@ -62,7 +62,7 @@ f3 (void *a, int const b)
|
|||
/* Don't vectorise if the move is too large for requested lmul.
|
||||
** f4:
|
||||
** li\s+a2,\d+
|
||||
** tail\s+memset
|
||||
** tail\s+memset(?:@plt)?
|
||||
*/
|
||||
void *
|
||||
f4 (void *a, int const b)
|
||||
|
|
|
@ -18,7 +18,7 @@ void f (char*);
|
|||
** ...
|
||||
** addi\ta0,sp,15
|
||||
** andi\ta0,a0,-16
|
||||
** call\tf
|
||||
** call\tf(?:@plt)?
|
||||
** ...
|
||||
** lw\tra,12\(sp\)
|
||||
** lw\ts0,8\(sp\)
|
||||
|
|
|
@ -10,7 +10,7 @@ bar ();
|
|||
**fool_rv32e:
|
||||
** cm.push {ra}, -32
|
||||
** ...
|
||||
** call bar
|
||||
** call bar(?:@plt)?
|
||||
** ...
|
||||
** lw a[0-5],32\(sp\)
|
||||
** ...
|
||||
|
|
Loading…
Add table
Reference in a new issue