binutils-gdb/sim/testsuite/bfin/testset2.s
Mike Frysinger 1368b914e9 sim: testsuite: flatten tree
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.
2021-01-15 19:18:34 -05:00

38 lines
675 B
ArmAsm

// testset instruction
//TESTSET is an atomic test-and-set.
//If the lock was not set prior to the TESTSET, cc is set, the lock bit is set,
//and this processor gets the lock. If the lock was set
//prior to the TESTSET, cc is cleared, the lock bit is still set,
//but the processor fails to acquire the lock.
# mach: bfin
.include "testutils.inc"
start
loadsym P0, datalabel;
R0 = 0;
CC = R0;
R0 = B [ P0 ] (Z);
DBGA ( R0.L , 0 );
TESTSET ( P0 );
R0 = CC;
DBGA ( R0.L , 1 );
R0 = B [ P0 ] (Z);
DBGA ( R0.L , 0x80 );
R0 = 0;
CC = R0;
TESTSET ( P0 );
R0 = CC;
DBGA ( R0.L , 0 );
R0 = B [ P0 ] (Z);
DBGA ( R0.L , 0x80 );
pass
.data
datalabel:
.dw 0