From: Ian Lynagh Date: Wed, 11 Oct 2006 14:00:07 +0000 (+0000) Subject: Fix trac #921: generate *q instructions for int-float conversions X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=16dbc25769d2c23314a97be10a824b7bb921ae49 Fix trac #921: generate *q instructions for int-float conversions We need to generate, e.g., cvtsi2sdq rather than cvtsi2sd on amd64 in order to have int-float conversions work correctly for values not correctly representable in 32 bits. --- diff --git a/compiler/nativeGen/PprMach.hs b/compiler/nativeGen/PprMach.hs index 274ea1f..6ca3bde 100644 --- a/compiler/nativeGen/PprMach.hs +++ b/compiler/nativeGen/PprMach.hs @@ -1304,10 +1304,10 @@ pprInstr (FDIV size op1 op2) = pprSizeOpOp SLIT("div") size op1 op2 pprInstr (CVTSS2SD from to) = pprRegReg SLIT("cvtss2sd") from to pprInstr (CVTSD2SS from to) = pprRegReg SLIT("cvtsd2ss") from to -pprInstr (CVTSS2SI from to) = pprOpReg SLIT("cvtss2si") from to -pprInstr (CVTSD2SI from to) = pprOpReg SLIT("cvtsd2si") from to -pprInstr (CVTSI2SS from to) = pprOpReg SLIT("cvtsi2ss") from to -pprInstr (CVTSI2SD from to) = pprOpReg SLIT("cvtsi2sd") from to +pprInstr (CVTSS2SI from to) = pprOpReg SLIT("cvtss2siq") from to +pprInstr (CVTSD2SI from to) = pprOpReg SLIT("cvtsd2siq") from to +pprInstr (CVTSI2SS from to) = pprOpReg SLIT("cvtsi2ssq") from to +pprInstr (CVTSI2SD from to) = pprOpReg SLIT("cvtsi2sdq") from to #endif -- FETCHGOT for PIC on ELF platforms