X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/986ce23ace2f7875a1a561bd947f435a7594146c..3f0311875965aae84de3a23fea05860dcd602dab:/lunaix-os/includes/arch/x86/i386_abi.h?ds=sidebyside diff --git a/lunaix-os/includes/arch/x86/i386_abi.h b/lunaix-os/includes/arch/x86/i386_abi.h index 22481c9..8804bc9 100644 --- a/lunaix-os/includes/arch/x86/i386_abi.h +++ b/lunaix-os/includes/arch/x86/i386_abi.h @@ -21,4 +21,24 @@ "r"(pc) \ : "eax", "memory"); +#define push_arg1(stack_ptr, arg) *((typeof((arg))*)(stack_ptr)--) = arg +#define push_arg2(stack_ptr, arg1, arg2) \ + { \ + *((typeof((arg1))*)(stack_ptr)--) = arg1; \ + *((typeof((arg2))*)(stack_ptr)--) = arg2; \ + } +#define push_arg3(stack_ptr, arg1, arg2, arg3) \ + { \ + *((typeof((arg1))*)(stack_ptr)--) = arg1; \ + *((typeof((arg2))*)(stack_ptr)--) = arg2; \ + *((typeof((arg3))*)(stack_ptr)--) = arg3; \ + } +#define push_arg4(stack_ptr, arg1, arg2, arg3, arg4) \ + { \ + *((typeof((arg1))*)(stack_ptr)--) = arg1; \ + *((typeof((arg2))*)(stack_ptr)--) = arg2; \ + *((typeof((arg3))*)(stack_ptr)--) = arg3; \ + *((typeof((arg4))*)(stack_ptr)--) = arg4; \ + } + #endif /* __LUNAIX_ABI_H */