119 ADLCFLAGS += -DARM=1
120 endif
121
122 ##############################################################################
123 # Concatenate all ad source files into a single file, which will be fed to
124 # adlc. Also include a #line directive at the start of every included file
125 # (after the initial header block), stating the original source file name.
126 #
127 # Normally, debugging is done directly on the ad_<arch>*.cpp files, but the
128 # #line directives in those files will be pointing back to <arch>.ad.
129
130 # AD_SRC_ROOTS might have been added to by a custom extension
131 AD_SRC_ROOTS += $(TOPDIR)/src/hotspot
132
133 AD_SRC_FILES := $(call uniq, $(wildcard $(foreach d, $(AD_SRC_ROOTS), \
134 $d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/$(HOTSPOT_TARGET_CPU).ad \
135 $d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/$(HOTSPOT_TARGET_CPU_ARCH).ad \
136 $d/os_cpu/$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH)/$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH).ad \
137 )))
138
139 SINGLE_AD_SRCFILE := $(ADLC_SUPPORT_DIR)/all-ad-src.ad
140
141 INSERT_FILENAME_AWK_SCRIPT := \
142 '{ \
143 if (CUR_FN != FILENAME) { CUR_FN=FILENAME; NR_BASE=NR-1; need_lineno=1 } \
144 if (need_lineno && $$0 !~ /\/\//) \
145 { print "\n\n\#line " (NR-NR_BASE) " \"" FILENAME "\""; need_lineno=0 }; \
146 print \
147 }'
148
149 $(SINGLE_AD_SRCFILE): $(AD_SRC_FILES)
150 $(call LogInfo, Preprocessing adlc files $(^F))
151 $(call MakeDir, $(@D))
152 $(NAWK) $(INSERT_FILENAME_AWK_SCRIPT) $^ > $@
153
154 ##############################################################################
155 # Run the adlc tool on the single concatenated ad source file, and store the
156 # output in support/adlc for further processing.
157 ADLC_RUN_MARKER := $(ADLC_SUPPORT_DIR)/_adlc_run.marker
158
|
119 ADLCFLAGS += -DARM=1
120 endif
121
122 ##############################################################################
123 # Concatenate all ad source files into a single file, which will be fed to
124 # adlc. Also include a #line directive at the start of every included file
125 # (after the initial header block), stating the original source file name.
126 #
127 # Normally, debugging is done directly on the ad_<arch>*.cpp files, but the
128 # #line directives in those files will be pointing back to <arch>.ad.
129
130 # AD_SRC_ROOTS might have been added to by a custom extension
131 AD_SRC_ROOTS += $(TOPDIR)/src/hotspot
132
133 AD_SRC_FILES := $(call uniq, $(wildcard $(foreach d, $(AD_SRC_ROOTS), \
134 $d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/$(HOTSPOT_TARGET_CPU).ad \
135 $d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/$(HOTSPOT_TARGET_CPU_ARCH).ad \
136 $d/os_cpu/$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH)/$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH).ad \
137 )))
138
139 ifeq ($(call check-jvm-feature, shenandoahgc), true)
140 AD_SRC_FILES += $(call uniq, $(wildcard $(foreach d, $(AD_SRC_ROOTS), \
141 $d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/gc/shenandoah/shenandoah_$(HOTSPOT_TARGET_CPU).ad \
142 )))
143 endif
144
145 SINGLE_AD_SRCFILE := $(ADLC_SUPPORT_DIR)/all-ad-src.ad
146
147 INSERT_FILENAME_AWK_SCRIPT := \
148 '{ \
149 if (CUR_FN != FILENAME) { CUR_FN=FILENAME; NR_BASE=NR-1; need_lineno=1 } \
150 if (need_lineno && $$0 !~ /\/\//) \
151 { print "\n\n\#line " (NR-NR_BASE) " \"" FILENAME "\""; need_lineno=0 }; \
152 print \
153 }'
154
155 $(SINGLE_AD_SRCFILE): $(AD_SRC_FILES)
156 $(call LogInfo, Preprocessing adlc files $(^F))
157 $(call MakeDir, $(@D))
158 $(NAWK) $(INSERT_FILENAME_AWK_SCRIPT) $^ > $@
159
160 ##############################################################################
161 # Run the adlc tool on the single concatenated ad source file, and store the
162 # output in support/adlc for further processing.
163 ADLC_RUN_MARKER := $(ADLC_SUPPORT_DIR)/_adlc_run.marker
164
|