Skip to content

Commit 032819e

Browse files
committed
8230669: [s390] C1: assert(is_bound() || is_unused()) failed: Label was never bound to a location, but it was used as a jmp target
Reviewed-by: phh, xliu
1 parent 5f29e88 commit 032819e

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
3-
* Copyright (c) 2016, 2017, SAP SE. All rights reserved.
2+
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
3+
* Copyright (c) 2016, 2019, SAP SE. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* This code is free software; you can redistribute it and/or modify it
@@ -1985,7 +1985,6 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
19851985
return;
19861986
}
19871987

1988-
Label done;
19891988
// Save outgoing arguments in callee saved registers (C convention) in case
19901989
// a call to System.arraycopy is needed.
19911990
Register callee_saved_src = Z_R10;
@@ -2157,7 +2156,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
21572156
store_parameter(src_klass, 0); // sub
21582157
store_parameter(dst_klass, 1); // super
21592158
emit_call_c(Runtime1::entry_for (Runtime1::slow_subtype_check_id));
2160-
CHECK_BAILOUT();
2159+
CHECK_BAILOUT2(cont, slow);
21612160
// Sets condition code 0 for match (2 otherwise).
21622161
__ branch_optimized(Assembler::bcondEqual, cont);
21632162

@@ -2216,7 +2215,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
22162215
__ z_lg(Z_ARG5, Address(Z_ARG5, ObjArrayKlass::element_klass_offset()));
22172216
__ z_lg(Z_ARG4, Address(Z_ARG5, Klass::super_check_offset_offset()));
22182217
emit_call_c(copyfunc_addr);
2219-
CHECK_BAILOUT();
2218+
CHECK_BAILOUT2(cont, slow);
22202219

22212220
#ifndef PRODUCT
22222221
if (PrintC1Statistics) {
@@ -2571,7 +2570,7 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
25712570
store_parameter(klass_RInfo, 0); // sub
25722571
store_parameter(k_RInfo, 1); // super
25732572
emit_call_c(a); // Sets condition code 0 for match (2 otherwise).
2574-
CHECK_BAILOUT();
2573+
CHECK_BAILOUT2(profile_cast_failure, profile_cast_success);
25752574
__ branch_optimized(Assembler::bcondNotEqual, *failure_target);
25762575
// Fall through to success case.
25772576
}
@@ -2654,7 +2653,7 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
26542653
store_parameter(klass_RInfo, 0); // sub
26552654
store_parameter(k_RInfo, 1); // super
26562655
emit_call_c(a); // Sets condition code 0 for match (2 otherwise).
2657-
CHECK_BAILOUT();
2656+
CHECK_BAILOUT3(profile_cast_success, profile_cast_failure, done);
26582657
__ branch_optimized(Assembler::bcondNotEqual, *failure_target);
26592658
// Fall through to success case.
26602659

src/hotspot/share/c1/c1_Compilation.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,11 @@ class Compilation: public StackObj {
296296
#define CHECK_BAILOUT() { if (bailed_out()) return; }
297297
#define CHECK_BAILOUT_(res) { if (bailed_out()) return res; }
298298

299+
// BAILOUT check with reset of bound labels
300+
#define CHECK_BAILOUT1(l1) { if (bailed_out()) { l1.reset(); return; } }
301+
#define CHECK_BAILOUT2(l1, l2) { if (bailed_out()) { l1.reset(); l2.reset(); return; } }
302+
#define CHECK_BAILOUT3(l1, l2, l3) { if (bailed_out()) { l1.reset(); l2.reset(); l3.reset(); return; } }
303+
299304

300305
class InstructionMark: public StackObj {
301306
private:

0 commit comments

Comments
 (0)