3365 void MacroAssembler::load_klass(Register dst, Register src) {
3366 if (UseCompressedClassPointers) {
3367 lwz(dst, oopDesc::klass_offset_in_bytes(), src);
3368 // Attention: no null check here!
3369 decode_klass_not_null(dst, dst);
3370 } else {
3371 ld(dst, oopDesc::klass_offset_in_bytes(), src);
3372 }
3373 }
3374
3375 // ((OopHandle)result).resolve();
3376 void MacroAssembler::resolve_oop_handle(Register result) {
3377 // OopHandle::resolve is an indirection.
3378 ld(result, 0, result);
3379 }
3380
3381 void MacroAssembler::load_mirror_from_const_method(Register mirror, Register const_method) {
3382 ld(mirror, in_bytes(ConstMethod::constants_offset()), const_method);
3383 ld(mirror, ConstantPool::pool_holder_offset_in_bytes(), mirror);
3384 ld(mirror, in_bytes(Klass::java_mirror_offset()), mirror);
3385 }
3386
3387 // Clear Array
3388 // For very short arrays. tmp == R0 is allowed.
3389 void MacroAssembler::clear_memory_unrolled(Register base_ptr, int cnt_dwords, Register tmp, int offset) {
3390 if (cnt_dwords > 0) { li(tmp, 0); }
3391 for (int i = 0; i < cnt_dwords; ++i) { std(tmp, offset + i * 8, base_ptr); }
3392 }
3393
3394 // Version for constant short array length. Kills base_ptr. tmp == R0 is allowed.
3395 void MacroAssembler::clear_memory_constlen(Register base_ptr, int cnt_dwords, Register tmp) {
3396 if (cnt_dwords < 8) {
3397 clear_memory_unrolled(base_ptr, cnt_dwords, tmp);
3398 return;
3399 }
3400
3401 Label loop;
3402 const long loopcnt = cnt_dwords >> 1,
3403 remainder = cnt_dwords & 1;
3404
|
3365 void MacroAssembler::load_klass(Register dst, Register src) {
3366 if (UseCompressedClassPointers) {
3367 lwz(dst, oopDesc::klass_offset_in_bytes(), src);
3368 // Attention: no null check here!
3369 decode_klass_not_null(dst, dst);
3370 } else {
3371 ld(dst, oopDesc::klass_offset_in_bytes(), src);
3372 }
3373 }
3374
3375 // ((OopHandle)result).resolve();
3376 void MacroAssembler::resolve_oop_handle(Register result) {
3377 // OopHandle::resolve is an indirection.
3378 ld(result, 0, result);
3379 }
3380
3381 void MacroAssembler::load_mirror_from_const_method(Register mirror, Register const_method) {
3382 ld(mirror, in_bytes(ConstMethod::constants_offset()), const_method);
3383 ld(mirror, ConstantPool::pool_holder_offset_in_bytes(), mirror);
3384 ld(mirror, in_bytes(Klass::java_mirror_offset()), mirror);
3385 resolve_oop_handle(mirror);
3386 }
3387
3388 // Clear Array
3389 // For very short arrays. tmp == R0 is allowed.
3390 void MacroAssembler::clear_memory_unrolled(Register base_ptr, int cnt_dwords, Register tmp, int offset) {
3391 if (cnt_dwords > 0) { li(tmp, 0); }
3392 for (int i = 0; i < cnt_dwords; ++i) { std(tmp, offset + i * 8, base_ptr); }
3393 }
3394
3395 // Version for constant short array length. Kills base_ptr. tmp == R0 is allowed.
3396 void MacroAssembler::clear_memory_constlen(Register base_ptr, int cnt_dwords, Register tmp) {
3397 if (cnt_dwords < 8) {
3398 clear_memory_unrolled(base_ptr, cnt_dwords, tmp);
3399 return;
3400 }
3401
3402 Label loop;
3403 const long loopcnt = cnt_dwords >> 1,
3404 remainder = cnt_dwords & 1;
3405
|