SH: use register names instead of numbers

Joern Rennecke amylaar@redhat.com
Wed Nov 22 13:52:00 GMT 2000


As Alexandre has pointed out, you can't just include insn-codes.h in tm.h,
since the generator files themselves include tm.h.
So my idea is to define GENERATOR_FILE while one of these files is
compiled, so that in tm.h, you can do:

#ifndef GENERATOR_FILE
#include "insn-codes.h"
#endif

Wed Nov 22 21:41:27 2000  J"orn Rennecke <amylaar@redhat.com>

	* Makefile.in (HOST_CFLAGS): Add -DGENERATOR_FILE.
	(rtl.o): Build with -DGENERATOR_FILE.

Index: Makefile.in
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/Makefile.in,v
retrieving revision 1.863
diff -p -r1.863 Makefile.in
*** Makefile.in	2000/11/22 01:36:43	1.863
--- Makefile.in	2000/11/22 21:41:21
*************** HOST_PREFIX=
*** 532,538 ****
  # out of the way of the other rules for compiling the same source files.
  HOST_PREFIX_1=loser-
  HOST_CC=$(CC)
! HOST_CFLAGS=$(ALL_CFLAGS)
  HOST_CLIB=$(CLIB)
  HOST_LDFLAGS=$(LDFLAGS)
  HOST_CPPFLAGS=$(ALL_CPPFLAGS)
--- 532,538 ----
  # out of the way of the other rules for compiling the same source files.
  HOST_PREFIX_1=loser-
  HOST_CC=$(CC)
! HOST_CFLAGS=$(ALL_CFLAGS) -DGENERATOR_FILE
  HOST_CLIB=$(CLIB)
  HOST_LDFLAGS=$(LDFLAGS)
  HOST_CPPFLAGS=$(ALL_CPPFLAGS)
*************** toplev.o : toplev.c $(CONFIG_H) system.h
*** 1365,1370 ****
--- 1365,1371 ----
  	  -c $(srcdir)/toplev.c
  
  rtl.o : rtl.c $(CONFIG_H) system.h $(RTL_H) bitmap.h $(GGC_H) toplev.h
+ 	$(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
  
  print-rtl.o : print-rtl.c $(CONFIG_H) system.h $(RTL_H) hard-reg-set.h \
      $(BASIC_BLOCK_H)


More information about the Gcc-patches mailing list