Skip to content

Commit a7e7183

Browse files
author
Fei Yang
committed
Merge branch 'master' into riscv-port
2 parents 066d01b + 63e4303 commit a7e7183

File tree

89 files changed

+1044
-1053
lines changed

Some content is hidden

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

89 files changed

+1044
-1053
lines changed

make/autoconf/flags.m4

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,21 @@ AC_DEFUN([FLAGS_SETUP_SYSROOT_FLAGS],
215215
$1SYSROOT_CFLAGS="--sysroot=[$]$1SYSROOT"
216216
$1SYSROOT_LDFLAGS="--sysroot=[$]$1SYSROOT"
217217
elif test "x$TOOLCHAIN_TYPE" = xclang; then
218-
$1SYSROOT_CFLAGS="-isysroot [$]$1SYSROOT"
219-
$1SYSROOT_LDFLAGS="-isysroot [$]$1SYSROOT"
218+
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
219+
# -isysroot has no effect on linux
220+
# https://bugs.llvm.org/show_bug.cgi?id=11503
221+
$1SYSROOT_CFLAGS="--sysroot=[$]$1SYSROOT"
222+
$1SYSROOT_LDFLAGS="--sysroot=[$]$1SYSROOT"
223+
if test -d "$DEVKIT_TOOLCHAIN_PATH"; then
224+
# In devkits, gcc is not located in the sysroot.
225+
# use --gcc-toolchain to let clang find the gcc installation.
226+
$1SYSROOT_CFLAGS="[$]$1SYSROOT_CFLAGS --gcc-toolchain=$DEVKIT_TOOLCHAIN_PATH/.."
227+
$1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS --gcc-toolchain=$DEVKIT_TOOLCHAIN_PATH/.."
228+
fi
229+
else
230+
$1SYSROOT_CFLAGS="-isysroot [$]$1SYSROOT"
231+
$1SYSROOT_LDFLAGS="-isysroot [$]$1SYSROOT"
232+
fi
220233
fi
221234
fi
222235

src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ void C1_MacroAssembler::remove_frame(int framesize) {
304304
}
305305

306306

307-
void C1_MacroAssembler::verified_entry() {
307+
void C1_MacroAssembler::verified_entry(bool breakAtEntry) {
308308
// If we have to make this method not-entrant we'll overwrite its
309309
// first instruction with a jump. For this action to be legal we
310310
// must ensure that this first instruction is a B, BL, NOP, BKPT,

src/hotspot/cpu/arm/c1_MacroAssembler_arm.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ void C1_MacroAssembler::remove_frame(int frame_size_in_bytes) {
6969
raw_pop(FP, LR);
7070
}
7171

72-
void C1_MacroAssembler::verified_entry() {
73-
if (C1Breakpoint) {
72+
void C1_MacroAssembler::verified_entry(bool breakAtEntry) {
73+
if (breakAtEntry) {
7474
breakpoint();
7575
}
7676
}

src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ void C1_MacroAssembler::build_frame(int frame_size_in_bytes, int bang_size_in_by
8686
}
8787

8888

89-
void C1_MacroAssembler::verified_entry() {
90-
if (C1Breakpoint) illtrap();
89+
void C1_MacroAssembler::verified_entry(bool breakAtEntry) {
90+
if (breakAtEntry) illtrap();
9191
// build frame
9292
}
9393

src/hotspot/cpu/riscv/c1_MacroAssembler_riscv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ void C1_MacroAssembler::remove_frame(int framesize) {
319319
}
320320

321321

322-
void C1_MacroAssembler::verified_entry() {
322+
void C1_MacroAssembler::verified_entry(bool breakAtEntry) {
323323
// If we have to make this method not-entrant we'll overwrite its
324324
// first instruction with a jump. For this action to be legal we
325325
// must ensure that this first instruction is a J, JAL or NOP.

src/hotspot/cpu/s390/c1_MacroAssembler_s390.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ void C1_MacroAssembler::build_frame(int frame_size_in_bytes, int bang_size_in_by
7373
push_frame(frame_size_in_bytes);
7474
}
7575

76-
void C1_MacroAssembler::verified_entry() {
77-
if (C1Breakpoint) z_illtrap(0xC1);
76+
void C1_MacroAssembler::verified_entry(bool breakAtEntry) {
77+
if (breakAtEntry) z_illtrap(0xC1);
7878
}
7979

8080
void C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr, Label& slow_case) {

src/hotspot/cpu/x86/c1_MacroAssembler_x86.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,18 +331,18 @@ void C1_MacroAssembler::remove_frame(int frame_size_in_bytes) {
331331
}
332332

333333

334-
void C1_MacroAssembler::verified_entry() {
335-
if (C1Breakpoint || VerifyFPU) {
334+
void C1_MacroAssembler::verified_entry(bool breakAtEntry) {
335+
if (breakAtEntry || VerifyFPU) {
336336
// Verified Entry first instruction should be 5 bytes long for correct
337337
// patching by patch_verified_entry().
338338
//
339-
// C1Breakpoint and VerifyFPU have one byte first instruction.
339+
// Breakpoint and VerifyFPU have one byte first instruction.
340340
// Also first instruction will be one byte "push(rbp)" if stack banging
341341
// code is not generated (see build_frame() above).
342342
// For all these cases generate long instruction first.
343343
fat_nop();
344344
}
345-
if (C1Breakpoint)int3();
345+
if (breakAtEntry) int3();
346346
// build frame
347347
IA32_ONLY( verify_FPU(0, "method_entry"); )
348348
}

src/hotspot/share/c1/c1_LIRAssembler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ void LIR_Assembler::emit_op0(LIR_Op0* op) {
607607
check_icache();
608608
}
609609
offsets()->set_value(CodeOffsets::Verified_Entry, _masm->offset());
610-
_masm->verified_entry();
610+
_masm->verified_entry(compilation()->directive()->BreakAtExecuteOption);
611611
if (needs_clinit_barrier_on_entry(compilation()->method())) {
612612
clinit_barrier(compilation()->method());
613613
}

src/hotspot/share/c1/c1_MacroAssembler.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -42,7 +42,7 @@ class C1_MacroAssembler: public MacroAssembler {
4242
void build_frame(int frame_size_in_bytes, int bang_size_in_bytes);
4343
void remove_frame(int frame_size_in_bytes);
4444

45-
void verified_entry();
45+
void verified_entry(bool breakAtEntry);
4646
void verify_stack_oop(int offset) PRODUCT_RETURN;
4747
void verify_not_null_oop(Register r) PRODUCT_RETURN;
4848

src/hotspot/share/compiler/compilerDirectives.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,21 @@ DirectiveSet* DirectiveSet::compilecommand_compatibility_init(const methodHandle
334334
if (!CompilerDirectivesIgnoreCompileCommandsOption && CompilerOracle::has_any_command_set()) {
335335
DirectiveSetPtr set(this);
336336

337+
#ifdef COMPILER1
338+
if (C1Breakpoint) {
339+
// If the directives didn't have 'BreakAtExecute',
340+
// the command 'C1Breakpoint' would become effective.
341+
if (!_modified[BreakAtExecuteIndex]) {
342+
set.cloned()->BreakAtExecuteOption = true;
343+
}
344+
}
345+
#endif
346+
337347
// All CompileCommands are not equal so this gets a bit verbose
338348
// When CompileCommands have been refactored less clutter will remain.
339349
if (CompilerOracle::should_break_at(method)) {
350+
// If the directives didn't have 'BreakAtCompile' or 'BreakAtExecute',
351+
// the sub-command 'Break' of the 'CompileCommand' would become effective.
340352
if (!_modified[BreakAtCompileIndex]) {
341353
set.cloned()->BreakAtCompileOption = true;
342354
}

0 commit comments

Comments
 (0)