Beta 7.3.0 - miscalculated jumps

Beta Testing discussion on mikroC PRO for PIC.
Post Reply
Author
Message
janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Beta 7.3.0 - miscalculated jumps

#1 Post by janni » 29 Jan 2019 13:17

I'm afraid that there's an error in jump address calculation when MOVFFL instructions are implicitly used in code:

Code: Select all

  asm {
         bra      label1
         nop
         nop
         movffl   INDF0,R1
         nop                // jump lands here
         nop
  label1:
         nop                // instead of here
}

Code: Select all

0x2230	0xD005      	BRA    label1  <-- relative jump short three words
0x2232	0x0000      	NOP
0x2234	0x0000      	NOP
0x2236	0xF001FFBC006F  MOVFFL  INDF0, 1  <-- omitted in calculations?
0x223C	0x0000      	NOP
0x223E	0x0000      	NOP
label1:
0x2240	0x0000      	NOP
It does not matter whether it's a relative or absolute jump (or call) - error is the same. But there's no error if MOVFF (invalid here) instruction is used and linker replaces it automatically with MOVFFL (which explains why this wasn't spotted immediately).

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Beta 7.3.0 - miscalculated jumps

#2 Post by filip » 30 Jan 2019 11:36

Hi,

Thank you for your report, I will consult our developers regarding this issue.

Regards,
Filip.

Post Reply

Return to “mikroC PRO for PIC Beta Testing”