Revision bbaf29c7 target-cris/op.c
b/target-cris/op.c | ||
---|---|---|
967 | 967 |
The N flag is set according to the selected bit in the dest reg. |
968 | 968 |
The Z flag is set if the selected bit and all bits to the right are |
969 | 969 |
zero. |
970 |
The X flag is cleared. |
|
971 |
Other flags are left untouched. |
|
970 | 972 |
The destination reg is not affected.*/ |
971 | 973 |
unsigned int fz, sbit, bset, mask, masked_t0; |
972 | 974 |
|
... | ... | |
975 | 977 |
mask = sbit == 31 ? -1 : (1 << (sbit + 1)) - 1; |
976 | 978 |
masked_t0 = T0 & mask; |
977 | 979 |
fz = !(masked_t0 | bset); |
980 |
|
|
981 |
/* Clear the X, N and Z flags. */ |
|
982 |
T0 = env->pregs[PR_CCS] & ~(X_FLAG | N_FLAG | Z_FLAG); |
|
978 | 983 |
/* Set the N and Z flags accordingly. */ |
979 |
T0 = (bset << 3) | (fz << 2); |
|
984 |
T0 |= (bset << 3) | (fz << 2);
|
|
980 | 985 |
RETURN(); |
981 | 986 |
} |
982 | 987 |
|
Also available in: Unified diff