This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: mn10300 64-bit clean-up
On May 20, 2000, Richard Henderson <rth@cygnus.com> wrote:
> Either that or just leaving well enough alone and extracting the
> value from the returned rtx -- you're not talking performance
> critical code after all.
Yup, I liked that. Here's the new mn10300-specific code that now uses
split_double. No regressions on ia32-x-mn10300 nor alpha-x-mn10300.
Ok to install?
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@cygnus.com>
* config/mn10300/mn10300.md (movdi, movdf): 64-bit clean-up.
* config/mn10300/mn10300.c (print_operand): Likewise.
Index: gcc/config/mn10300/mn10300.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mn10300/mn10300.c,v
retrieving revision 1.28
diff -u -p -c -r1.28 mn10300.c
*** gcc/config/mn10300/mn10300.c 2000/05/19 00:56:08 1.28
--- gcc/config/mn10300/mn10300.c 2000/05/20 21:47:37
*************** print_operand (file, x, code)
*** 177,184 ****
}
case CONST_INT:
! print_operand_address (file, x);
! break;
default:
abort ();
--- 177,188 ----
}
case CONST_INT:
! {
! rtx low, high;
! split_double (x, &low, &high);
! fprintf (file, "%ld", (long)INTVAL (low));
! break;
! }
default:
abort ();
*************** print_operand (file, x, code)
*** 231,241 ****
}
case CONST_INT:
! if (INTVAL (x) < 0)
! print_operand_address (file, GEN_INT (-1));
! else
! print_operand_address (file, GEN_INT (0));
! break;
default:
abort ();
}
--- 235,247 ----
}
case CONST_INT:
! {
! rtx low, high;
! split_double (x, &low, &high);
! fprintf (file, "%ld", (long)INTVAL (high));
! break;
! }
!
default:
abort ();
}
Index: gcc/config/mn10300/mn10300.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mn10300/mn10300.md,v
retrieving revision 1.34
diff -u -p -c -r1.34 mn10300.md
*** gcc/config/mn10300/mn10300.md 2000/05/11 21:08:18 1.34
--- gcc/config/mn10300/mn10300.md 2000/05/20 21:47:38
***************
*** 419,426 ****
case 11:
if (GET_CODE (operands[1]) == CONST_INT)
{
! val[0] = INTVAL (operands[1]);
! val[1] = val[0] < 0 ? -1 : 0;
}
if (GET_CODE (operands[1]) == CONST_DOUBLE)
{
--- 419,428 ----
case 11:
if (GET_CODE (operands[1]) == CONST_INT)
{
! rtx low, high;
! split_double (operands[1], &low, &high);
! val[0] = INTVAL (low);
! val[1] = INTVAL (high);
}
if (GET_CODE (operands[1]) == CONST_DOUBLE)
{
***************
*** 567,574 ****
case 11:
if (GET_CODE (operands[1]) == CONST_INT)
{
! val[0] = INTVAL (operands[1]);
! val[1] = val[0] < 0 ? -1 : 0;
}
if (GET_CODE (operands[1]) == CONST_DOUBLE)
{
--- 569,578 ----
case 11:
if (GET_CODE (operands[1]) == CONST_INT)
{
! rtx low, high;
! split_double (operands[1], &low, &high);
! val[0] = INTVAL (low);
! val[1] = INTVAL (high);
}
if (GET_CODE (operands[1]) == CONST_DOUBLE)
{
--
Alexandre Oliva Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me