__builtin_cmse_nonsecure_caller implementation returns true in almost all cases due to 2 separate bugs: * gen_addsi is used instead of gen_andsi to retrieve the lsb * the lsb boolean value is not negated but the specification says the intrinsic should return true for a nonsecure caller and a nonsecure caller is characterized with LR's lsb being 0 This was not caught due to (1) lack of runtime test and (2) the existing RTL scan not taking into account that '.' matches newline in Tcl regular expressions. This commit fixes the implementation issues and improves testing of cmse_nonsecure_caller by (1) adding a runtime test for the secure caller case and (2) looking for an SET insn of an AND expression in the right function. This leaves the nonsecure caller case only partly tested since the exact value being AND and the negation are not covered by the scan and the existing test infrastructure does not allow 2 separate compilation and link to be performed. It is enough though to catch the current incorrect behavior. The commit also reorganize the scan directives in cmse-1.c to more easily identify what function they are intended to test in the file. 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/ PR target/85203 * config/arm/arm-builtins.c (arm_expand_builtin): Change expansion to perform a bitwise AND of the argument followed by a boolean negation of the result. gcc/testsuite/ PR target/85203 * gcc.target/arm/cmse/cmse-1.c: Tighten cmse_nonsecure_caller RTL scan to match a single insn of the baz function. Move scan directives at the end of the file below the functions they are trying to test for better readability. * gcc.target/arm/cmse/cmse-16.c: New testcase. From-SVN: r259097
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
README-interworking | Loading commit data... | |
aarch-common-protos.h | Loading commit data... | |
aarch-common.c | Loading commit data... | |
aarch-cost-tables.h | Loading commit data... | |
aout.h | Loading commit data... | |
arm-builtins.c | Loading commit data... | |
arm-c.c | Loading commit data... | |
arm-cpus.in | Loading commit data... | |
arm-fixed.md | Loading commit data... | |
arm-flags.h | Loading commit data... | |
arm-generic.md | Loading commit data... | |
arm-ldmstm.ml | Loading commit data... | |
arm-modes.def | Loading commit data... | |
arm-opts.h | Loading commit data... | |
arm-protos.h | Loading commit data... | |
arm-simd-builtin-types.def | Loading commit data... | |
arm-tables.opt | Loading commit data... | |
arm-tune.md | Loading commit data... | |
arm.c | Loading commit data... | |
arm.h | Loading commit data... | |
arm.md | Loading commit data... | |
arm.opt | Loading commit data... | |
arm1020e.md | Loading commit data... | |
arm1026ejs.md | Loading commit data... | |
arm1136jfs.md | Loading commit data... | |
arm926ejs.md | Loading commit data... | |
arm_acle.h | Loading commit data... | |
arm_acle_builtins.def | Loading commit data... | |
arm_cmse.h | Loading commit data... | |
arm_fp16.h | Loading commit data... | |
arm_neon.h | Loading commit data... | |
arm_neon_builtins.def | Loading commit data... | |
arm_vfp_builtins.def | Loading commit data... | |
bpabi.h | Loading commit data... | |
constraints.md | Loading commit data... | |
cortex-a15-neon.md | Loading commit data... | |
cortex-a15.md | Loading commit data... | |
cortex-a17-neon.md | Loading commit data... | |
cortex-a17.md | Loading commit data... | |
cortex-a5.md | Loading commit data... | |
cortex-a53.md | Loading commit data... | |
cortex-a57.md | Loading commit data... | |
cortex-a7.md | Loading commit data... | |
cortex-a8-neon.md | Loading commit data... | |
cortex-a8.md | Loading commit data... | |
cortex-a9-neon.md | Loading commit data... | |
cortex-a9.md | Loading commit data... | |
cortex-m4-fpu.md | Loading commit data... | |
cortex-m4.md | Loading commit data... | |
cortex-m7.md | Loading commit data... | |
cortex-r4.md | Loading commit data... | |
cortex-r4f.md | Loading commit data... | |
crypto.def | Loading commit data... | |
crypto.md | Loading commit data... | |
driver-arm.c | Loading commit data... | |
elf.h | Loading commit data... | |
exynos-m1.md | Loading commit data... | |
fa526.md | Loading commit data... | |
fa606te.md | Loading commit data... | |
fa626te.md | Loading commit data... | |
fa726te.md | Loading commit data... | |
fmp626.md | Loading commit data... | |
freebsd.h | Loading commit data... | |
fuchsia-elf.h | Loading commit data... | |
iterators.md | Loading commit data... | |
iwmmxt.md | Loading commit data... | |
iwmmxt2.md | Loading commit data... | |
ldmstm.md | Loading commit data... | |
ldrdstrd.md | Loading commit data... | |
linux-eabi.h | Loading commit data... | |
linux-elf.h | Loading commit data... | |
linux-gas.h | Loading commit data... | |
marvell-f-iwmmxt.md | Loading commit data... | |
marvell-pj4.md | Loading commit data... | |
mmintrin.h | Loading commit data... | |
neon.md | Loading commit data... | |
netbsd-elf.h | Loading commit data... | |
parsecpu.awk | Loading commit data... | |
predicates.md | Loading commit data... | |
rtems.h | Loading commit data... | |
semi.h | Loading commit data... | |
symbian.h | Loading commit data... | |
sync.md | Loading commit data... | |
t-aprofile | Loading commit data... | |
t-arm | Loading commit data... | |
t-arm-elf | Loading commit data... | |
t-bpabi | Loading commit data... | |
t-fuchsia | Loading commit data... | |
t-linux-androideabi | Loading commit data... | |
t-linux-eabi | Loading commit data... | |
t-multilib | Loading commit data... | |
t-phoenix | Loading commit data... | |
t-rmprofile | Loading commit data... | |
t-rtems | Loading commit data... | |
t-symbian | Loading commit data... | |
t-vxworks | Loading commit data... | |
thumb1.md | Loading commit data... | |
thumb2.md | Loading commit data... | |
types.md | Loading commit data... | |
uclinux-eabi.h | Loading commit data... | |
uclinux-elf.h | Loading commit data... | |
unknown-elf.h | Loading commit data... | |
unspecs.md | Loading commit data... | |
vec-common.md | Loading commit data... | |
vfp.md | Loading commit data... | |
vfp11.md | Loading commit data... | |
vxworks.h | Loading commit data... | |
vxworks.opt | Loading commit data... | |
x-arm | Loading commit data... | |
xgene1.md | Loading commit data... |