I am working on a GPIO IP for Designstart Pro Cortex-M0. Now in my Simulation there are some Read-Modify-Write cycles in order to set only single bits in a 32 bit register.
If the GPIO register is 0x0000000X and I just want to set bit 16, GCC produces [0x0000000X ORRS 0x00010000] and what the ALU makes out of it is then 0xXXXXXXXX.
Is this correct behaviour? I expected the result to be 0x0001000X.
tldr; ALU: [0x0000000X ORRS 0x00010000] = 0xXXXXXXXX
I'm sure because I can trace the signal in the modelsim simulation down to the alu. Also the X in the GPIO is correct behaviour.