I was looking at something and ran into a question - what ABI does the EE gcc use? Be specific as there are a dozen MIPS ABIs floating around. I don't think I've seen this mentioned anywhere in the examples and what-not.
Thanks.
ABI Question
That was helpful... a little googoling turned up this:
http://sources.redhat.com/ml/binutils/2 ... 00436.html
Could someone please look this over and see if there are any differences to the EE abi the toolchain builds?
http://sources.redhat.com/ml/binutils/2 ... 00436.html
Could someone please look this over and see if there are any differences to the EE abi the toolchain builds?
The EABI used in GCC for the EE uses 64-bit longs, and 32-bit pointers. Stack alignment is 16 bytes, not 8. IIRC, structs with 8 or fewer bytes are passed as values as opposed to 4 given in the spec. Perhaps pixel knows more about that, 'cause I also seem to remember that value being 16 at some point. It would make sense if it's 16 bytes because that's the most data a EE register can hold.
Everything else looks OK.
Everything else looks OK.
"He was warned..."
Never looked at how ee-gcc handles structs-passed-as-arguments. But it would sound strange since even though 16-bytes is the biggest thing EE can handle in its registers, gcc doesn't know about how to do anything with that apart of load and store. Trying...mrbrown wrote:The EABI used in GCC for the EE uses 64-bit longs, and 32-bit pointers. Stack alignment is 16 bytes, not 8. IIRC, structs with 8 or fewer bytes are passed as values as opposed to 4 given in the spec. Perhaps pixel knows more about that, 'cause I also seem to remember that value being 16 at some point. It would make sense if it's 16 bytes because that's the most data a EE register can hold.
Everything else looks OK.
-----
With a 16-bytes structure passed on first argument of a function, a0 contains a pointer to the structure.
With a 8-bytes structure passed on first argument of a function, the structure is contained straight inside the stack.
With a 4-bytes structure passed on first argument of a function, the structure is inside a0.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
Thanks for volunteering ^_^mrbrown wrote:It would be cool if 16 bytes were supported, and MMI instructions were used by the compiler to "depack" the register :).
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.