# HG changeset patch # User mdoerr # Date 1568036536 -7200 # Node ID 505e28fe17691fff461324068bda1370e3e8edc8 # Parent 9fba708740d6a2666ad95173789b44a5c42b5547 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 diff -r 9fba708740d6 -r 505e28fe1769 src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp --- 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. diff -r 9fba708740d6 -r 505e28fe1769 src/hotspot/share/c1/c1_Compilation.hpp --- 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: