319 }
320
321 for (i = 0; i < FrameMap::nof_cpu_regs; i++) {
322 Register r = as_Register(i);
323 cpu_reg_save_offsets[i] = sp_offset;
324 sp_offset += 2; // SP offsets are in halfwords
325 }
326 }
327
328
329 // target: the entry point of the method that creates and posts the exception oop
330 // has_argument: true if the exception needs an argument (passed in rscratch1)
331
332 OopMapSet* Runtime1::generate_exception_throw(StubAssembler* sasm, address target, bool has_argument) {
333 // make a frame and preserve the caller's caller-save registers
334 OopMap* oop_map = save_live_registers(sasm);
335 int call_offset;
336 if (!has_argument) {
337 call_offset = __ call_RT(noreg, noreg, target);
338 } else {
339 call_offset = __ call_RT(noreg, noreg, target, rscratch1);
340 }
341 OopMapSet* oop_maps = new OopMapSet();
342 oop_maps->add_gc_map(call_offset, oop_map);
343
344 __ should_not_reach_here();
345 return oop_maps;
346 }
347
348
349 OopMapSet* Runtime1::generate_handle_exception(StubID id, StubAssembler *sasm) {
350 __ block_comment("generate_handle_exception");
351
352 // incoming parameters
353 const Register exception_oop = r0;
354 const Register exception_pc = r3;
355 // other registers used in this stub
356
357 // Save registers, if required.
358 OopMapSet* oop_maps = new OopMapSet();
359 OopMap* oop_map = NULL;
|
319 }
320
321 for (i = 0; i < FrameMap::nof_cpu_regs; i++) {
322 Register r = as_Register(i);
323 cpu_reg_save_offsets[i] = sp_offset;
324 sp_offset += 2; // SP offsets are in halfwords
325 }
326 }
327
328
329 // target: the entry point of the method that creates and posts the exception oop
330 // has_argument: true if the exception needs an argument (passed in rscratch1)
331
332 OopMapSet* Runtime1::generate_exception_throw(StubAssembler* sasm, address target, bool has_argument) {
333 // make a frame and preserve the caller's caller-save registers
334 OopMap* oop_map = save_live_registers(sasm);
335 int call_offset;
336 if (!has_argument) {
337 call_offset = __ call_RT(noreg, noreg, target);
338 } else {
339 call_offset = __ call_RT(noreg, noreg, target, rscratch1, rscratch2);
340 }
341 OopMapSet* oop_maps = new OopMapSet();
342 oop_maps->add_gc_map(call_offset, oop_map);
343
344 __ should_not_reach_here();
345 return oop_maps;
346 }
347
348
349 OopMapSet* Runtime1::generate_handle_exception(StubID id, StubAssembler *sasm) {
350 __ block_comment("generate_handle_exception");
351
352 // incoming parameters
353 const Register exception_oop = r0;
354 const Register exception_pc = r3;
355 // other registers used in this stub
356
357 // Save registers, if required.
358 OopMapSet* oop_maps = new OopMapSet();
359 OopMap* oop_map = NULL;
|