latest i370 patches

Richard Henderson rth@cygnus.com
Mon Jul 19 16:57:00 GMT 1999


@@ -24,7 +25,11 @@
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>  

	You should convert to using the new "system.h" file.

+extern FILE *asm_out_file;

	This is in "output.h".

+// abort();

	No // comments.

+/* Some remarks about unsigned_jump_follows_p():
+   gcc is built around the assumption that branches are signed
+   or unsigned, whereas the 370 doesn't care; its the compares that
+   are signed or unsigned.

	Look at alpha cmpsi and blt for a typical example of how
	to handle this.  

+  ((REGNO) < 16 ? (((REGNO) & 1) == 0 || 				\
+		  (((MODE) != DImode) && ((MODE) != DFmode)))		\
+		: ((MODE) == SFmode || (MODE) == DFmode) ||		\
+                   (MODE) == SCmode || (MODE) == DCmode)

	You want FLOAT_MODE_P instead of this enumeration.

+#define RET_REG(MODE)	\
+    (((MODE) == DCmode || (MODE) == SCmode || (MODE) == TFmode || (MODE) == DFmode || (MODE) == SFmode) ? 16 : 15)
 

	Likewise.

-  ASM_OUTPUT_SHORT (FILE, GEN_INT (0x05E0));				\
-  ASM_OUTPUT_SHORT (FILE, GEN_INT (0x5800 | STATIC_CHAIN_REGNUM << 4));	\
-  ASM_OUTPUT_SHORT (FILE, GEN_INT (0xE00A));				\
-  ASM_OUTPUT_SHORT (FILE, GEN_INT (0x58F0)); 				\
-  ASM_OUTPUT_SHORT (FILE, GEN_INT (0xE00E));				\
-  ASM_OUTPUT_SHORT (FILE, GEN_INT (0x07FF));				\
+  ASM_OUTPUT_SHORT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x05E0));	\
+  ASM_OUTPUT_SHORT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x5800 | 	\
+			   STATIC_CHAIN_REGNUM << 4));			\
+  ASM_OUTPUT_SHORT (FILE, gen_rtx (CONST_INT, VOIDmode, 0xE00A));	\
+  ASM_OUTPUT_SHORT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x58F0)); 	\
+  ASM_OUTPUT_SHORT (FILE, gen_rtx (CONST_INT, VOIDmode, 0xE00E));	\
+  ASM_OUTPUT_SHORT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x07FF));	\

	This change is exceedingly wrong.

-		 (match_operand:HI 1 "general_operand" "")))]
+		 (match_operand:HI 1 "general_operand" "???dim")))]

	There's only one alternative.  Using ??? doesn't do anything.



r~


More information about the Gcc-patches mailing list