diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-06-28 07:52:12 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-06-28 07:52:12 +0200 |
commit | 03634c4038ebca7a43d385aea66a09d73504c769 (patch) | |
tree | c843127e4194bfb7699fbfe1903f430ccb803674 /src/ortho/mcode/ortho_code-x86.ads | |
parent | b7d2a39f80e4dc06958b8e399a879b163e4eb499 (diff) | |
download | ghdl-03634c4038ebca7a43d385aea66a09d73504c769.tar.gz ghdl-03634c4038ebca7a43d385aea66a09d73504c769.tar.bz2 ghdl-03634c4038ebca7a43d385aea66a09d73504c769.zip |
ortho/mcode: preliminary work to support win64.
Diffstat (limited to 'src/ortho/mcode/ortho_code-x86.ads')
-rw-r--r-- | src/ortho/mcode/ortho_code-x86.ads | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/ortho/mcode/ortho_code-x86.ads b/src/ortho/mcode/ortho_code-x86.ads index bff3b4b32..27473953b 100644 --- a/src/ortho/mcode/ortho_code-x86.ads +++ b/src/ortho/mcode/ortho_code-x86.ads @@ -167,9 +167,23 @@ package Ortho_Code.X86 is type O_Reg_Array is array (Natural range <>) of O_Reg; + type O_Reg_Bitmap is array (O_Reg range <>) of Boolean; + pragma Pack (O_Reg_Bitmap); + + subtype Regs_R32_Bitmap is O_Reg_Bitmap (Regs_R32); + subtype Regs_R64_Bitmap is O_Reg_Bitmap (Regs_R64); + subtype Regs_Xmm64_Bitmap is O_Reg_Bitmap (Regs_X86_64_Xmm); + -- Registers preserved accross calls. - Preserved_Regs_32 : constant O_Reg_Array := - (R_Di, R_Si, R_Bx); - Preserved_Regs_64 : constant O_Reg_Array := - (R_Bx, R_R12, R_R13, R_R14, R_R15); + Preserved_Regs_32 : constant Regs_R32_Bitmap := + (R_Di | R_Si | R_Bx => True, others => False); + Preserved_Regs_Lin64 : constant Regs_R64_Bitmap := + (R_Bx | R_R12 | R_R13 | R_R14 | R_R15 => True, others => False); + Preserved_Regs_Win64 : constant Regs_R64_Bitmap := + (R_Di | R_Si | R_Bx | R_R12 | R_R13 | R_R14 | R_R15 => True, + others => False); + Preserved_Xmm_Win64 : constant Regs_Xmm64_Bitmap := + (R_Xmm6 | R_Xmm7 | R_Xmm8 | R_Xmm9 | R_Xmm1 | R_Xmm11 + | R_Xmm12 | R_Xmm13 | R_Xmm14 | R_Xmm15 => True, + others => False); end Ortho_Code.X86; |