From 739a8b346660bd2c8d2a2d8d2269d73a812eed71 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 26 Feb 2022 18:51:55 +0100 Subject: ortho/mcode: relax assertion (and fix debug code). Fix #1980 --- src/ortho/mcode/ortho_code-x86-abi.adb | 6 +++++- src/ortho/mcode/ortho_code-x86-emits.adb | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/ortho/mcode') diff --git a/src/ortho/mcode/ortho_code-x86-abi.adb b/src/ortho/mcode/ortho_code-x86-abi.adb index 306335124..44c435de2 100644 --- a/src/ortho/mcode/ortho_code-x86-abi.adb +++ b/src/ortho/mcode/ortho_code-x86-abi.adb @@ -325,7 +325,7 @@ package body Ortho_Code.X86.Abi is when others => raise Program_Error; end case; - when Regs_R32 + when Regs_R64 | R_Any32 | R_Any8 | Regs_Pair @@ -551,6 +551,10 @@ package body Ortho_Code.X86.Abi is --Disp_Decl_Name (Get_Call_Subprg (Stmt)); New_Line; when OE_Conv_Ov => + Disp_Reg_Op_Name ("conv_ov"); + Disp_Irm_Code (Get_Expr_Operand (Stmt)); + New_Line; + when OE_Conv => Disp_Reg_Op_Name ("conv"); Disp_Irm_Code (Get_Expr_Operand (Stmt)); New_Line; diff --git a/src/ortho/mcode/ortho_code-x86-emits.adb b/src/ortho/mcode/ortho_code-x86-emits.adb index 84336818c..48aa745e6 100644 --- a/src/ortho/mcode/ortho_code-x86-emits.adb +++ b/src/ortho/mcode/ortho_code-x86-emits.adb @@ -1716,7 +1716,7 @@ package body Ortho_Code.X86.Emits is begin case Get_Expr_Mode (Stmt) is when Mode_I32 => - pragma Assert (Reg_Res in Regs_R32); + pragma Assert (Reg_Res in Regs_R64); if Reg_Op /= Reg_Res then Emit_Load (Reg_Res, Op, Sz_32); end if; -- cgit v1.2.3