forked from Imagelibrary/binutils-gdb
If the value to be shifted has the sign bit set, the sign bit would get copied into bits 32..63 of the temporary. Those would then be right shifted into the final value giving an incorrect final result. This was observed with upcoming GCC improvements which eliminate unnecessary extensions.
26 lines
270 B
ArmAsm
26 lines
270 B
ArmAsm
# check that lsri works correctly
|
|
# mach: mcore
|
|
|
|
.include "testutils.inc"
|
|
|
|
start
|
|
# Construct -1
|
|
bmaski r2, 32
|
|
|
|
# logical shift right by 24
|
|
lsri r2, 24
|
|
|
|
# Construct 255
|
|
bmaski r1, 8
|
|
|
|
# Compare them, they should be equal
|
|
cmpne r2,r1
|
|
jbt .L1
|
|
pass
|
|
.L1:
|
|
fail
|
|
|
|
|
|
|
|
|