sparc.c (emit_soft_tfmode_cvt): Explicitly sign or zero extend SImode values being...
authorJoseph Myers <joseph@codesourcery.com>
Wed, 13 Aug 2008 20:52:22 +0000 (21:52 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Wed, 13 Aug 2008 20:52:22 +0000 (21:52 +0100)
* 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/ChangeLog
gcc/config/sparc/sparc.c

index 2d43bcb45d405f74675c5e80cf4da66556f1a9fd..f49b91656cfdb9d73f96701d5587cd4011a2e28c 100644 (file)
@@ -1,3 +1,9 @@
+2008-08-13  Joseph Myers  <joseph@codesourcery.com>
+
+       * config/sparc/sparc.c (emit_soft_tfmode_cvt): Explicitly sign or
+       zero extend SImode values being converted to TFmode before passing
+       to libcalls.
+
 2008-08-13  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
        * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Predefine
index 045735f208ce1364c21b8008a2a5c7fec6743941..58667a2cb19c0b176157ccda65f23b912e20db55 100644 (file)
@@ -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";