Technical information

Operating Precautions for CPDW9X/NT-CDR-V85X, Y-GHS-MULTI-V800
TM
Customer Notification r20tu0003ed1812 80
2. For compilers Ver. 3.5.1
2.1 Do not use one of these switches
'#pragma pack(n)' or
-pack=n via commandline
if n!=8 (the default setting).
2.2 Do not create a new block within the preprocessor macro, instead use a common variable.
Example:
extern unsigned int __psw; // global or static variable __psw
asm int IRQ_suspend(void) {
stsr PSW, r10
di
}
asm void IRQ_restore (int oldPSW) {
%reg oldPSW
ldsr oldPSW, PSW
%error
}
#define ATOMIC_BLOCK_START \
__psw = IRQ_suspend();
#define ATOMIC_BLOCK_END \
IRQ_restore(__psw); \
3. For compiler versions 4.0.0 up to 4.2.1
3.1 Use new intrinsic function __GETSR()/__SETSR() to handle PSW values
#define ATOMIC_BLOCK_START \
{ \
int psw = __GETSR(); \
__DI();
#define ATOMIC_BLOCK_END \
__SETSR(psw); \
}
3.2 Use command line option '-misalign_pack'