diff options
-rw-r--r-- | src/ortho/mcode/ortho_code-x86-abi.adb | 2 | ||||
-rw-r--r-- | src/ortho/mcode/ortho_code-x86-emits.adb | 1 | ||||
-rw-r--r-- | src/ortho/mcode/ortho_code-x86-insns.adb | 3 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/ortho/mcode/ortho_code-x86-abi.adb b/src/ortho/mcode/ortho_code-x86-abi.adb index 8c746c18a..389e2bdc5 100644 --- a/src/ortho/mcode/ortho_code-x86-abi.adb +++ b/src/ortho/mcode/ortho_code-x86-abi.adb @@ -79,8 +79,10 @@ package body Ortho_Code.X86.Abi is raise Program_Error; end case; if Reg = R_None then + -- Passed on the stack, need 8 bytes. Size := 8; else + -- Passed by a register. Size := 0; end if; else diff --git a/src/ortho/mcode/ortho_code-x86-emits.adb b/src/ortho/mcode/ortho_code-x86-emits.adb index 0e62eb6e3..4753aab85 100644 --- a/src/ortho/mcode/ortho_code-x86-emits.adb +++ b/src/ortho/mcode/ortho_code-x86-emits.adb @@ -1391,6 +1391,7 @@ package body Ortho_Code.X86.Emits is Gen_Call (Sym); if Abi.Flag_Sse2 and then not Flags.M64 and then Mode in Mode_Fp then + -- Convert return value from St0 to Xmm0. declare Sslot : constant Int32 := -Int32 (Cur_Subprg.Target.Fp_Slot); begin diff --git a/src/ortho/mcode/ortho_code-x86-insns.adb b/src/ortho/mcode/ortho_code-x86-insns.adb index 8d6e5be69..099f73e2a 100644 --- a/src/ortho/mcode/ortho_code-x86-insns.adb +++ b/src/ortho/mcode/ortho_code-x86-insns.adb @@ -1230,7 +1230,8 @@ package body Ortho_Code.X86.Insns is -- Generate code for arguments (if any). Gen_Call_Arg (Get_Arg_Link (Stmt), Get_Subprg_Interfaces (Subprg), Pnum); - -- Clobber registers. + -- Clobber registers. They are saved in reserved slots (at the top + -- of the frame). if Flags.M64 then Clobber_Caller_Saved_Registers_64 (Get_Arg_Link (Stmt), Subprg, Pnum); else |