X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FnativeGen%2FMachCodeGen.hs;fp=ghc%2Fcompiler%2FnativeGen%2FMachCodeGen.hs;h=50d886ca92dbbd22a5b7befb012121edf5309db9;hb=d1e7092f2c4ddf8ee07da15bcef6828923b391a2;hp=8560d4a165889deff8980f06294b5a6b33de1ab3;hpb=1b0ac318c9f8cab67ffd4e4fedbefb3d3e4e76ce;p=ghc-hetmet.git diff --git a/ghc/compiler/nativeGen/MachCodeGen.hs b/ghc/compiler/nativeGen/MachCodeGen.hs index 8560d4a..50d886c 100644 --- a/ghc/compiler/nativeGen/MachCodeGen.hs +++ b/ghc/compiler/nativeGen/MachCodeGen.hs @@ -735,12 +735,14 @@ getRegister leaf getRegister (CmmLit (CmmFloat f F32)) = do lbl <- getNewLabelNat - let code dst = toOL [ + dynRef <- cmmMakeDynamicReference addImportNat False lbl + Amode addr addr_code <- getAmode dynRef + let code dst = LDATA ReadOnlyData [CmmDataLabel lbl, - CmmStaticLit (CmmFloat f F32)], - GLD F32 (ImmAddr (ImmCLbl lbl) 0) dst - ] + CmmStaticLit (CmmFloat f F32)] + `consOL` (addr_code `snocOL` + GLD F32 addr dst) -- in return (Any F32 code) @@ -756,12 +758,14 @@ getRegister (CmmLit (CmmFloat d F64)) | otherwise = do lbl <- getNewLabelNat - let code dst = toOL [ + dynRef <- cmmMakeDynamicReference addImportNat False lbl + Amode addr addr_code <- getAmode dynRef + let code dst = LDATA ReadOnlyData [CmmDataLabel lbl, - CmmStaticLit (CmmFloat d F64)], - GLD F64 (ImmAddr (ImmCLbl lbl) 0) dst - ] + CmmStaticLit (CmmFloat d F64)] + `consOL` (addr_code `snocOL` + GLD F64 addr dst) -- in return (Any F64 code)