Commit 0d30d435 by David Edelsohn Committed by David Edelsohn

rs6000.c (num_insns_constant_wide): Constants are sign-extended.

        * rs6000.c (num_insns_constant_wide): Constants are sign-extended.
        (num_insns_constant): CONST_INT can be 64-bits.

From-SVN: r42099
parent 0239bfdd
2001-05-14 David Edelsohn <edelsohn@gnu.org>
* rs6000.c (num_insns_constant_wide): Constants are sign-extended.
(num_insns_constant): CONST_INT can be 64-bits.
2001-05-14 Stan Shebs <shebs@apple.com> 2001-05-14 Stan Shebs <shebs@apple.com>
* config/darwin.h (LIB_SPEC): Just use -lSystem. * config/darwin.h (LIB_SPEC): Just use -lSystem.
......
...@@ -754,9 +754,11 @@ num_insns_constant_wide (value) ...@@ -754,9 +754,11 @@ num_insns_constant_wide (value)
#if HOST_BITS_PER_WIDE_INT == 64 #if HOST_BITS_PER_WIDE_INT == 64
else if (TARGET_POWERPC64) else if (TARGET_POWERPC64)
{ {
unsigned HOST_WIDE_INT low = value & 0xffffffff; HOST_WIDE_INT low = value & 0xffffffff;
HOST_WIDE_INT high = value >> 32; HOST_WIDE_INT high = value >> 32;
low = (low ^ 0x80000000) - 0x80000000; /* sign extend */
if (high == 0 && (low & 0x80000000) == 0) if (high == 0 && (low & 0x80000000) == 0)
return 2; return 2;
...@@ -782,7 +784,14 @@ num_insns_constant (op, mode) ...@@ -782,7 +784,14 @@ num_insns_constant (op, mode)
enum machine_mode mode; enum machine_mode mode;
{ {
if (GET_CODE (op) == CONST_INT) if (GET_CODE (op) == CONST_INT)
{
#if HOST_BITS_PER_WIDE_INT == 64
if (mask64_operand (op, mode))
return 2;
else
#endif
return num_insns_constant_wide (INTVAL (op)); return num_insns_constant_wide (INTVAL (op));
}
else if (GET_CODE (op) == CONST_DOUBLE && mode == SFmode) else if (GET_CODE (op) == CONST_DOUBLE && mode == SFmode)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment