This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Optimizing CCS output to produce MSP430 Instructions Bit-Set and Bit-Clear.....



Hello,

 

I am using CCSv4 with the MSP4302618.  I have noticed that the compiler does not always produce assembly language output using the MSP430 instructions "bic.b" and "bis.b" when using statements like "P5OUT &= 0xF7;".

My question is.....What level of optimization is needed to coerce the CCSv4 compiler to always produce the corresponding bit-set and bit-clr instructions. 

I am familiar with the the compiler intrinsic functions listed in in430.h.

Perhaps it is possible to use the ASM statement (listed in slau132e.pdf).  I have not had much luck in creating a general purpose macro.

I would appreciate any thoughts on the best way to change CCSv4 optimization or to use the ASM statement to provide a general purpose macro.

Thanks in advance for your assistance.

 

....EmbeddedGuy