This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

mn10300-elf cross compiler won't build on alpha


A few tweaks to get all CONST_INTs properly sign-extended were needed
(but not enough) to get mn10300-elf to build on an alpha machine.  I'm
checking this in.

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>
	* config/mn10300/mn10300.md: Sign-extend GEN_INT operands.

Index: gcc/config/mn10300/mn10300.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mn10300/mn10300.md,v
retrieving revision 1.42
diff -u -p -r1.42 mn10300.md
--- gcc/config/mn10300/mn10300.md 2001/04/14 11:09:21 1.42
+++ gcc/config/mn10300/mn10300.md 2001/05/03 18:03:59
@@ -1289,7 +1289,7 @@
     }
 
   xoperands[0] = operands[0];
-  xoperands[1] = GEN_INT (mask);
+  xoperands[1] = GEN_INT (trunc_int_for_mode (mask, SImode));
   output_asm_insn (\"btst %1,%0\", xoperands);
   return \"\";
 }"
@@ -1331,7 +1331,7 @@
     }
   
   xoperands[0] = operands[0];
-  xoperands[1] = GEN_INT (mask);
+  xoperands[1] = GEN_INT (trunc_int_for_mode (mask, SImode));
   if (GET_CODE (operands[0]) == REG)
     output_asm_insn (\"btst %1,%0\", xoperands);
   else
@@ -1882,7 +1882,7 @@
   target = operand_subword (operands[0], 1, 1, DFmode);
   result = expand_binop (SImode, and_optab,
 			 operand_subword_force (operands[1], 1, DFmode),
-			 GEN_INT(0x7fffffff), target, 0, OPTAB_WIDEN);
+			 GEN_INT (0x7fffffff), target, 0, OPTAB_WIDEN);
 
   if (result == 0)
     abort ();
@@ -1912,7 +1912,7 @@
   target = operand_subword_force (operands[0], 0, SFmode);
   result = expand_binop (SImode, and_optab,
 			 operand_subword_force (operands[1], 0, SFmode),
-			 GEN_INT(0x7fffffff), target, 0, OPTAB_WIDEN);
+			 GEN_INT (0x7fffffff), target, 0, OPTAB_WIDEN);
   if (result == 0)
     abort ();
 
@@ -1937,7 +1937,8 @@
   target = operand_subword (operands[0], 1, 1, DFmode);
   result = expand_binop (SImode, xor_optab,
 			 operand_subword_force (operands[1], 1, DFmode),
-			 GEN_INT(0x80000000), target, 0, OPTAB_WIDEN);
+			 GEN_INT (trunc_int_for_mode (0x80000000, SImode)),
+			 target, 0, OPTAB_WIDEN);
 
   if (result == 0)
     abort ();
@@ -1967,7 +1968,8 @@
   target = operand_subword_force (operands[0], 0, SFmode);
   result = expand_binop (SImode, xor_optab,
 			 operand_subword_force (operands[1], 0, SFmode),
-			 GEN_INT(0x80000000), target, 0, OPTAB_WIDEN);
+			 GEN_INT (trunc_int_for_mode (0x80000000, SImode)),
+			 target, 0, OPTAB_WIDEN);
   if (result == 0)
     abort ();
 

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]