summaryrefslogtreecommitdiff
path: root/ortho
diff options
context:
space:
mode:
authorgingold2006-06-22 19:30:52 +0000
committergingold2006-06-22 19:30:52 +0000
commit06c89bf159a88b4339295b6007ff40bee14dd618 (patch)
tree891ef7c7dbf6251d7e2e77fd479ac3664dda40ca /ortho
parent8c212ade722f0f46ab7e8d9fddfe5769ee6e2bed (diff)
downloadghdl-06c89bf159a88b4339295b6007ff40bee14dd618.tar.gz
ghdl-06c89bf159a88b4339295b6007ff40bee14dd618.tar.bz2
ghdl-06c89bf159a88b4339295b6007ff40bee14dd618.zip
bugs fix, 93c improved
Diffstat (limited to 'ortho')
-rw-r--r--ortho/mcode/ortho_code-debug.adb2
-rw-r--r--ortho/mcode/ortho_code-x86-insns.adb9
2 files changed, 8 insertions, 3 deletions
diff --git a/ortho/mcode/ortho_code-debug.adb b/ortho/mcode/ortho_code-debug.adb
index 090298a..0f3e01a 100644
--- a/ortho/mcode/ortho_code-debug.adb
+++ b/ortho/mcode/ortho_code-debug.adb
@@ -85,6 +85,8 @@ package body Ortho_Code.Debug is
Flag_Debug_Stat := True;
when 'k' =>
Flag_Debug_Keep := True;
+ when 't' =>
+ Flags.Flag_Type_Name := True;
when others =>
Put_Line (Standard_Error, "unknown debug be flag '" & C & "'");
end case;
diff --git a/ortho/mcode/ortho_code-x86-insns.adb b/ortho/mcode/ortho_code-x86-insns.adb
index 09dfdd7..4278bdc 100644
--- a/ortho/mcode/ortho_code-x86-insns.adb
+++ b/ortho/mcode/ortho_code-x86-insns.adb
@@ -412,11 +412,11 @@ package body Ortho_Code.X86.Insns is
Mode : Mode_Type;
Reg_Orig : O_Reg;
begin
- Orig := Regs (Reg).Stmt;
- if Orig = O_Enode_Null then
+ if Regs (Reg).Num = O_Free then
-- This register was not allocated.
raise Program_Error;
end if;
+ Orig := Regs (Reg).Stmt;
-- Add a spill statement.
Mode := Get_Expr_Mode (Orig);
@@ -638,7 +638,9 @@ package body Ortho_Code.X86.Insns is
return Expr;
end if;
Free_R32 (Reg);
- return Insert_Move (Expr, Alloc_Reg (Dest, Expr, Num));
+ Spill := Insert_Move (Expr, Dest);
+ Alloc_R32 (Dest, Spill, Num);
+ return Spill;
when others =>
Error_Reg ("reload: unhandled dest in R32", Expr, Dest);
end case;
@@ -850,6 +852,7 @@ package body Ortho_Code.X86.Insns is
return N;
end Insert_Intrinsic;
+ -- REG is mandatory: the result of STMT must satisfy the REG constraint.
function Gen_Insn (Stmt : O_Enode; Reg : O_Reg; Pnum : O_Inum)
return O_Enode;