Using the assembler in the STVP tool, it looks like the 0x90-prefixed opcodes add 3. 0x8000 | 0x2706 | JREQ 0x8008 So 0x8000 + 2 + 6 = 0x8008. 0x8010 | 0x902905 | JRH 0x8018 So 0x8010 + 3 + 5 = 0x8018. And an example for a conditional "jump to self": 0x8020 | 0x9029FD | JRH 0x8020 So 0x8020 + 3 - 3 = 0x8020. The PM0044 Rev 2 manual says on JRxx: Syntax: JRxx dst Operation: PC = PC+lgth PC <= PC + dst, if Condition is True In the instruction list lgth is listed as 2 or 3 depending on the 0x90 prefix....
This issue also is resolved by the fix made for [#2873].
I tried the fix and can report that the issue is solved. In the test code, f1 and f2 now yield the same (correct) result.
For some reason the attached file is empty. Trying again...
incorrect code generated for return statement (regression)
error 2: Initializer element is not a constant expression (regression)