]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: More SME vs -mtrack-speculation
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 21 Feb 2024 11:12:29 +0000 (11:12 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Wed, 21 Feb 2024 11:12:29 +0000 (11:12 +0000)
commit38004cf8699a82790d83846e3bd37e151e709ede
tree5fe19dd18dc93c6941420be20a7085663ace2aeb
parent3651b1b23fdd30fd00f0cd08ec4806dd16d1f3d3
aarch64: More SME vs -mtrack-speculation

The sequence to commit a lazy save includes a branch based on
whether TPIDR2_EL0 is zero.  The code assumed that CBZ could
be used for this, but that instruction is forbidden when
-mtrack-speculation is being used.

gcc/
* config/aarch64/aarch64.cc (aarch64_mode_emit_local_sme_state):
Use aarch64_gen_compare_zero_and_branch rather than emitting
a CBZ directly.

gcc/testsuite/
* gcc.target/aarch64/sme/locally_streaming_1_ts.c: New test.
* gcc.target/aarch64/sme/sibcall_7_ts.c: Likewise.
gcc/config/aarch64/aarch64.cc
gcc/testsuite/gcc.target/aarch64/sme/locally_streaming_1_ts.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sme/sibcall_7_ts.c [new file with mode: 0644]