Skip to content

Commit 147213a

Browse files
committed
Merge branch 'master' into loom_s390_v1
2 parents 3f50017 + c3a3fb2 commit 147213a

128 files changed

Lines changed: 47729 additions & 1226 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

make/devkit/Sysroot.gmk

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ SRCDIR := $(OUTPUT_ROOT)/src
8888

8989
DOWNLOAD_RPMS_MARKER := $(BUILDDIR)/download-rpms.marker
9090
RPMS_UNPACKED_MARKER := $(BUILDDIR)/rpms_unpacked.marker
91-
UNPATCHED_SYSROOT_MARKER := $(BUILDDIR)/sysroot_unpatched.marker
92-
PATCHED_SYSROOT_MARKER := $(BUILDDIR)/sysroot_patched.marker
91+
SYSROOT_MARKER := $(BUILDDIR)/sysroot.marker
9392

9493
################################################################################
9594
# Download RPMs
@@ -101,10 +100,6 @@ else
101100
endif
102101

103102
RPM_ARCHS := $(RPM_ARCH) noarch
104-
ifeq ($(ARCH), x86_64)
105-
# Enable mixed mode.
106-
RPM_ARCHS += i386 i686
107-
endif
108103

109104
EMPTY :=
110105
SPACE := $(EMPTY) $(EMPTY)
@@ -166,43 +161,12 @@ $(RPMS_UNPACKED_MARKER): $(DOWNLOAD_RPMS_MARKER)
166161

167162
################################################################################
168163

169-
$(UNPATCHED_SYSROOT_MARKER): $(RPMS_UNPACKED_MARKER)
164+
$(SYSROOT_MARKER): $(RPMS_UNPACKED_MARKER)
170165
touch $@
171166

172-
################################################################################
173-
# Patch sysroot
174-
175-
# Note: MUST create a <sysroot>/usr/lib even if not really needed.
176-
# gcc will use a path relative to it to resolve lib64. (x86_64).
177-
# we're creating multi-lib compiler with 32bit libc as well, so we should
178-
# have it anyway, but just to make sure...
179-
# Patch GNU ld scripts to force linking against libraries in the sysroot
180-
# and not the ones installed on the build machine.
181-
182-
LD_SCRIPT_PATCHES := \
183-
-e 's|/usr/lib64/||g' \
184-
-e 's|/usr/lib/||g' \
185-
-e 's|/lib64/||g' \
186-
-e 's|/lib/||g' \
187-
#
188-
189-
$(PATCHED_SYSROOT_MARKER): $(UNPATCHED_SYSROOT_MARKER)
190-
@echo Patching GNU ld scripts
191-
@( \
192-
for f in $$(find $(SYSROOT) -name "*.so" -type f 2>/dev/null); do \
193-
if grep -Iq 'GNU ld script' "$$f"; then \
194-
sed $(LD_SCRIPT_PATCHES) "$$f" > "$$f.tmp" && \
195-
mv "$$f.tmp" "$$f"; \
196-
fi; \
197-
done \
198-
)
199-
@mkdir -p $(SYSROOT)/usr/lib
200-
@touch $@
201-
202167
################################################################################
203168

204169
download-rpms: $(DOWNLOAD_RPMS_MARKER)
205-
unpatched-sysroot: $(UNPATCHED_SYSROOT_MARKER)
206-
sysroot: $(PATCHED_SYSROOT_MARKER)
170+
sysroot: $(SYSROOT_MARKER)
207171

208-
.PHONY: download-rpms unpatched-sysroot sysroot
172+
.PHONY: download-rpms sysroot

make/devkit/Tools.gmk

Lines changed: 23 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,6 @@ ifneq ($(REQUIRED_MIN_MAKE_MAJOR_VERSION),)
103103
endif
104104

105105
################################################################################
106-
# Define common directories and files
107-
108-
# Ensure we have 32-bit libs also for x64. We enable mixed-mode.
109-
ifeq (x86_64,$(ARCH))
110-
LIBDIRS := lib64 lib
111-
CFLAGS_lib := -m32
112-
else
113-
LIBDIRS := lib
114-
endif
115-
116106
# Define directories
117107
DOWNLOAD := $(OUTPUT_ROOT)/download
118108
SRCDIR := $(OUTPUT_ROOT)/src
@@ -200,23 +190,19 @@ TOOLS ?= $(call declare_tools,_FOR_TARGET,$(TARGET)-)
200190

201191
################################################################################
202192

