#16081 - DarkPhantom - Sat Feb 07, 2004 8:17 pm
I've noticed that GCC likes to use the registers for local variables rather than just putting them all on the stack. Now that I think about this it makes perfect sense (obviously) but I didn't expect it because I've never programmed for a processor with so many general purpose registers before.
My question is, how do you setup variable names with GAS? In TASM on the 80x86 you can use the LOCAL keyword to setup stack variables which you reference by name and this saves the sanity of any programmer not having to remember what he put at what offset since the assembler takes care of that. I assume that there must be a way to assign symbolic names both to stack offsets as well as registers with GAS. Anybody know? Thx!
My question is, how do you setup variable names with GAS? In TASM on the 80x86 you can use the LOCAL keyword to setup stack variables which you reference by name and this saves the sanity of any programmer not having to remember what he put at what offset since the assembler takes care of that. I assume that there must be a way to assign symbolic names both to stack offsets as well as registers with GAS. Anybody know? Thx!