Skip to content
Snippets Groups Projects
Commit 4eb01f98 authored by Alex Coplan's avatar Alex Coplan
Browse files

aarch64: Allow compiler to define ls64 builtins [PR110132]

This patch refactors the ls64 builtins to allow the compiler to define them
directly instead of having wrapper functions in arm_acle.h. This should be not
only easier to maintain, but it makes two important correctness fixes:
 - It fixes PR110132, where the builtins ended up getting declared with
   invisible bindings in the C FE, so the FE ended up synthesizing
   incompatible implicit definitions for these builtins.
 - It allows the builtins to be used with LTO, which didn't work previously.

We also take the opportunity to add test coverage from C++ for these
builtins.

gcc/ChangeLog:

	PR target/110132
	* config/aarch64/aarch64-builtins.cc (aarch64_general_simulate_builtin):
	New. Use it ...
	(aarch64_init_ls64_builtins): ... here. Switch to declaring public ACLE
	names for builtins.
	(aarch64_general_init_builtins): Ensure we invoke the arm_acle.h
	setup if in_lto_p, just like we do for SVE.
	* config/aarch64/arm_acle.h: (__arm_ld64b): Delete.
	(__arm_st64b): Delete.
	(__arm_st64bv): Delete.
	(__arm_st64bv0): Delete.

gcc/testsuite/ChangeLog:

	PR target/110132
	* lib/target-supports.exp (check_effective_target_aarch64_asm_FUNC_ok):
	Extend to ls64.
	* g++.target/aarch64/acle/acle.exp: New.
	* g++.target/aarch64/acle/ls64.C: New test.
	* g++.target/aarch64/acle/ls64_lto.C: New test.
	* gcc.target/aarch64/acle/ls64_lto.c: New test.
	* gcc.target/aarch64/acle/pr110132.c: New test.

(cherry picked from commit 9963029a)
parent 9df688cb
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment