3509 mov(SP, Rtsp); 3510 3511 // Bang stack for total size given plus stack shadow page size. 3512 // Bang one page at a time because a large size can overflow yellow and 3513 // red zones (the bang will fail but stack overflow handling can't tell that 3514 // it was a stack overflow bang vs a regular segv). 3515 int offset = os::vm_page_size(); 3516 Register Roffset = Rscratch; 3517 3518 Label loop; 3519 bind(loop); 3520 set((-offset)+STACK_BIAS, Rscratch); 3521 st(G0, Rtsp, Rscratch); 3522 set(offset, Roffset); 3523 sub(Rsize, Roffset, Rsize); 3524 cmp(Rsize, G0); 3525 br(Assembler::greater, false, Assembler::pn, loop); 3526 delayed()->sub(Rtsp, Roffset, Rtsp); 3527 3528 // Bang down shadow pages too. 3529 // The -1 because we already subtracted 1 page. 3530 for (int i = 0; i< StackShadowPages-1; i++) { 3531 set((-i*offset)+STACK_BIAS, Rscratch); 3532 st(G0, Rtsp, Rscratch); 3533 } 3534 } 3535 3536 /////////////////////////////////////////////////////////////////////////////////// 3537 #if INCLUDE_ALL_GCS 3538 3539 static address satb_log_enqueue_with_frame = NULL; 3540 static u_char* satb_log_enqueue_with_frame_end = NULL; 3541 3542 static address satb_log_enqueue_frameless = NULL; 3543 static u_char* satb_log_enqueue_frameless_end = NULL; 3544 3545 static int EnqueueCodeSize = 128 DEBUG_ONLY( + 256); // Instructions? 3546 3547 static void generate_satb_log_enqueue(bool with_frame) { 3548 BufferBlob* bb = BufferBlob::create("enqueue_with_frame", EnqueueCodeSize); 3549 CodeBuffer buf(bb); 3550 MacroAssembler masm(&buf); | 3509 mov(SP, Rtsp); 3510 3511 // Bang stack for total size given plus stack shadow page size. 3512 // Bang one page at a time because a large size can overflow yellow and 3513 // red zones (the bang will fail but stack overflow handling can't tell that 3514 // it was a stack overflow bang vs a regular segv). 3515 int offset = os::vm_page_size(); 3516 Register Roffset = Rscratch; 3517 3518 Label loop; 3519 bind(loop); 3520 set((-offset)+STACK_BIAS, Rscratch); 3521 st(G0, Rtsp, Rscratch); 3522 set(offset, Roffset); 3523 sub(Rsize, Roffset, Rsize); 3524 cmp(Rsize, G0); 3525 br(Assembler::greater, false, Assembler::pn, loop); 3526 delayed()->sub(Rtsp, Roffset, Rtsp); 3527 3528 // Bang down shadow pages too. 3529 // At this point, (tmp-0) is the last address touched, so don't touch it again. 3530 // (It was touched as (tmp-pagesize) but then tmp was post-decremented.) 3531 // Skip this address by starting at i=1, and touch a few more pages below. 3532 // N.B. It is important to touch all the down to and including i=StackShadowPages. 3533 for (int i = 1; i <= StackShadowPages; i++) { 3534 set((-i*offset)+STACK_BIAS, Rscratch); 3535 st(G0, Rtsp, Rscratch); 3536 } 3537 } 3538 3539 /////////////////////////////////////////////////////////////////////////////////// 3540 #if INCLUDE_ALL_GCS 3541 3542 static address satb_log_enqueue_with_frame = NULL; 3543 static u_char* satb_log_enqueue_with_frame_end = NULL; 3544 3545 static address satb_log_enqueue_frameless = NULL; 3546 static u_char* satb_log_enqueue_frameless_end = NULL; 3547 3548 static int EnqueueCodeSize = 128 DEBUG_ONLY( + 256); // Instructions? 3549 3550 static void generate_satb_log_enqueue(bool with_frame) { 3551 BufferBlob* bb = BufferBlob::create("enqueue_with_frame", EnqueueCodeSize); 3552 CodeBuffer buf(bb); 3553 MacroAssembler masm(&buf); |