< prev index next >

src/cpu/aarch64/vm/macroAssembler_aarch64.cpp

Print this page
rev 8692 : 8131483: aarch64: illegal stlxr instructions
Summary: Do not generate stlxX with Ws == Xn
Reviewed-by: aph


3774       // for add(Rn, Rn, 0).
3775       add(rscratch1, rscratch1, offset);
3776       ldaxr(obj, rscratch1);
3777     }
3778 
3779     // Adjust it my the size of our new object
3780     if (var_size_in_bytes == noreg) {
3781       lea(end, Address(obj, con_size_in_bytes));
3782     } else {
3783       lea(end, Address(obj, var_size_in_bytes));
3784     }
3785 
3786     // if end < obj then we wrapped around high memory
3787     cmp(end, obj);
3788     br(Assembler::LO, slow_case);
3789 
3790     cmp(end, heap_end);
3791     br(Assembler::HI, slow_case);
3792 
3793     // If heap_top hasn't been changed by some other thread, update it.
3794     stlxr(rscratch1, end, rscratch1);
3795     cbnzw(rscratch1, retry);
3796   }
3797 }
3798 
3799 void MacroAssembler::verify_tlab() {
3800 #ifdef ASSERT
3801   if (UseTLAB && VerifyOops) {
3802     Label next, ok;
3803 
3804     stp(rscratch2, rscratch1, Address(pre(sp, -16)));
3805 
3806     ldr(rscratch2, Address(rthread, in_bytes(JavaThread::tlab_top_offset())));
3807     ldr(rscratch1, Address(rthread, in_bytes(JavaThread::tlab_start_offset())));
3808     cmp(rscratch2, rscratch1);
3809     br(Assembler::HS, next);
3810     STOP("assert(top >= start)");
3811     should_not_reach_here();
3812 
3813     bind(next);
3814     ldr(rscratch2, Address(rthread, in_bytes(JavaThread::tlab_end_offset())));
3815     ldr(rscratch1, Address(rthread, in_bytes(JavaThread::tlab_top_offset())));




3774       // for add(Rn, Rn, 0).
3775       add(rscratch1, rscratch1, offset);
3776       ldaxr(obj, rscratch1);
3777     }
3778 
3779     // Adjust it my the size of our new object
3780     if (var_size_in_bytes == noreg) {
3781       lea(end, Address(obj, con_size_in_bytes));
3782     } else {
3783       lea(end, Address(obj, var_size_in_bytes));
3784     }
3785 
3786     // if end < obj then we wrapped around high memory
3787     cmp(end, obj);
3788     br(Assembler::LO, slow_case);
3789 
3790     cmp(end, heap_end);
3791     br(Assembler::HI, slow_case);
3792 
3793     // If heap_top hasn't been changed by some other thread, update it.
3794     stlxr(rscratch2, end, rscratch1);
3795     cbnzw(rscratch2, retry);
3796   }
3797 }
3798 
3799 void MacroAssembler::verify_tlab() {
3800 #ifdef ASSERT
3801   if (UseTLAB && VerifyOops) {
3802     Label next, ok;
3803 
3804     stp(rscratch2, rscratch1, Address(pre(sp, -16)));
3805 
3806     ldr(rscratch2, Address(rthread, in_bytes(JavaThread::tlab_top_offset())));
3807     ldr(rscratch1, Address(rthread, in_bytes(JavaThread::tlab_start_offset())));
3808     cmp(rscratch2, rscratch1);
3809     br(Assembler::HS, next);
3810     STOP("assert(top >= start)");
3811     should_not_reach_here();
3812 
3813     bind(next);
3814     ldr(rscratch2, Address(rthread, in_bytes(JavaThread::tlab_end_offset())));
3815     ldr(rscratch1, Address(rthread, in_bytes(JavaThread::tlab_top_offset())));


< prev index next >