diff options
author | Marcus Arendt <[email protected]> | 2015-01-19 15:12:37 +0100 |
---|---|---|
committer | Marcus Arendt <[email protected]> | 2015-01-19 15:12:37 +0100 |
commit | 677cb69c4c919e40d074df3bae40338a375a4731 (patch) | |
tree | 535ea1255610910c5706c83e38d0cece0e324d8d /lib/hipe/ppc | |
parent | 50a92094372b45c9864afe3418b79605da549122 (diff) | |
parent | 12e0894de1e1a5507b4b088a8bd5f89f8bd25b63 (diff) | |
download | otp-677cb69c4c919e40d074df3bae40338a375a4731.tar.gz otp-677cb69c4c919e40d074df3bae40338a375a4731.tar.bz2 otp-677cb69c4c919e40d074df3bae40338a375a4731.zip |
Merge branch 'mikpe/hipe-fconv-fmove-fixes/OTP-12413' into maint
* mikpe/hipe-fconv-fmove-fixes/OTP-12413:
hipe: rtl: fix phi_remove_pred/2 FP moves
hipe: backends: correct #fconv{} translation
Diffstat (limited to 'lib/hipe/ppc')
-rw-r--r-- | lib/hipe/ppc/hipe_rtl_to_ppc.erl | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/hipe/ppc/hipe_rtl_to_ppc.erl b/lib/hipe/ppc/hipe_rtl_to_ppc.erl index 7dfa56df29..a55fc137c3 100644 --- a/lib/hipe/ppc/hipe_rtl_to_ppc.erl +++ b/lib/hipe/ppc/hipe_rtl_to_ppc.erl @@ -102,10 +102,18 @@ conv_insn(I, Map, Data) -> end. conv_fconv(I, Map, Data) -> - %% Dst := (double)Src, where Dst is FP reg and Src is int reg + %% Dst := (double)Src, where Dst is FP reg and Src is GP reg or imm {Dst, Map0} = conv_fpreg(hipe_rtl:fconv_dst(I), Map), - {Src, Map1} = conv_src(hipe_rtl:fconv_src(I), Map0), % exclude imm src - I2 = mk_fconv(Dst, Src), + {Src, Map1} = conv_src(hipe_rtl:fconv_src(I), Map0), + I2 = + case hipe_ppc:is_temp(Src) of + true -> + mk_fconv(Dst, Src); + false -> + Tmp = new_untagged_temp(), + mk_li(Tmp, Src, + mk_fconv(Dst, Tmp)) + end, {I2, Map1, Data}. mk_fconv(Dst, Src) -> |