aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho/mcode
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-06-20 05:45:24 +0200
committerTristan Gingold <tgingold@free.fr>2017-06-20 05:45:24 +0200
commit6f3f640e0571fb8f31a8622da088a0435490c359 (patch)
treeb18d60d1708f75a0f4388c1b51c5a6abd4c4ef6a /src/ortho/mcode
parent446af5a87d33f5862f9058204b36f3a60829f9a3 (diff)
downloadghdl-6f3f640e0571fb8f31a8622da088a0435490c359.tar.gz
ghdl-6f3f640e0571fb8f31a8622da088a0435490c359.tar.bz2
ghdl-6f3f640e0571fb8f31a8622da088a0435490c359.zip
ortho: add comments.
Diffstat (limited to 'src/ortho/mcode')
-rw-r--r--src/ortho/mcode/ortho_code-x86-abi.adb2
-rw-r--r--src/ortho/mcode/ortho_code-x86-emits.adb1
-rw-r--r--src/ortho/mcode/ortho_code-x86-insns.adb3
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