OSDN Git Service

* config/sparc/sparc.c (emit_soft_tfmode_cvt): Explicitly sign or
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Aug 2008 20:52:22 +0000 (20:52 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Aug 2008 20:52:22 +0000 (20:52 +0000)
zero extend SImode values being converted to TFmode before passing
to libcalls.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139084 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sparc/sparc.c

index 2d43bcb..f49b916 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 045735f..58667a2 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";