HC11 core: fixed N flag in 16-bit operations. (nw)

This commit is contained in:
Sandro Ronco 2012-09-12 17:09:48 +00:00
parent e634c5b4e5
commit 103dcf66ae

View File

@ -1,7 +1,7 @@
#define SET_Z8(r) (cpustate->ccr |= ((UINT8)r == 0) ? CC_Z : 0)
#define SET_Z16(r) (cpustate->ccr |= ((UINT16)r == 0) ? CC_Z : 0)
#define SET_N8(r) (cpustate->ccr |= (r & 0x80) ? CC_N : 0)
#define SET_N16(r) (cpustate->ccr |= (r & 0x80) ? CC_N : 0)
#define SET_N16(r) (cpustate->ccr |= (r & 0x8000) ? CC_N : 0)
#define SET_V_ADD8(r,s,d) (cpustate->ccr |= (((r) ^ (s)) & ((r) ^ (d)) & 0x80) ? CC_V : 0)
#define SET_V_SUB8(r,s,d) (cpustate->ccr |= (((d) ^ (s)) & ((d) ^ (r)) & 0x80) ? CC_V : 0)
#define SET_V_ADD16(r,s,d) (cpustate->ccr |= (((r) ^ (s)) & ((r) ^ (d)) & 0x8000) ? CC_V : 0)