25 26 #include "precompiled.hpp" 27 #include "c1/c1_CodeStubs.hpp" 28 #include "c1/c1_FrameMap.hpp" 29 #include "c1/c1_LIRAssembler.hpp" 30 #include "c1/c1_MacroAssembler.hpp" 31 #include "c1/c1_Runtime1.hpp" 32 #include "nativeInst_s390.hpp" 33 #include "runtime/sharedRuntime.hpp" 34 #include "utilities/align.hpp" 35 #include "utilities/macros.hpp" 36 #include "vmreg_s390.inline.hpp" 37 #if INCLUDE_ALL_GCS 38 #include "gc/g1/g1BarrierSet.hpp" 39 #endif // INCLUDE_ALL_GCS 40 41 #define __ ce->masm()-> 42 #undef CHECK_BAILOUT 43 #define CHECK_BAILOUT() { if (ce->compilation()->bailed_out()) return; } 44 45 RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, LIR_Opr array) : 46 _throw_index_out_of_bounds_exception(array == NULL), _index(index), _array(array) { 47 assert(info != NULL, "must have info"); 48 _info = new CodeEmitInfo(info); 49 } 50 51 void RangeCheckStub::emit_code(LIR_Assembler* ce) { 52 __ bind(_entry); 53 if (_info->deoptimize_on_exception()) { 54 address a = Runtime1::entry_for (Runtime1::predicate_failed_trap_id); 55 ce->emit_call_c(a); 56 CHECK_BAILOUT(); 57 ce->add_call_info_here(_info); 58 ce->verify_oop_map(_info); 59 debug_only(__ should_not_reach_here()); 60 return; 61 } 62 63 // Pass the array index in Z_R1_scratch which is not managed by linear scan. 64 if (_index->is_cpu_register()) { 65 __ lgr_if_needed(Z_R1_scratch, _index->as_register()); 66 } else { | 25 26 #include "precompiled.hpp" 27 #include "c1/c1_CodeStubs.hpp" 28 #include "c1/c1_FrameMap.hpp" 29 #include "c1/c1_LIRAssembler.hpp" 30 #include "c1/c1_MacroAssembler.hpp" 31 #include "c1/c1_Runtime1.hpp" 32 #include "nativeInst_s390.hpp" 33 #include "runtime/sharedRuntime.hpp" 34 #include "utilities/align.hpp" 35 #include "utilities/macros.hpp" 36 #include "vmreg_s390.inline.hpp" 37 #if INCLUDE_ALL_GCS 38 #include "gc/g1/g1BarrierSet.hpp" 39 #endif // INCLUDE_ALL_GCS 40 41 #define __ ce->masm()-> 42 #undef CHECK_BAILOUT 43 #define CHECK_BAILOUT() { if (ce->compilation()->bailed_out()) return; } 44 45 RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, LIR_Opr array) 46 : _throw_index_out_of_bounds_exception(false), _index(index), _array(array) { 47 assert(info != NULL, "must have info"); 48 _info = new CodeEmitInfo(info); 49 } 50 51 RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index) 52 : _throw_index_out_of_bounds_exception(true), _index(index), _array(NULL) { 53 assert(info != NULL, "must have info"); 54 _info = new CodeEmitInfo(info); 55 } 56 57 void RangeCheckStub::emit_code(LIR_Assembler* ce) { 58 __ bind(_entry); 59 if (_info->deoptimize_on_exception()) { 60 address a = Runtime1::entry_for (Runtime1::predicate_failed_trap_id); 61 ce->emit_call_c(a); 62 CHECK_BAILOUT(); 63 ce->add_call_info_here(_info); 64 ce->verify_oop_map(_info); 65 debug_only(__ should_not_reach_here()); 66 return; 67 } 68 69 // Pass the array index in Z_R1_scratch which is not managed by linear scan. 70 if (_index->is_cpu_register()) { 71 __ lgr_if_needed(Z_R1_scratch, _index->as_register()); 72 } else { |