Shop OBEX P1 Docs P2 Docs Learn Events
[PropGCC] Max FCache size — Parallax Forums

[PropGCC] Max FCache size

What is the maximum number of instructions that can be run from FCache? I hoped GCC would tell me if there were too many, but instead seemed to just hang at runtime (I inserted a bunch of nop just to see). I am forcing my code into FCache like this, instead of relying on __attribute__ ((fcache)) on a method signature:
__asm__ volatile (
    "       fcache #(Foo1End - Foo1Start)                                                   
	"
    "       .compress off                                                                   
	"
    "Foo1Start:                                                                             
	"
    // Blah blah blah...
    // Assembly asm asm...
    "Foo1End:                                                                               
	"
    "       .compress default                                                               
	");

Comments

  • I appear to have found the limit by complete coincidence: 64 instructions, including "jmp __LMM_RET" at the end.
    I do hope one of the PropGCC devs will chime in and correct me if this is wrong. I tried insert a single extra nop and that caused my app to hang... I didn't realize how lucky i was last night to get it working when I just so happened to have exactly 64 instructions!!! :O
Sign In or Register to comment.