203-
# Create a TARGET bfd + libiberty only.
204-
# Configure one or two times depending on mulitlib arch.
205-
# If multilib, the second should be 32-bit, and we resolve
206-
# CFLAG_<name> to most likely -m32.
207-
define mk_bfd
208-
$$(info Libs for $(1))
209-
$$(BUILDDIR)/$$(BINUTILS_VER)-$(subst /,-,$(1))/Makefile: \
210-
CFLAGS += $$(CFLAGS_$(1))
211-
$$(BUILDDIR)/$$(BINUTILS_VER)-$(subst /,-,$(1))/Makefile: \
212-
LIBDIRS = --libdir=$(TARGETDIR)/$(1)
213-
214-
BFDLIB += $$(TARGETDIR)/$$(BINUTILS_VER)-$(subst /,-,$(1)).done
215-
BFDMAKES += $$(BUILDDIR)/$$(BINUTILS_VER)-$(subst /,-,$(1))/Makefile
216-
endef
193+
ifeq (x86_64,$(ARCH))
194+
LIBDIR := lib64
195+
else
196+
LIBDIR := lib
197+
endif
217198

218-
# Create one set of bfds etc for each multilib arch
219-
$(foreach l,$(LIBDIRS),$(eval $(call mk_bfd,$(l))))
199+
$(BUILDDIR)/$(BINUTILS_VER)-$(LIBDIR)/Makefile:
200+
CFLAGS += CFLAGS_$(LIBDIR)
201+
$(BUILDDIR)/$(BINUTILS_VER)-$(LIBDIR)/Makefile:
202+
LIBDIR = --libdir=$(TARGETDIR)/$(LIBDIR)
203+
204+
BFDLIB += $(TARGETDIR)/$(BINUTILS_VER)-$(LIBDIR).done
205+
BFDMAKES += $(BUILDDIR)/$(BINUTILS_VER)-$(LIBDIR)/Makefile
220206

221207
# Only build these two libs.
222208
$(BFDLIB): MAKECMD = all-libiberty all-bfd
@@ -228,7 +214,7 @@ $(BFDMAKES): CONFIG = --target=$(TARGET) \
228214
--host=$(TARGET) --build=$(BUILD) \
229215
--prefix=$(TARGETDIR) \
230216
--with-sysroot=$(SYSROOT) \
231-
$(LIBDIRS)
217+
$(LIBDIR)
232218

233219
$(BFDMAKES): TOOLS = $(call declare_tools,_FOR_TARGET,$(TARGET)-) $(call declare_tools,,$(TARGET)-)
234220

@@ -243,11 +229,8 @@ $(GCC) \
243229
$(CCACHE): ENVS += $(TOOLS)
244230

245231
# libdir to work around hateful bfd stuff installing into wrong dirs...
246-
# ensure we have 64 bit bfd support in the HOST library. I.e our
247-
# compiler on i686 will know 64 bit symbols, BUT later
248-
# we build just the libs again for TARGET, then with whatever the arch
249-
# wants.
250-
$(BUILDDIR)/$(BINUTILS_VER)/Makefile: CONFIG += --enable-64-bit-bfd --libdir=$(PREFIX)/$(word 1,$(LIBDIRS))
232+
# ensure we have 64 bit bfd support in the HOST library.
233+
$(BUILDDIR)/$(BINUTILS_VER)/Makefile: CONFIG += --enable-64-bit-bfd --libdir=$(PREFIX)/$(LIBDIR)
251234

252235
ifeq ($(filter $(ARCH), s390x riscv64 ppc64le), )
253236
# gold compiles but cannot link properly on s390x @ gcc 13.2 and Fedore 41
@@ -256,10 +239,6 @@ ifeq ($(filter $(ARCH), s390x riscv64 ppc64le), )
256239
LINKER_CONFIG_ENABLE_GOLD := --enable-gold=default
257240
endif
258241

259-
ifeq ($(filter riscv64 ppc64le s390x armhfp, $(ARCH)), )
260-
ENABLE_MULTILIB := --enable-multilib
261-
endif
262-
263242
# Makefile creation. Simply run configure in build dir.
264243
# Setting CFLAGS to -O2 generates a much faster ld.
265244
$(BFDMAKES) \
@@ -275,7 +254,6 @@ $(BUILDDIR)/$(BINUTILS_VER)/Makefile: $(BINUTILS_CFG)
275254
--with-sysroot=$(SYSROOT) \
276255
--disable-nls \
277256
--program-prefix=$(TARGET)- \
278-
$(ENABLE_MULTILIB) \
279257
--enable-threads \
280258
--enable-plugins \
281259
) > $(@D)/log.config 2>&1
@@ -340,15 +318,12 @@ ifeq ($(ARCH), riscv64)
340318
$(BUILDDIR)/$(GCC_VER)/Makefile: CONFIG += --disable-libsanitizer
341319
endif
342320

343-
ifneq ($(filter riscv64 ppc64le s390x armhfp, $(ARCH)), )
344-
# We only support 64-bit on these platforms anyway
345-
CONFIG += --disable-multilib
346-
endif
321+
# We don't need to support multilib
322+
CONFIG += --disable-multilib
347323

