forked from Imagelibrary/binutils-gdb
sim: bfin: handle negative left saturated shifts as ashifts [BZ #18407]
When handling left saturated ashifts with negative immediates, they should be treated as right ashifts. This matches hardware behavior. Reported-by: Igor Rayak <igorr@gitatechnologies.com>
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2015-10-11 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
PR sim/18407
|
||||
* ashift_left.s: New test.
|
||||
|
||||
2013-12-07 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* run-tests.sh: Add +x file mode.
|
||||
|
||||
17
sim/testsuite/sim/bfin/ashift_left.s
Normal file
17
sim/testsuite/sim/bfin/ashift_left.s
Normal file
@@ -0,0 +1,17 @@
|
||||
# Blackfin testcase for left ashift
|
||||
# Dreg = Dreg << imm (S);
|
||||
# mach: bfin
|
||||
|
||||
.include "testutils.inc"
|
||||
|
||||
.macro test in:req, shift:req, out:req, opt
|
||||
imm32 r0, \in;
|
||||
r1 = r0 >>> \shift \opt;
|
||||
CHECKREG r1, \out;
|
||||
.endm
|
||||
|
||||
start
|
||||
|
||||
test 2, 1, 1, (S);
|
||||
|
||||
pass
|
||||
Reference in New Issue
Block a user