mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
1368b914e9
Now that all port tests live under testsuite/sim/*/, and none live in testsuite/ directly, flatten the structure by moving all of the dirs under testsuite/sim/ to testsuite/ directly. We need to stop passing --tool to dejagnu so that it searches all dirs and not just ones that start with "sim". Since we have no other dirs in this tree, and no plans to add any, should be fine.
92 lines
1.0 KiB
Plaintext
92 lines
1.0 KiB
Plaintext
# v850 shr
|
|
# mach: all
|
|
|
|
.include "testutils.inc"
|
|
|
|
# CY is set to 1 if the bit shifted out last is 1, else 0
|
|
# OV is set to zero.
|
|
# Z is set if the result is 0, else 0
|
|
|
|
noflags
|
|
seti 4, r1
|
|
seti 0x00000000, r2
|
|
shr r1, r2
|
|
|
|
flags z
|
|
reg r2, 0
|
|
|
|
noflags
|
|
seti 4, r1
|
|
seti 0x00000001, r2
|
|
shr r1, r2
|
|
|
|
flags z
|
|
reg r2, 0
|
|
|
|
noflags
|
|
seti 4, r1
|
|
seti 0x00000008, r2
|
|
shr r1, r2
|
|
|
|
flags c + z
|
|
reg r2, 0
|
|
|
|
noflags
|
|
seti 0x00000000, r2
|
|
shr 4, r2
|
|
|
|
flags z
|
|
reg r2, 0
|
|
|
|
noflags
|
|
seti 0x00000001, r2
|
|
shr 4, r2
|
|
|
|
flags z
|
|
reg r2, 0
|
|
|
|
noflags
|
|
seti 0x00000008, r2
|
|
shr 4, r2
|
|
|
|
flags c + z
|
|
reg r2, 0
|
|
|
|
# However, if the number of shifts is 0, CY is 0.
|
|
|
|
noflags
|
|
seti 0, r1
|
|
seti 0xffffffff, r2
|
|
shr r1, r2
|
|
|
|
flags s
|
|
reg r2, 0xffffffff
|
|
|
|
noflags
|
|
seti 0xffffffff, r2
|
|
shr 0, r2
|
|
|
|
flags s
|
|
reg r2, 0xffffffff
|
|
|
|
# Zere is shifted into the MSB
|
|
# S is 1 if the result is negative, else 0
|
|
|
|
noflags
|
|
seti 1, r1
|
|
seti 0x80000000, r2
|
|
shr r1, r2
|
|
|
|
flags 0
|
|
reg r2, 0x40000000
|
|
|
|
noflags
|
|
seti 1, r1
|
|
seti 0x40000000, r2
|
|
shr r1, r2
|
|
|
|
flags 0
|
|
reg r2, 0x20000000
|
|
|
|
pass
|