builtin-bswap-1.c
1.15 KB
-
[arm] PR target/65578: Fix builtin-bswap16-1.c and builtin-bswap-1.c · c5affc04
The builtin-bswap-1.c and builtin-bswap16-1.c are pretty annoying at the moment. They force an explicit armv6 option that is a thumb1 target, so if you're testing a toolchain configured with something like --with-cpu=cortex-a15 --with-float=hard --with-mode=thumb you'll get those pesky errors about Thumb1 hard-float not being implemented, even though the tests don't relate to floating-point functionality at all. I *think* this is also due to the wrong order of dg-options and dg-require-effective-target directives that might end up not doing a proper effective target check. The solution in this patch is to commonise the code and create a couple of tests for each. One tests an armv6t2 target. This allows us to test an ARM or a Thumb2 target. The second one sets an armv6-m target, which is a Thumb1 target. The dg-add-options machinery for arm_arch_v6m knows how to add the right -mfloat-abi=soft option. With this patch we end up testing all of ARM, Thumb1, Thumb2 codegen whereas before we only ever tried testing Thumb1, if the multilib options happened to line up just right, and would give an ugly error otherwise. Now, if the multilib options don't allow the test it should just appear as UNSUPPORTED. PR target/65578 * gcc.target/arm/builtin-bswap.x: New file. * gcc.target/arm/builtin-bswap-1.c: Include the above. Add checks and options for armv6t2. * gcc.target/arm/builtin-bswap-2.c: Include the above. Add checks and options for Thumb1. * gcc.target/arm/builtin-bswap16.x: New file. * gcc.target/arm/builtin-bswap16-1.c: Include the above. Add checks and options for armv6t2. * gcc.target/arm/builtin-bswap16-2.c: Include the above. Add checks and options for Thumb1. From-SVN: r256840
Kyrylo Tkachov committed