From 926930342b3fc590cb4086b92c6338180c0ff194 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 13 Aug 2008 21:52:22 +0100 Subject: sparc.c (emit_soft_tfmode_cvt): Explicitly sign or zero extend SImode values being converted to TFmode before... * config/sparc/sparc.c (emit_soft_tfmode_cvt): Explicitly sign or zero extend SImode values being converted to TFmode before passing to libcalls. From-SVN: r139084 --- gcc/config/sparc/sparc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/config') diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 045735f208c..58667a2cb19 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -2371,6 +2371,8 @@ emit_soft_tfmode_cvt (enum rtx_code code, rtx *operands) { case SImode: func = "_Qp_itoq"; + if (TARGET_ARCH64) + operands[1] = gen_rtx_SIGN_EXTEND (DImode, operands[1]); break; case DImode: func = "_Qp_xtoq"; @@ -2385,6 +2387,8 @@ emit_soft_tfmode_cvt (enum rtx_code code, rtx *operands) { case SImode: func = "_Qp_uitoq"; + if (TARGET_ARCH64) + operands[1] = gen_rtx_ZERO_EXTEND (DImode, operands[1]); break; case DImode: func = "_Qp_uxtoq"; -- cgit v1.2.1