From: Borja F. <bor...@gm...> - 2011-05-18 22:00:00
|
Hello, while working on the stack and frame stuff a question came to my mind. Are we going to use exactly the same ABI as gcc? Basically i'm asking this because each time we need to inc/dec the SP we have to use many instructions, for example in a function prologue gcc uses 8. From what i've seen IAR stores SP in Y so manipulating it doesn't need in/out insts, reading SREG or disabling interrupts which is much shorter. When passing parameters through the stack to functions it gets longer because SP has to be decremented and restored using in/outs on each call. Gah Eric, why is SP was mapped in the IO space? xD Anyway, if somebody has a better idea let me know otherwise I'll implement what gcc does. PS: John, with clang do you get doubles or long long variables aligned to an 8 byte boundary? I've set their alignments to 1 byte in a constructor (cant remember now the name, but it's in the clang patch files in svn) but they get aligned too much wasting memory. Any ideas there? |