GFX_WRITE_VRAM_ADDR is expensive? (was: code benchmarking)
Moderator: Stef
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Nice, i think it could be interesting How can you force the compiler for short RAM addressing ? define RAM area at FFFF0000-FFFFFFFF is enough ?Chilly Willy wrote:I'll try those two using 4.6.2 and see what I get. I might also try making it use short addressing on the ram to see how that affects the speed.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Yeah, just change the ram address in the linker script to 0xFFFF8000 and the length to 0x8000. I also change the stack to 0xFFFF8000 at the same time so the stack doesn't "waste" any of the short addressing space.Stef wrote:Nice, i think it could be interesting How can you force the compiler for short RAM addressing ? define RAM area at FFFF0000-FFFFFFFF is enough ?Chilly Willy wrote:I'll try those two using 4.6.2 and see what I get. I might also try making it use short addressing on the ram to see how that affects the speed.
I did this once before, but I've forgotten if I used any switches with that. It's not something I normally do for MD homebrew.
If you use the built-in allocator, you could also change the linker script to set _end/__end to 0xFF0000 so that the heap gets put at the start of ram; then you could malloc up to the stack.