Commit 9c4cb861 by Sam Tebbs Committed by Sam Tebbs

[PATCH][GCC][AARCH64] Add effective-target check to b key execution tests

gcc/testsuite
2019-08-09  Sam Tebbs<sam.tebbs@arm.com>

	* lib/target-supports.exp
	(check_effective_target_arm_v8_4a_bkey_directive): New proc.
	* g++.target/aarch64/return_address_sign_b_exception.C,
	return_address_sign_ab_exception.C: Add dg-require-effective-target
	checks.

From-SVN: r274236
parent 33e8e0ee
2019-08-09 Sam Tebbs <sam.tebbs@arm.com>
* lib/target-supports.exp
(check_effective_target_arm_v8_4a_bkey_directive): New proc.
* g++.target/aarch64/return_address_sign_b_exception.C,
return_address_sign_ab_exception.C: Add dg-require-effective-target
checks.
2019-08-09 Richard Sandiford <richard.sandiford@arm.com> 2019-08-09 Richard Sandiford <richard.sandiford@arm.com>
PR middle-end/90313 PR middle-end/90313
......
/* { dg-do run } */ /* { dg-do run } */
/* { dg-options "--save-temps" } */ /* { dg-options "--save-temps" } */
/* { dg-require-effective-target arm_v8_3a_bkey_directive } */
__attribute__((target("branch-protection=pac-ret+leaf"))) __attribute__((target("branch-protection=pac-ret+leaf")))
int foo_a () { int foo_a () {
......
/* { dg-do run } */ /* { dg-do run } */
/* { dg-options "-mbranch-protection=pac-ret+leaf+b-key --save-temps" } */ /* { dg-options "-mbranch-protection=pac-ret+leaf+b-key --save-temps" } */
/* { dg-require-effective-target arm_v8_3a_bkey_directive } */
int foo () { int foo () {
throw 22; throw 22;
......
...@@ -9463,6 +9463,16 @@ proc check_effective_target_arm_v8_3a_complex_neon_hw { } { ...@@ -9463,6 +9463,16 @@ proc check_effective_target_arm_v8_3a_complex_neon_hw { } {
} [add_options_for_arm_v8_3a_complex_neon ""]] } [add_options_for_arm_v8_3a_complex_neon ""]]
} }
# Return 1 if the assembler supports assembling the Armv8.3 pointer authentication B key directive
proc check_effective_target_arm_v8_3a_bkey_directive { } {
return [check_no_compiler_messages cet object {
int main(void) {
asm (".cfi_b_key_frame");
return 0;
}
}]
}
# Returns 1 if the target is using glibc, 0 otherwise. # Returns 1 if the target is using glibc, 0 otherwise.
proc check_effective_target_glibc { } { proc check_effective_target_glibc { } {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment