-
Enhancement
-
Resolution: Implemented
-
Low
-
Code Generation Tools
-
CODEGEN-7115
-
MSP430_18.12.2.LTS
-
MSP430_20.2.0.LTS*
-
default
The attached file contains this line ...
dst &= ~src;
The variables dst and src are of type unsigned char. Build it with optimization ...
cl430 -o -s try1.c
The resulting assembly for that line is ...
;** 5 ----------------------- dst &= src^0xff; .dwpsn file "try1.c",line 5,column 5,is_stmt,isa 0 MOV.W #255,r15 ; [] |5| XOR.B &src+0,r15 ; [] |5| AND.B r15,&dst+0 ; [] |5|
However, build it with optimization disabled ...
cl430 -ooff -s try1.c
... and the generated code uses the BIC instruction ...
;---------------------------------------------------------------------- ; 5 | dst &= ~src; ;---------------------------------------------------------------------- BIC.B &src+0,&dst+0 ; [] |5|