View Single Post
Old 10 August 2020, 14:03   #128
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
Quote:
Originally Posted by Toni Wilen View Post
Instruction prefetch read hits the variable address. Either it happens when branch is executed (branch + next word/long gets loaded depending on alignment) or when jumping to RTS and RTS address is not long aligned (prefetch would load low word of variable and opcode of RTS)

It can't know if it is self-modifying code or just a harmless side-effect.

Keep variables further away from code. (I personally prefer using A4 or A5 as a base pointer to variables, I hate unnecessary absolute addresses )

There is no option to disable kit, at least not yet.
Thanks for the explanation Toni.

I've put in some nops (CNOP 0,16 in Vasm) before the variable and now the debugger is not breaking which is good. While I do point one of the address registers to my global variables I also like the convenience of using local labels because then I don't need to have them as unique names in the global space. I'll make do with the workaround I have.

Thanks for the fast response.
mcgeezer is offline  
 
Page generated in 0.04493 seconds with 11 queries