348324
# Want:
349325
# c,c++
350326
# shared libs
351-
# multilib (-m32/-m64 on x64)
352327
# skip native language.
353328
# and link and assemble with the binutils we created
354329
# earlier, so --with-gnu*
@@ -438,14 +413,12 @@ ifeq ($(HOST),$(TARGET))
438413
# "Solve" this by create links from the target libdirs to where they are.
439414
$(LINK_LIBS_MARKER): $(GCC)
440415
@echo -n 'Creating library symlinks...'
441-
@for l in $(LIBDIRS); do \
442-
for f in `cd $(PREFIX)/$$l && ls`; do \
443-
if [ ! -e $(TARGETDIR)/$$l/$$f ]; then \
444-
mkdir -p $(TARGETDIR)/$$l && \
445-
cd $(TARGETDIR)/$$l/ && \
446-
ln -fs ../../$$l/$$f $$f; \
447-
fi \
448-
done \
416+
@for f in `cd $(PREFIX)/$(LIBDIR) && ls`; do \
417+
if [ ! -e $(TARGETDIR)/$(LIBDIR)/$$f ]; then \
418+
mkdir -p $(TARGETDIR)/$(LIBDIR) && \
419+
cd $(TARGETDIR)/$(LIBDIR)/ && \
420+
ln -fs ../../$(LIBDIR)/$$f $$f; \
421+
fi \
449422
done
450423
@touch $@
451424
@echo 'done'

src/hotspot/cpu/aarch64/aarch64.ad

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8294,6 +8294,34 @@ instruct castII_checked(iRegI dst, rFlagsReg cr)
82948294
ins_pipe(pipe_slow);
82958295
%}
82968296

