diff options
author | Tristan Gingold <tgingold@free.fr> | 2014-01-24 06:49:49 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2014-01-24 06:49:49 +0100 |
commit | 9567c15d0db2d39ce8ea83b3dff96e7e8f852243 (patch) | |
tree | d0a4e48e6b2d7895a97c24e26f7e67628f53d067 /ortho | |
parent | dd469664e98ce60671870a817269b18d3511acba (diff) | |
download | ghdl-9567c15d0db2d39ce8ea83b3dff96e7e8f852243.tar.gz ghdl-9567c15d0db2d39ce8ea83b3dff96e7e8f852243.tar.bz2 ghdl-9567c15d0db2d39ce8ea83b3dff96e7e8f852243.zip |
mcode: per platform definition of F64 alignment.
Diffstat (limited to 'ortho')
-rw-r--r-- | ortho/mcode/ortho_code-x86-abi.adb | 3 | ||||
-rw-r--r-- | ortho/mcode/ortho_code-x86-abi.ads | 2 | ||||
-rw-r--r-- | ortho/mcode/ortho_code-x86-flags_linux.ads | 3 | ||||
-rw-r--r-- | ortho/mcode/ortho_code-x86-flags_macosx.ads | 3 | ||||
-rw-r--r-- | ortho/mcode/ortho_code-x86-flags_windows.ads | 3 |
5 files changed, 13 insertions, 1 deletions
diff --git a/ortho/mcode/ortho_code-x86-abi.adb b/ortho/mcode/ortho_code-x86-abi.adb index 99b75e945..bb06d51d4 100644 --- a/ortho/mcode/ortho_code-x86-abi.adb +++ b/ortho/mcode/ortho_code-x86-abi.adb @@ -588,6 +588,9 @@ package body Ortho_Code.X86.Abi is is use Ortho_Code.Debug; begin + -- Alignment of doubles is platform dependent. + Mode_Align (Mode_F64) := X86.Flags.Mode_F64_Align; + if Flag_Debug_Hli then Disps.Init; else diff --git a/ortho/mcode/ortho_code-x86-abi.ads b/ortho/mcode/ortho_code-x86-abi.ads index e974438ce..7b166dad8 100644 --- a/ortho/mcode/ortho_code-x86-abi.ads +++ b/ortho/mcode/ortho_code-x86-abi.ads @@ -23,7 +23,7 @@ package Ortho_Code.X86.Abi is procedure Init; procedure Finish; - Mode_Align : constant Mode_Align_Array := + Mode_Align : Mode_Align_Array := (Mode_U8 | Mode_I8 => 0, Mode_U16 | Mode_I16 => 1, Mode_U32 | Mode_I32 | Mode_F32 | Mode_P32 => 2, diff --git a/ortho/mcode/ortho_code-x86-flags_linux.ads b/ortho/mcode/ortho_code-x86-flags_linux.ads index 624c27985..30bc7f7b3 100644 --- a/ortho/mcode/ortho_code-x86-flags_linux.ads +++ b/ortho/mcode/ortho_code-x86-flags_linux.ads @@ -25,4 +25,7 @@ package Ortho_Code.X86.Flags_Linux is -- Prefered stack alignment. -- Must be a power of 2. Stack_Boundary : constant Unsigned_32 := 2 ** 3; + + -- Alignment for double (64 bit float). + Mode_F64_Align : constant Natural := 2; end Ortho_Code.X86.Flags_Linux; diff --git a/ortho/mcode/ortho_code-x86-flags_macosx.ads b/ortho/mcode/ortho_code-x86-flags_macosx.ads index c7531065a..a33085294 100644 --- a/ortho/mcode/ortho_code-x86-flags_macosx.ads +++ b/ortho/mcode/ortho_code-x86-flags_macosx.ads @@ -25,4 +25,7 @@ package Ortho_Code.X86.Flags_Macosx is -- Prefered stack alignment. -- Must be a power of 2. Stack_Boundary : constant Unsigned_32 := 2 ** 4; + + -- Alignment for double (64 bit float). + Mode_F64_Align : constant Natural := 2; end Ortho_Code.X86.Flags_Macosx; diff --git a/ortho/mcode/ortho_code-x86-flags_windows.ads b/ortho/mcode/ortho_code-x86-flags_windows.ads index a5ba57957..3296aaf2c 100644 --- a/ortho/mcode/ortho_code-x86-flags_windows.ads +++ b/ortho/mcode/ortho_code-x86-flags_windows.ads @@ -25,4 +25,7 @@ package Ortho_Code.X86.Flags_Windows is -- Prefered stack alignment. -- Must be a power of 2. Stack_Boundary : constant Unsigned_32 := 2 ** 3; + + -- Alignment for double (64 bit float). + Mode_F64_Align : constant Natural := 3; end Ortho_Code.X86.Flags_Windows; |