Re: Memory Operand Performance
- From: "Rod Pemberton" <do_not_have@xxxxxxxxxxxxx>
- Date: 06 Jul 2009 19:19:18 GMT
"cr88192" <cr88192@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4a523cf5$0$5643$9a6e19ea@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
just, I can think of a better way to pass arguments in registers:
they are passed in registers AND space is reserved for them in the stack
frame.
this way, if needed, the registers could be spilled right back into where
they would have been, had they been passed on the stack.
this would give a little more flexibility to the code generation in the
caller, reduce the awkwardness of register spilling (no need to go and
allocate locals), and allow a simple and efficient implementation of
'va_list' (we can spill the registers to the stack, and do va_list as in
x86, namely, a pointer).
similarly, the stack layout would be 1:1 with the passed args list (as in
x86), ...
[...]
it also allows (relatively) efficient calling between stack-based and
register-based arg passing (a few 'mov' instructions, vs having to repack
the stack frame).
I like the idea. A simple stack adjustment for the arguments in registers
plus pushes for the remainder. Also, it might make it easier to get and use
the address of a variable which has been moved into a register. Let us know
how well that works.
Rod Pemberton
.
- Follow-Ups:
- Re: Memory Operand Performance
- From: cr88192
- Re: Memory Operand Performance
- References:
- Memory Operand Performance
- From: Andrew Tomazos
- Re: Memory Operand Performance
- From: Tim Roberts
- Re: Memory Operand Performance
- From: cr88192
- Re: Memory Operand Performance
- From: cr88192
- Memory Operand Performance
- Prev by Date: Re: Memory Operand Performance
- Next by Date: Re: Memory Operand Performance
- Previous by thread: Re: Memory Operand Performance
- Next by thread: Re: Memory Operand Performance
- Index(es):
Relevant Pages
|