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