Skip to content
Low-level programming · Higher-level thinking
Login Register
Forum / Requests and Feedback

using registers instead of function parameters

A community discussion post from the original code:zIRON forum.

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

using registers instead of function parameters

hi OverHertz.

can we allow the use of registers in function as a parameters , this will save the time of pushing function parameters in the stack.

for example.

function add(eax,ebx)

{

eax += ebx;

}

....

....

so when calling this function the compiler will move the first parameter to eax register

and move the second parameter to ebx register then call the add function.

not well , add function in this case have to be without stack frame , so we need a way

that tells the compiler to not emit stack frame for this function.

forgive me for my several requests.

Emil.

http://www.freewebs.com/ogremagic/index.htm

Replies

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

need to know your opinion here....

Emil.

http://www.freewebs.com/ogremagic/index.htm

Colin admin
Posts
928
Threads
49
Location
Bulgaria

This feature i will need to think about it carefully, it is however a good idea that it is very possible i will add in one of the following releases.