8297+
// The unchecked and checked variants for CastII below both use iRegINoSp for src and dst
8298+
// as some consumers of CastII node like ConvHF2F forbid the stack pointer as an input
8299+
// (please see convHF2F_reg_reg rule which requires input to be in an iRegINoSp register).
8300+
instruct castII_nosp(iRegINoSp dst)
8301+
%{
8302+
predicate(VerifyConstraintCasts == 0);
8303+
match(Set dst (CastII dst));
8304+
8305+
size(0);
8306+
format %{ "# castII of $dst" %}
8307+
ins_encode(/* empty encoding */);
8308+
ins_cost(0);
8309+
ins_pipe(pipe_class_empty);
8310+
%}
8311+
8312+
instruct castII_checked_nosp(iRegINoSp dst, rFlagsReg cr)
8313+
%{
8314+
predicate(VerifyConstraintCasts > 0);
8315+
match(Set dst (CastII dst));
8316+
effect(KILL cr);
8317+
8318+
format %{ "# castII_checked of $dst" %}
8319+
ins_encode %{
8320+
__ verify_int_in_range(_idx, bottom_type()->is_int(), $dst$$Register, rscratch1);
8321+
%}
8322+
ins_pipe(pipe_slow);
8323+
%}
8324+
82978325
instruct castLL(iRegL dst)
82988326
%{
82998327
predicate(VerifyConstraintCasts == 0);

src/hotspot/cpu/aarch64/aarch64_vector_ad.m4

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ source %{
241241
return false;
242242
}
243243
break;
244-
// At the time of writing this, the Vector API has no half-float (FP16) species.
245-
// Consequently, AddReductionVHF and MulReductionVHF are only produced by the
246-
// auto-vectorizer, which requires strictly ordered semantics for FP reductions.
244+
// AddReductionVHF and MulReductionVHF are currently only produced by the
245+
// auto-vectorizer (the Vector API does not yet intrinsify Float16 reductions),
246+
// which requires strictly ordered semantics for FP reductions.
247247
//
248248
// There is no direct Neon instruction that performs strictly ordered floating
249249
// point add reduction. Hence, on Neon only machines, the add reduction operation
@@ -354,9 +354,9 @@ source %{
354354
opcode = Op_StoreVectorScatterMasked;
355355
break;
356356
// Currently, the masked versions of the following 8 Float16 operations are disabled.
357-
// When the support for Float16 vector classes is added in VectorAPI and the masked
358-
// Float16 IR can be generated, these masked operations will be enabled and relevant
359-
// backend support added.
357+
// The Vector API does not yet emit predicated Float16 IR. When such masked IR can be
358+
// generated, these masked operations will be enabled and the relevant backend support
359+
// added.
360360
case Op_AddVHF:
361361
case Op_SubVHF:
362362
case Op_MulVHF:

src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -976,12 +976,9 @@ void ShenandoahBarrierStubC2::lrb(MacroAssembler& masm) {
976976
if (c_rarg0 == _obj) {
977977
__ lea(c_rarg1, _addr);
978978
} else if (c_rarg1 == _obj) {
979-
// Set up arguments in reverse, and then flip them
980-
__ lea(c_rarg0, _addr);
981-
// flip them
982-
__ mov(_tmp1, c_rarg0);
983-
__ mov(c_rarg0, c_rarg1);
984-
__ mov(c_rarg1, _tmp1);
979+
__ mov(_tmp1, c_rarg1);
980+
__ lea(c_rarg1, _addr);
981+
__ mov(c_rarg0, _tmp1);
985982
} else {
986983
assert_different_registers(c_rarg1, _obj);
987984
__ lea(c_rarg1, _addr);

src/hotspot/cpu/arm/frame_arm.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
// between a callee frame and its stack arguments, where it is part
6262
// of the caller/callee overlap
6363
metadata_words_at_top = 0,
64+
// in bytes
6465
frame_alignment = 16,
6566
// size, in words, of maximum shift in frame position due to alignment
6667
align_wiggle = 1

src/hotspot/cpu/ppc/frame_ppc.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,7 @@
402402
// between a callee frame and its stack arguments, where it is part
403403
// of the caller/callee overlap
404404
metadata_words_at_top = sizeof(java_abi) >> LogBytesPerWord,
405-
// size, in words, of frame metadata at the frame top that needs
406-
// to be reserved for callee functions in the runtime
405+
// in bytes
407406
frame_alignment = 16,
408407
frame_alignment_in_words = frame_alignment >> LogBytesPerWord,
409408
// size, in words, of maximum shift in frame position due to alignment

src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,12 +1210,9 @@ void ShenandoahBarrierStubC2::lrb(MacroAssembler& masm) {
12101210
if (c_rarg0 == _obj) {
12111211
__ addi(c_rarg1, _addr.base(), _addr.disp());
12121212
} else if (c_rarg1 == _obj) {
1213-
// Set up arguments in reverse, and then flip them
1214-
__ addi(c_rarg0, _addr.base(), _addr.disp());
1215-
// flip them
1216-
__ mr(_tmp1, c_rarg0);
1217-
__ mr(c_rarg0, c_rarg1);
1218-
__ mr(c_rarg1, _tmp1);
1213+
__ mr(_tmp1, c_rarg1);
1214+
__ addi(c_rarg1, _addr.base(), _addr.disp());
1215+
__ mr(c_rarg0, _tmp1);
12191216
} else {
12201217
assert_different_registers(c_rarg1, _obj);
12211218
__ addi(c_rarg1, _addr.base(), _addr.disp());

src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -912,12 +912,9 @@ void ShenandoahBarrierStubC2::lrb(MacroAssembler& masm) {
912912
if (c_rarg0 == _obj) {
913913
__ la(c_rarg1, _addr);
914914
} else if (c_rarg1 == _obj) {
915-
// Set up arguments in reverse, and then flip them
916-
__ la(c_rarg0, _addr);
917-
// flip them
918-
__ mv(_tmp1, c_rarg0);
919-
__ mv(c_rarg0, c_rarg1);
920-
__ mv(c_rarg1, _tmp1);
915+
__ mv(_tmp1, c_rarg1);
916+
__ la(c_rarg1, _addr);
917+
__ mv(c_rarg0, _tmp1);
921918
} else {
922919
assert_different_registers(c_rarg1, _obj);
923920
__ la(c_rarg1, _addr);

src/hotspot/cpu/riscv/globals_riscv.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ define_pd_global(intx, InlineSmallCode, 1000);
120120
product(bool, UseZvbb, false, EXPERIMENTAL, "Use Zvbb instructions") \
121121
product(bool, UseZvbc, false, EXPERIMENTAL, "Use Zvbc instructions") \
122122
product(bool, UseZvfh, false, DIAGNOSTIC, "Use Zvfh instructions") \
123-
product(bool, UseZvkn, false, EXPERIMENTAL, \
123+
product(bool, UseZvkg, false, DIAGNOSTIC, "Use Zvkg instructions") \
124+
product(bool, UseZvkn, false, DIAGNOSTIC, \
124125
"Use Zvkn group extension, Zvkned, Zvknhb, Zvkb, Zvkt") \
125126
product(bool, UseCtxFencei, false, EXPERIMENTAL, \
126-
"Use PR_RISCV_CTX_SW_FENCEI_ON to avoid explicit icache flush") \
127-
product(bool, UseZvkg, false, EXPERIMENTAL, "Use Zvkg instructions")
127+
"Use PR_RISCV_CTX_SW_FENCEI_ON to avoid explicit icache flush")
128128

129129
#endif // CPU_RISCV_GLOBALS_RISCV_HPP

0 commit comments

Comments
 (0)