I'm trying to replace some of the macros that get created by the MCF52233 compiler with atomic operations. For example, I'm using things like
MCF_PIT0_PCSR |= 1
But this compiles into numerous instructions. I need to be able to set this bit in a single instruction. Looking through the instruction set, I see that subq, addq, and bset all have the same allowable format of '#<data>,<ea>x'
So if I try to compile
subq #1, 40000000
addq #1, 40000000
everything is fine, but if I compile
bset #1, 40000000 or
bclr #1, 40000000
I get a compile error 'illegal addressing mode'. So it is not clear to me why this same mode works for some commands and not others when they all allegedly accept it.