Hello,
First of all, sorry for not putting this into MSP microcontrollers forum - the MSP-CGT seems to be under (incorrect?) ARM-based MCUs...
I think there is an opportunity for a small optimisation of the following C snippet. After checking the return value of function "boolean_test_func" (in register R12), the generated instructions should not need to clear R12 before returning from "func" as this has already been cleared by "boolean_test_func".
...
func()
...
0x0E066 12B0 E00E CALL #boolean_test_func
0x0E06A 934C TST.B R12
0x0E06C 2416 JEQ ($C$L46)
...
0x0E096 435C MOV.B #1,R12
0x0E098 4130 RET
$C$L46
0x0E09A 434C CLR.B R12
0x0E09C 4130 RET
func()
...
0x0E066 12B0 E00E CALL #boolean_test_func
0x0E06A 934C TST.B R12
0x0E06C 2416 JEQ ($C$L46)
...
0x0E096 435C MOV.B #1,R12
$C$L46
0x0E098 4130 RET
Four bytes saved
Kind regards,
Michal