Technical information
Operating Precautions for CPDW9X/NT-CDR-V85X, Y-GHS-MULTI-V800
TM
  Customer Notification r20tu0003ed1812  79 
No. a69 
Out-Of-Order Code Generation 
Version Information  
 V3.5.1,V4.0.5, V4.0.7, V4.0.7A 
Details: 
The usage of an assembler macro within a preprocessor defintion decaolaring a new block may 
result in out-of-order code generation, if used within a function and the structure packing feature 
is used. 
Example: 
asm int IRQ_suspend(void) { 
 stsr PSW, r10 
 di 
} 
asm void IRQ_restore (int oldPSW) { 
%reg oldPSW 
 ldsr oldPSW, PSW 
%error 
} 
#define ABS \ 
{ // new block decalred here \ 
 int psw = IRQ_suspend(); // psw is locally available only! 
#define ABE \ 
 IRQ_restore(__psw); \ 
}  // new block ends here 
void foo( void) 
{ 
 ABS 
 ... 
 foosub(); 
 ... 
 ABE 
 ... 
} 
It is most likely that with –pack=1 the block end substitution code is executed directly after the 
block started. 
Command Line 
ccv850 –pack=1 test.c 
Workaround 
1. Use latest compiler release 4.2.3 










