0

Hello support team,

I’m facing unexpected behavior of compiled code with -O0 optimize option. The following code is expected to toggle P5.2 every function call but it doesn’t work. According to disassembly view and objdump result, there are strange code ‘xor1 cy, a.7’ and ‘mov1 cy, 0xffef8.2’.

(1) ‘xor1 cy, a.7’ –> What is the purpose of this code?
(2) ‘mov1 cy, 0xffef8.2’ –> Is this code correct? It seems that this code should be ‘mov1 cy, 0xffef8.0′
(2’) or ‘movw de, #1’ –> This code might be ‘movw de, #0b00000100’

Screen copies:


Best regards,
NoMaY

[Added]

Also the previous shared RL78/G14 LLVM project shows the same strange code (in case of -O0 optimize option).

Screen copy:

Best regards,
NoMaY

[Added]

Please note that programs doesn’t work due to stack size problem of my side at lower optimization level as of today even if this issued will be solved.

Best regards,
NoMaY

Open Source Tools for Renesas commented