aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2022-12-13 18:01:15 +0000
committerTamar Christina <tamar.christina@arm.com>2022-12-13 18:01:15 +0000
commit69ec1e2065ac43eea44fdfa703cf027ce72a62da (patch)
tree50c8cc2ae7f6efc20b89dcc5a30dea3b7b37e58a /gcc
parent33be3ee36a7e2c0be383ec01b5fbc9aef39568fd (diff)
downloadgcc-69ec1e2065ac43eea44fdfa703cf027ce72a62da.zip
gcc-69ec1e2065ac43eea44fdfa703cf027ce72a62da.tar.gz
gcc-69ec1e2065ac43eea44fdfa703cf027ce72a62da.tar.bz2
AArch64: Fix ILP32 tbranch
the baremetal builds are currently broken because the shift ends up in the wrong representation if the mode is SImode and the shift amount if 31. To fix this create the rtx constant with an explicit mode so the backend passes know which representation it needs to take. gcc/ChangeLog: * config/aarch64/aarch64.md (tbranch_<code><mode>3): Use gen_int_mode.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/aarch64/aarch64.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index d749c98..6c27fb8 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -957,7 +957,7 @@
{
rtx bitvalue = gen_reg_rtx (<ZEROM>mode);
rtx reg = gen_lowpart (<ZEROM>mode, operands[0]);
- rtx val = GEN_INT (1UL << UINTVAL (operands[1]));
+ rtx val = gen_int_mode (HOST_WIDE_INT_1U << UINTVAL (operands[1]), <MODE>mode);
emit_insn (gen_and<zerom>3 (bitvalue, reg, val));
operands[1] = const0_rtx;
operands[0] = aarch64_gen_compare_reg (<CODE>, bitvalue,