163 _result = result; 164 _info = new CodeEmitInfo(info); 165 } 166 167 168 void LoadFlattenedArrayStub::emit_code(LIR_Assembler* ce) { 169 assert(__ rsp_offset() == 0, "frame size should be fixed"); 170 __ bind(_entry); 171 ce->store_parameter(_array->as_register(), 1); 172 ce->store_parameter(_index->as_register(), 0); 173 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::load_flattened_array_id))); 174 ce->add_call_info_here(_info); 175 ce->verify_oop_map(_info); 176 if (_result->as_register() != rax) { 177 __ movptr(_result->as_register(), rax); 178 } 179 __ jmp(_continuation); 180 } 181 182 183 // Implementation of NewInstanceStub 184 185 NewInstanceStub::NewInstanceStub(LIR_Opr klass_reg, LIR_Opr result, ciInstanceKlass* klass, CodeEmitInfo* info, Runtime1::StubID stub_id) { 186 _result = result; 187 _klass = klass; 188 _klass_reg = klass_reg; 189 _info = new CodeEmitInfo(info); 190 assert(stub_id == Runtime1::new_instance_id || 191 stub_id == Runtime1::fast_new_instance_id || 192 stub_id == Runtime1::fast_new_instance_init_check_id, 193 "need new_instance id"); 194 _stub_id = stub_id; 195 } 196 197 198 void NewInstanceStub::emit_code(LIR_Assembler* ce) { 199 assert(__ rsp_offset() == 0, "frame size should be fixed"); 200 __ bind(_entry); 201 __ movptr(rdx, _klass_reg->as_register()); 202 __ call(RuntimeAddress(Runtime1::entry_for(_stub_id))); | 163 _result = result; 164 _info = new CodeEmitInfo(info); 165 } 166 167 168 void LoadFlattenedArrayStub::emit_code(LIR_Assembler* ce) { 169 assert(__ rsp_offset() == 0, "frame size should be fixed"); 170 __ bind(_entry); 171 ce->store_parameter(_array->as_register(), 1); 172 ce->store_parameter(_index->as_register(), 0); 173 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::load_flattened_array_id))); 174 ce->add_call_info_here(_info); 175 ce->verify_oop_map(_info); 176 if (_result->as_register() != rax) { 177 __ movptr(_result->as_register(), rax); 178 } 179 __ jmp(_continuation); 180 } 181 182 183 // Implementation of StoreFlattenedArrayStub 184 185 StoreFlattenedArrayStub::StoreFlattenedArrayStub(LIR_Opr array, LIR_Opr index, LIR_Opr value, CodeEmitInfo* info) { 186 _array = array; 187 _index = index; 188 _value = value; 189 _info = new CodeEmitInfo(info); 190 } 191 192 193 void StoreFlattenedArrayStub::emit_code(LIR_Assembler* ce) { 194 assert(__ rsp_offset() == 0, "frame size should be fixed"); 195 __ bind(_entry); 196 ce->store_parameter(_array->as_register(), 2); 197 ce->store_parameter(_index->as_register(), 1); 198 ce->store_parameter(_value->as_register(), 0); 199 __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::store_flattened_array_id))); 200 ce->add_call_info_here(_info); 201 ce->verify_oop_map(_info); 202 __ jmp(_continuation); 203 } 204 205 206 // Implementation of NewInstanceStub 207 208 NewInstanceStub::NewInstanceStub(LIR_Opr klass_reg, LIR_Opr result, ciInstanceKlass* klass, CodeEmitInfo* info, Runtime1::StubID stub_id) { 209 _result = result; 210 _klass = klass; 211 _klass_reg = klass_reg; 212 _info = new CodeEmitInfo(info); 213 assert(stub_id == Runtime1::new_instance_id || 214 stub_id == Runtime1::fast_new_instance_id || 215 stub_id == Runtime1::fast_new_instance_init_check_id, 216 "need new_instance id"); 217 _stub_id = stub_id; 218 } 219 220 221 void NewInstanceStub::emit_code(LIR_Assembler* ce) { 222 assert(__ rsp_offset() == 0, "frame size should be fixed"); 223 __ bind(_entry); 224 __ movptr(rdx, _klass_reg->as_register()); 225 __ call(RuntimeAddress(Runtime1::entry_for(_stub_id))); |