-
-
Notifications
You must be signed in to change notification settings - Fork 421
Conversation
MartinNowak
commented
Feb 28, 2013
- compatible with LDC's inline asm
- only push callee save registers
|
This supersedes #414. |
|
My main dev laptop (well, actually my only one) is being repaired right now, so I unfortunately won't be able to test it until the end of the week or so. Looks like it should work fine, though. Is there a reason to load the stored values back into the registers? They are guaranteed to be preserved by the ABI anyway, and e.g. the GDC implementation doesn't bother with restoring them. You might also want to add a short comment mentioning that it is the callee-save regs that are pushed, and as a possible micro-optimization add a void initializer to the static arrays. |
Right, the compiler will restore them now that we're no longer using naked asm blocks.
Thanks for the review and finding these bugs. |
|
With gdc, the built-in function called may pop the registers back at the end of the function, but that detail is different for each supported target backend in the codegen. |
But it will correctly leave the stack frame? |
|
Yes. Keep in mind that for GDC, the |
|
Ping. |
|
Urgh, I just discovered that @WalterBright: Can you confirm whether this is a bug or the offset syntax works as designed? |
|
(I'd expect to see something like |
|
Oh, I thought about it for one second but didn't recheck. How does this even pass the test suite? |
- compatible with LDC's inline asm - only push callee save registers
|
Fixed and Bugzilla 9738. |