This is the mail archive of the gcc-bugs@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]

Re: PATCH: bugfix for OUT_FCN macro definition


 > From: Richard Henderson <rth@cygnus.com>
 >  
 > On Tue, Jan 18, 2000 at 05:48:30PM -0500, Kaveh R. Ghazi wrote:
 > > When cross compiling to a vax-dec-vms system, I got an error from
 > the
 > > definition of OUT_FCN which tried to access a non-existent member of
 > > insn_data.  (OUT_FCN() is only used in vax.md.)  I guessed that the
 > > following might be the right fix.
 >  
 > Actually, OUT_FCN should have been deleted.  The proper
 > thing is get_insn_template() from final.c.
 > r~


How's this?


2000-01-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* recog.h (OUT_FCN): Delete.

	* vax.md: Call `get_insn_template' instead of OUT_FCN.


diff -rup orig/egcs-CVS20000118/gcc/recog.h egcs-CVS20000118/gcc/recog.h
--- orig/egcs-CVS20000118/gcc/recog.h	Mon Jan 17 12:01:39 2000
+++ egcs-CVS20000118/gcc/recog.h	Wed Jan 19 06:48:27 2000
@@ -185,10 +185,6 @@ extern struct recog_data recog_data;
    Set up by preprocess_constraints.  */
 extern struct operand_alternative recog_op_alt[MAX_RECOG_OPERANDS][MAX_RECOG_ALTERNATIVES];
 
-/* Access the output function for CODE.  */
-
-#define OUT_FCN(CODE) (*insn_data[(int) (CODE)].outfun)
-
 /* A table defined in insn-output.c that give information about
    each insn-code value.  */
 
diff -rup orig/egcs-CVS20000118/gcc/config/vax/vax.md egcs-CVS20000118/gcc/config/vax/vax.md
--- orig/egcs-CVS20000118/gcc/config/vax/vax.md	Tue Jan 18 18:00:08 2000
+++ egcs-CVS20000118/gcc/config/vax/vax.md	Wed Jan 19 06:47:40 2000
@@ -688,7 +688,7 @@
     output_asm_insn (pattern, low);
   if (!carry)
     /* If CARRY is 0, we don't have any carry value to worry about.  */
-    return OUT_FCN (CODE_FOR_addsi3) (operands, insn);
+    return get_insn_template (CODE_FOR_addsi3, insn);
   /* %0 = C + %1 + %2 */
   if (!rtx_equal_p (operands[0], operands[1]))
     output_asm_insn ((operands[1] == const0_rtx
@@ -772,7 +772,7 @@
       if (low[2] == constm1_rtx)
 	pattern = \"decl %0\";
       else if (low[2] == const0_rtx)
-	pattern = OUT_FCN (CODE_FOR_movsi) (low, insn), carry = 0;
+	pattern = get_insn_template (CODE_FOR_movsi, insn), carry = 0;
       else
 	pattern = \"subl3 %2,%1,%0\";
     }
@@ -785,7 +785,7 @@
       return \"sbwc %2,%0\";
       /* %0 = %2 - %1 - C */
     }
-  return OUT_FCN (CODE_FOR_subsi3) (operands, insn);
+  return get_insn_template (CODE_FOR_subsi3, insn);
 }")
 
 ;;- Multiply instructions.

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