From 498e46ddc80b2c6048286aa7d0b0c52cb386475f Mon Sep 17 00:00:00 2001 From: julianb0 Date: Mon, 15 Jul 2019 20:47:44 +0200 Subject: [PATCH] abi --- ka/ABI | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/ka/ABI b/ka/ABI index 180ca88..394bd32 100644 --- a/ka/ABI +++ b/ka/ABI @@ -73,7 +73,7 @@ Aside from the DF flag, a function cannot assume anything about the state of the flags in the FLG register. Passing parameters is done using the following registers, in that order: - a0-a15 + a0-a7 The stack is never used for argument passing, except for variadic functions, cf the next section. If you need to pass large structures of data, pass @@ -85,10 +85,10 @@ and require more registers, use the following registers, in that order: The following registers are volatile; the calling function cannot assume that they will be left unmodified by the called function: - rax, rcx, rdx, r8-r15, a0-a15 + rax, rcx, rdx, r8-r15, a0-a7 The following registers are nonvolatile; the called function must preserve them: - rbx, rsi, rdi, n0-n15, rbp, rsp + rbx, rsi, rdi, n0-n7, rbp, rsp #------------------------------------------------------------------------------# @@ -125,12 +125,7 @@ The 'inv' register cannot be referenced by machine code except when specified as an offset register in the [reg+reg(*/+...)] memory formats; in these case, 'inv' can be assumed to be always null. -The following registers can only be used by the supervisor: -- Fast global variables for the supervisor: - sa0-sa3 - -The following registers cannot be referenced by machine code at all: - px0-px1, fc0-fc2, cr0-cr3 +(TO BE COMPLETED) #------------------------------------------------------------------------------#