norsethomas
asked on
Linux Assembler: which registers to preserve?
When calling an assembler routine from within a Win32
context, it is clear that the values of EAX, ECX, and EDX
don't have to be preserved (while e.g. EBX, EBP, and ...
have to be preserved).
Can anyone enlighten me, which registers have to be preserved
when calling an assembler routine from within a Linux context?
(context = c or c++ program)
ASKER
trigger-happy,
thanks for the link, but it doesn't answer my question.
Thomas
oh sorry >.<
I must admit now that i'm not a complete expert in assembly so forgive me if i can't seem to answer your question, although one thing bothers me, is this homework? Because its in EE policies that we don't give answers to homework but instead guide you in finding the answer.
http://www.digitalmars.com/ctg/ctgInlineAsm.html (check the part about using asm registers)
--trigger-happy
I must admit now that i'm not a complete expert in assembly so forgive me if i can't seem to answer your question, although one thing bothers me, is this homework? Because its in EE policies that we don't give answers to homework but instead guide you in finding the answer.
http://www.digitalmars.com/ctg/ctgInlineAsm.html (check the part about using asm registers)
--trigger-happy
ASKER
No, this is a real world problem, since I have to know
if I have to recode my assembler routines when
porting to Linux (i.e. saving more registers).
Your second link just gives an answer for Win32,
which I already know ;-)
Thomas
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.programmersheaven.com/2/Calling-conventions
--trigger-happy