OpenJDK / jdk / jdk
changeset 56212:505e28fe1769
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
author | mdoerr |
---|---|
date | Mon, 09 Sep 2019 15:42:16 +0200 |
parents | 9fba708740d6 |
children | bc4e7a84e89d |
files | src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp src/hotspot/share/c1/c1_Compilation.hpp |
diffstat | 2 files changed, 11 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp Mon Sep 09 15:14:16 2019 +0200 +++ b/src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp Mon Sep 09 15:42:16 2019 +0200 @@ -1,6 +1,6 @@ /* - * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016, 2017, SAP SE. All rights reserved. + * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2019, SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1985,7 +1985,6 @@ return; } - Label done; // Save outgoing arguments in callee saved registers (C convention) in case // a call to System.arraycopy is needed. Register callee_saved_src = Z_R10; @@ -2157,7 +2156,7 @@ store_parameter(src_klass, 0); // sub store_parameter(dst_klass, 1); // super emit_call_c(Runtime1::entry_for (Runtime1::slow_subtype_check_id)); - CHECK_BAILOUT(); + CHECK_BAILOUT2(cont, slow); // Sets condition code 0 for match (2 otherwise). __ branch_optimized(Assembler::bcondEqual, cont); @@ -2216,7 +2215,7 @@ __ z_lg(Z_ARG5, Address(Z_ARG5, ObjArrayKlass::element_klass_offset())); __ z_lg(Z_ARG4, Address(Z_ARG5, Klass::super_check_offset_offset())); emit_call_c(copyfunc_addr); - CHECK_BAILOUT(); + CHECK_BAILOUT2(cont, slow); #ifndef PRODUCT if (PrintC1Statistics) { @@ -2571,7 +2570,7 @@ store_parameter(klass_RInfo, 0); // sub store_parameter(k_RInfo, 1); // super emit_call_c(a); // Sets condition code 0 for match (2 otherwise). - CHECK_BAILOUT(); + CHECK_BAILOUT2(profile_cast_failure, profile_cast_success); __ branch_optimized(Assembler::bcondNotEqual, *failure_target); // Fall through to success case. } @@ -2654,7 +2653,7 @@ store_parameter(klass_RInfo, 0); // sub store_parameter(k_RInfo, 1); // super emit_call_c(a); // Sets condition code 0 for match (2 otherwise). - CHECK_BAILOUT(); + CHECK_BAILOUT3(profile_cast_success, profile_cast_failure, done); __ branch_optimized(Assembler::bcondNotEqual, *failure_target); // Fall through to success case.
--- a/src/hotspot/share/c1/c1_Compilation.hpp Mon Sep 09 15:14:16 2019 +0200 +++ b/src/hotspot/share/c1/c1_Compilation.hpp Mon Sep 09 15:42:16 2019 +0200 @@ -296,6 +296,11 @@ #define CHECK_BAILOUT() { if (bailed_out()) return; } #define CHECK_BAILOUT_(res) { if (bailed_out()) return res; } +// BAILOUT check with reset of bound labels +#define CHECK_BAILOUT1(l1) { if (bailed_out()) { l1.reset(); return; } } +#define CHECK_BAILOUT2(l1, l2) { if (bailed_out()) { l1.reset(); l2.reset(); return; } } +#define CHECK_BAILOUT3(l1, l2, l3) { if (bailed_out()) { l1.reset(); l2.reset(); l3.reset(); return; } } + class InstructionMark: public StackObj { private: