< prev index next >

src/hotspot/cpu/x86/c1_CodeStubs_x86.cpp

Print this page




  75   // input is NaN -> return 0
  76   __ bind(NaN);
  77   __ xorptr(result()->as_register(), result()->as_register());
  78 
  79   __ bind(do_return);
  80   __ jmp(_continuation);
  81 }
  82 
  83 void CounterOverflowStub::emit_code(LIR_Assembler* ce) {
  84   __ bind(_entry);
  85   Metadata *m = _method->as_constant_ptr()->as_metadata();
  86   ce->store_parameter(m, 1);
  87   ce->store_parameter(_bci, 0);
  88   __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::counter_overflow_id)));
  89   ce->add_call_info_here(_info);
  90   ce->verify_oop_map(_info);
  91   __ jmp(_continuation);
  92 }
  93 
  94 RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, LIR_Opr array)
  95   : _throw_index_out_of_bounds_exception(array == NULL), _index(index), _array(array)
  96 {
  97   assert(info != NULL, "must have info");
  98   _info = new CodeEmitInfo(info);
  99 }
 100 





 101 
 102 void RangeCheckStub::emit_code(LIR_Assembler* ce) {
 103   __ bind(_entry);
 104   if (_info->deoptimize_on_exception()) {
 105     address a = Runtime1::entry_for(Runtime1::predicate_failed_trap_id);
 106     __ call(RuntimeAddress(a));
 107     ce->add_call_info_here(_info);
 108     ce->verify_oop_map(_info);
 109     debug_only(__ should_not_reach_here());
 110     return;
 111   }
 112 
 113   // pass the array index on stack because all registers must be preserved
 114   if (_index->is_cpu_register()) {
 115     ce->store_parameter(_index->as_register(), 0);
 116   } else {
 117     ce->store_parameter(_index->as_jint(), 0);
 118   }
 119   Runtime1::StubID stub_id;
 120   if (_throw_index_out_of_bounds_exception) {




  75   // input is NaN -> return 0
  76   __ bind(NaN);
  77   __ xorptr(result()->as_register(), result()->as_register());
  78 
  79   __ bind(do_return);
  80   __ jmp(_continuation);
  81 }
  82 
  83 void CounterOverflowStub::emit_code(LIR_Assembler* ce) {
  84   __ bind(_entry);
  85   Metadata *m = _method->as_constant_ptr()->as_metadata();
  86   ce->store_parameter(m, 1);
  87   ce->store_parameter(_bci, 0);
  88   __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::counter_overflow_id)));
  89   ce->add_call_info_here(_info);
  90   ce->verify_oop_map(_info);
  91   __ jmp(_continuation);
  92 }
  93 
  94 RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, LIR_Opr array)
  95   : _throw_index_out_of_bounds_exception(false), _index(index), _array(array) {

  96   assert(info != NULL, "must have info");
  97   _info = new CodeEmitInfo(info);
  98 }
  99 
 100 RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index)
 101   : _throw_index_out_of_bounds_exception(true), _index(index), _array(NULL) {
 102   assert(info != NULL, "must have info");
 103   _info = new CodeEmitInfo(info);
 104 }
 105 
 106 void RangeCheckStub::emit_code(LIR_Assembler* ce) {
 107   __ bind(_entry);
 108   if (_info->deoptimize_on_exception()) {
 109     address a = Runtime1::entry_for(Runtime1::predicate_failed_trap_id);
 110     __ call(RuntimeAddress(a));
 111     ce->add_call_info_here(_info);
 112     ce->verify_oop_map(_info);
 113     debug_only(__ should_not_reach_here());
 114     return;
 115   }
 116 
 117   // pass the array index on stack because all registers must be preserved
 118   if (_index->is_cpu_register()) {
 119     ce->store_parameter(_index->as_register(), 0);
 120   } else {
 121     ce->store_parameter(_index->as_jint(), 0);
 122   }
 123   Runtime1::StubID stub_id;
 124   if (_throw_index_out_of_bounds_exception) {


< prev index next >