mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
b3fa92f12a
This came up testing the CRC optimization work from Mariam@RAU. Basically to optimize some CRC loops into table lookups or carryless multiplies, we may need to do a bit reflection, which on the mcore processor is done using a rotate instruction. Unfortunately the simulator implementation of rotates has the exact same problem as we saw with right shifts. The input value may have been sign extended from 32 to 64 bits. When we rotate the extended value, we get those sign extension bits and thus the wrong result. The fix is the same. Rather than using a "long", use a uint32_t for the type of the temporary. This fixes a handful of tests in the GCC testsuite: |
||
---|---|---|
.. | ||
aarch64 | ||
arm | ||
avr | ||
bfin | ||
bpf | ||
common | ||
config | ||
cr16 | ||
cris | ||
d10v | ||
example-synacor | ||
frv | ||
ft32 | ||
h8300 | ||
iq2000 | ||
lib | ||
lm32 | ||
m32c | ||
m32r | ||
m68hc11 | ||
mcore | ||
microblaze | ||
mips | ||
mn10300 | ||
moxie | ||
msp430 | ||
or1k | ||
pru | ||
riscv | ||
sh | ||
v850 | ||
.gitignore | ||
ChangeLog-2021 | ||
local.mk |