src/cpu/x86/vm/assembler_x86_64.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/cpu/x86/vm/assembler_x86_64.cpp Wed May 14 20:04:34 2008
--- new/src/cpu/x86/vm/assembler_x86_64.cpp Wed May 14 20:04:34 2008
*** 681,691 ****
--- 681,692 ----
}
break;
case REP8(0xB8): // movl/q r, #32/#64(oop?)
if (which == end_pc_operand) return ip + (is_64bit ? 8 : 4);
! assert((which == call32_operand || which == imm64_operand) && is_64bit, "");
! assert((which == call32_operand || which == imm64_operand) && is_64bit ||
+ which == narrow_oop_operand && !is_64bit, "");
return ip;
case 0x69: // imul r, a, #32
case 0xC7: // movl a, #32(oop?)
tail_size = 4;
*** 907,917 ****
--- 908,919 ----
if (r->type() == relocInfo::none) {
return;
} else if (r->is_call() || format == call32_operand) {
opnd = locate_operand(inst, call32_operand);
} else if (r->is_data()) {
! assert(format == imm64_operand || format == disp32_operand, "format ok");
! assert(format == imm64_operand || format == disp32_operand ||
+ format == narrow_oop_operand, "format ok");
opnd = locate_operand(inst, (WhichOperand) format);
} else {
assert(format == 0, "cannot specify a format");
return;
}
*** 5155,5170 ****
--- 5157,5169 ----
}
void MacroAssembler::store_klass(Register dst, Register src) {
if (UseCompressedOops) {
encode_heap_oop_not_null(src);
! // zero the entire klass field first as the gap needs to be zeroed too.
movptr(Address(dst, oopDesc::klass_offset_in_bytes()), NULL_WORD);
movl(Address(dst, oopDesc::klass_offset_in_bytes()), src);
} else {
movq(Address(dst, oopDesc::klass_offset_in_bytes()), src);
! // Store to the wide klass field to zero the gap.
}
+ movq(Address(dst, oopDesc::klass_offset_in_bytes()), src);
}
void MacroAssembler::load_heap_oop(Register dst, Address src) {
if (UseCompressedOops) {
movl(dst, src);
*** 5275,5284 ****
--- 5274,5295 ----
// vtableStubs also counts instructions in pd_code_size_limit.
assert(Address::times_8 == LogMinObjAlignmentInBytes, "decode alg wrong");
leaq(dst, Address(r12_heapbase, src, Address::times_8, 0));
}
+ void MacroAssembler::load_narrow_oop_con(Register dst, jobject obj) {
+ assert(oop_recorder() != NULL, "this assembler needs an OopRecorder");
+ int oop_index = oop_recorder()->find_index(obj);
+ RelocationHolder rspec = oop_Relocation::spec(oop_index);
+
+ InstructionMark im(this);
+ int encode = prefix_and_encode(dst->encoding());
+ emit_byte(0xB8 | encode);
+ emit_data(oop_index, rspec, narrow_oop_operand);
+ }
+
+
Assembler::Condition MacroAssembler::negate_condition(Assembler::Condition cond) {
switch (cond) {
// Note some conditions are synonyms for others
case Assembler::zero: return Assembler::notZero;
case Assembler::notZero: return Assembler::zero;
src/cpu/x86/vm/assembler_x86_64.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File