craigix
Mega GP Mania
Ari64, what hardware do you currently have?
craigix said:Ari64, what hardware do you currently have?
BackAssward said:Well he clearly doesn't have a Pandora dev board, and I will agree with the rest that he should have one.
Ari64 said:That doesn't happen. Once the page is marked dirty, it stays that way, and jumps to this block go thru jump_dirty and verify_code, which checks for modifications before it executes that block. The reason for this is mainly because some programs touch the first page of memory, and we don't want to recompile the interrupt handler at 0x80000180 again and again.
Ari64 said:The idle loop in Super Mario 64 looks like this:
and gets compiled as this:Code:* 80246dd8: BEQ r0,r0,80246dd8 80246ddc: SLL r0,r0,0
Note: r11+80 is &pcaddr, it writes 0x80246dd8.Code:0x0702ed40: and r10, r10, #3 ; 0x3 0x0702ed44: b 0x702ed48 0x0702ed48: ldr r0, [pc, #32] ; 0x702ed70 0x0702ed4c: str r0, [r11, #80] 0x0702ed50: bl 0x80b3194 <cc_interrupt> 0x0702ed54: b 0x702ed40
Yes, there's an excess branch in there. Usually there would be code in between, so I didn't optimize the trivial case.
QFT.anexanhume said:Ari, if you don't have a donate link yet, now would be a good time.
foxblock said:Oh my god, this is sooo sweet, I just jizzed my pants (sorry, had to do that...)
thanks a million Ari :lol:
I went ahead and tried this, loading registers before the previous instruction to avoid the load-use penalty. Generally it reduced the code density by requiring additional registers to be loaded before branches. If I avoid reordering loads near branch targets, then it looks like it is possible to get a small performance improvement without increasing code size.Exophase said:Ari64 said:To schedule instructions this way would require an instruction-reordering pass after code generation. This could be done but would take some work. I guess the Cortex-A9 CPU will do this in hardware. It might be almost as effective to simply change the register allocation so that registers are allocated/loaded one instruction before they are needed.
Right, it's not the easiest thing in the world to do. But you'd be able to exploit parallelism a little more in general. If you can manage the register space for that then it should at least help a little, yeah.
A beagleboard. Please send my Pandora ASAPcraigix said:Ari64, what hardware do you currently have?
audacious! i like itAri64 said:A beagleboard. Please send my Pandora ASAPcraigix said:Ari64, what hardware do you currently have?
He's a keeperRenegadeChic said:audacious! i like itAri64 said:A beagleboard. Please send my Pandora ASAPcraigix said:Ari64, what hardware do you currently have?
I think he just means he ordered one like the rest of us and wants to get it as soon as possible...RenegadeChic said:audacious! i like itAri64 said:A beagleboard. Please send my Pandora ASAPcraigix said:Ari64, what hardware do you currently have?
You think RDRAM is slow and you want to read from ROM? The N64 cartridge interface is only a few MHz, not much faster than SNES. I don't remember the exact timing, there were timing diagrams on Valery Pudov's website at one time, but I can't find them now.Exophase said:Ari64 said:That doesn't happen. Once the page is marked dirty, it stays that way, and jumps to this block go thru jump_dirty and verify_code, which checks for modifications before it executes that block. The reason for this is mainly because some programs touch the first page of memory, and we don't want to recompile the interrupt handler at 0x80000180 again and again.
This sounds like it could have bad results for anything that heavily overlays code into/out of RAM. You could end up with a lot of blocks that are being verified constantly. Hopefully this is not a scenario that happens on any actual games. It would seem kind of strange for games to do this when they can execute from ROM, to the best of my knowledge (and let the cache deal with the even worse access times).