src/cpu/x86/vm/assembler_x86_32.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6644928 Sdiff src/cpu/x86/vm

src/cpu/x86/vm/assembler_x86_32.cpp

Print this page




3388 
3389 
3390 void MacroAssembler::store_check(Register obj, Address dst) {
3391   store_check(obj);
3392 }
3393 
3394 
3395 // split the store check operation so that other instructions can be scheduled inbetween
3396 void MacroAssembler::store_check_part_1(Register obj) {
3397   BarrierSet* bs = Universe::heap()->barrier_set();
3398   assert(bs->kind() == BarrierSet::CardTableModRef, "Wrong barrier set kind");
3399   shrl(obj, CardTableModRefBS::card_shift);
3400 }
3401 
3402 
3403 void MacroAssembler::store_check_part_2(Register obj) {
3404   BarrierSet* bs = Universe::heap()->barrier_set();
3405   assert(bs->kind() == BarrierSet::CardTableModRef, "Wrong barrier set kind");
3406   CardTableModRefBS* ct = (CardTableModRefBS*)bs;
3407   assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code");
3408   ExternalAddress cardtable((address)ct->byte_map_base);
3409   Address index(noreg, obj, Address::times_1);
3410 
3411   movb(as_Address(ArrayAddress(cardtable, index)), 0);








3412 }
3413 
3414 
3415 void MacroAssembler::c2bool(Register x) {
3416   // implements x == 0 ? 0 : 1
3417   // note: must only look at least-significant byte of x
3418   //       since C-style booleans are stored in one byte
3419   //       only! (was bug)
3420   andl(x, 0xFF);
3421   setb(Assembler::notZero, x);
3422 }
3423 
3424 
3425 int MacroAssembler::corrected_idivl(Register reg) {
3426   // Full implementation of Java idiv and irem; checks for
3427   // special case as described in JVM spec., p.243 & p.271.
3428   // The function returns the (pc) offset of the idivl
3429   // instruction - may be needed for implicit exceptions.
3430   //
3431   //         normal case                           special case




3388 
3389 
3390 void MacroAssembler::store_check(Register obj, Address dst) {
3391   store_check(obj);
3392 }
3393 
3394 
3395 // split the store check operation so that other instructions can be scheduled inbetween
3396 void MacroAssembler::store_check_part_1(Register obj) {
3397   BarrierSet* bs = Universe::heap()->barrier_set();
3398   assert(bs->kind() == BarrierSet::CardTableModRef, "Wrong barrier set kind");
3399   shrl(obj, CardTableModRefBS::card_shift);
3400 }
3401 
3402 
3403 void MacroAssembler::store_check_part_2(Register obj) {
3404   BarrierSet* bs = Universe::heap()->barrier_set();
3405   assert(bs->kind() == BarrierSet::CardTableModRef, "Wrong barrier set kind");
3406   CardTableModRefBS* ct = (CardTableModRefBS*)bs;
3407   assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code");


3408 
3409   // The calculation for byte_map_base is as follows:
3410   // byte_map_base = _byte_map - (uintptr_t(low_bound) >> card_shift);
3411   // So this essentially converts an address to a displacement and
3412   // it will never need to be relocated. On 64bit however the value may be too
3413   // large for a 32bit displacement
3414 
3415   intptr_t disp = (intptr_t) ct->byte_map_base;
3416   Address cardtable(noreg, obj, Address::times_1, disp);
3417   movb(cardtable, 0);
3418 }
3419 
3420 
3421 void MacroAssembler::c2bool(Register x) {
3422   // implements x == 0 ? 0 : 1
3423   // note: must only look at least-significant byte of x
3424   //       since C-style booleans are stored in one byte
3425   //       only! (was bug)
3426   andl(x, 0xFF);
3427   setb(Assembler::notZero, x);
3428 }
3429 
3430 
3431 int MacroAssembler::corrected_idivl(Register reg) {
3432   // Full implementation of Java idiv and irem; checks for
3433   // special case as described in JVM spec., p.243 & p.271.
3434   // The function returns the (pc) offset of the idivl
3435   // instruction - may be needed for implicit exceptions.
3436   //
3437   //         normal case                           special case


src/cpu/x86/vm/assembler_x86_32.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File