#endif
// Patch the code.
- patcher.masm()->movp(kScratchRegister, target, RelocInfo::NONE64);
+ patcher.masm()->movp(kScratchRegister, target, Assembler::RelocInfoNone());
patcher.masm()->call(kScratchRegister);
// Check that the size of the code generated is as expected.
set_target_address_at(instruction_payload, target);
}
+ static inline RelocInfo::Mode RelocInfoNone() {
+ if (kPointerSize == kInt64Size) {
+ return RelocInfo::NONE64;
+ } else {
+ ASSERT(kPointerSize == kInt32Size);
+ return RelocInfo::NONE32;
+ }
+ }
+
inline Handle<Object> code_target_object_handle_at(Address pc);
inline Address runtime_entry_at(Address pc);
// Number of bytes taken up by the branch target in the code.
// Do full GC and retry runtime call one final time.
Failure* failure = Failure::InternalError();
- __ Move(rax, failure, RelocInfo::NONE64);
+ __ Move(rax, failure, Assembler::RelocInfoNone());
GenerateCore(masm,
&throw_normal_exception,
&throw_termination_exception,
isolate);
Label already_have_failure;
JumpIfOOM(masm, rax, kScratchRegister, &already_have_failure);
- __ Move(rax, Failure::OutOfMemoryException(0x1), RelocInfo::NONE64);
+ __ Move(rax, Failure::OutOfMemoryException(0x1), Assembler::RelocInfoNone());
__ bind(&already_have_failure);
__ Store(pending_exception, rax);
// Fall through to the next label.
// Scratch register is neither callee-save, nor an argument register on any
// platform. It's free to use at this point.
// Cannot use smi-register for loading yet.
- __ Move(kScratchRegister, Smi::FromInt(marker), RelocInfo::NONE64);
+ __ Move(kScratchRegister, Smi::FromInt(marker), Assembler::RelocInfoNone());
__ push(kScratchRegister); // context slot
__ push(kScratchRegister); // function slot
// Save callee-saved registers (X64/Win64 calling conventions).
ExternalReference pending_exception(Isolate::kPendingExceptionAddress,
isolate);
__ Store(pending_exception, rax);
- __ Move(rax, Failure::Exception(), RelocInfo::NONE64);
+ __ Move(rax, Failure::Exception(), Assembler::RelocInfoNone());
__ jmp(&exit);
// Invoke: Link this frame into the handler chain. There's only one
// Call the entry hook function.
__ Move(rax, FUNCTION_ADDR(masm->isolate()->function_entry_hook()),
- RelocInfo::NONE64);
+ Assembler::RelocInfoNone());
AllowExternalCallThatCantCauseGC scope(masm);
// LLazyBailout instructions with nops if necessary.
CodePatcher patcher(call_address, Assembler::kCallSequenceLength);
patcher.masm()->Call(GetDeoptimizationEntry(isolate, i, LAZY),
- RelocInfo::NONE64);
+ Assembler::RelocInfoNone());
ASSERT(prev_call_address == NULL ||
call_address >= prev_call_address + patch_size());
ASSERT(call_address + patch_size() <= code->instruction_end());
__ bind(&runtime);
__ PrepareCallCFunction(2);
__ movp(arg_reg_1, object);
- __ Move(arg_reg_2, index, RelocInfo::NONE64);
+ __ Move(arg_reg_2, index, Assembler::RelocInfoNone());
__ CallCFunction(ExternalReference::get_date_field_function(isolate()), 2);
__ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
__ jmp(&done);
__ bind(&runtime);
__ PrepareCallCFunction(2);
__ movp(arg_reg_1, object);
- __ Move(arg_reg_2, index, RelocInfo::NONE64);
+ __ Move(arg_reg_2, index, Assembler::RelocInfoNone());
__ CallCFunction(ExternalReference::get_date_field_function(isolate()), 2);
__ bind(&done);
}
int64_t address = reinterpret_cast<int64_t>(source.address());
if (is_int32(address) && !Serializer::enabled()) {
if (emit_debug_code()) {
- Move(kScratchRegister, kZapValue, RelocInfo::NONE64);
+ Move(kScratchRegister, kZapValue, Assembler::RelocInfoNone());
}
push(Immediate(static_cast<int32_t>(address)));
return;
intptr_t new_space_start =
reinterpret_cast<intptr_t>(isolate()->heap()->NewSpaceStart());
Move(kScratchRegister, reinterpret_cast<Address>(-new_space_start),
- RelocInfo::NONE64);
+ Assembler::RelocInfoNone());
if (scratch.is(object)) {
addq(scratch, kScratchRegister);
} else {
// Clobber clobbered input registers when running with the debug-code flag
// turned on to provoke errors.
if (emit_debug_code()) {
- Move(value, kZapValue, RelocInfo::NONE64);
- Move(dst, kZapValue, RelocInfo::NONE64);
+ Move(value, kZapValue, Assembler::RelocInfoNone());
+ Move(dst, kZapValue, Assembler::RelocInfoNone());
}
}
// Clobber clobbered input registers when running with the debug-code flag
// turned on to provoke errors.
if (emit_debug_code()) {
- Move(value, kZapValue, RelocInfo::NONE64);
- Move(index, kZapValue, RelocInfo::NONE64);
+ Move(value, kZapValue, Assembler::RelocInfoNone());
+ Move(index, kZapValue, Assembler::RelocInfoNone());
}
}
// Clobber clobbered registers when running with the debug-code flag
// turned on to provoke errors.
if (emit_debug_code()) {
- Move(address, kZapValue, RelocInfo::NONE64);
- Move(value, kZapValue, RelocInfo::NONE64);
+ Move(address, kZapValue, Assembler::RelocInfoNone());
+ Move(value, kZapValue, Assembler::RelocInfoNone());
}
}
#endif
push(rax);
- Move(kScratchRegister, reinterpret_cast<Smi*>(p0), RelocInfo::NONE64);
+ Move(kScratchRegister, reinterpret_cast<Smi*>(p0),
+ Assembler::RelocInfoNone());
push(kScratchRegister);
Move(kScratchRegister, Smi::FromInt(static_cast<int>(p1 - p0)),
- RelocInfo::NONE64);
+ Assembler::RelocInfoNone());
push(kScratchRegister);
if (!has_frame_) {
void MacroAssembler::LoadSmiConstant(Register dst, Smi* source) {
if (emit_debug_code()) {
- Move(dst, Smi::FromInt(kSmiConstantRegisterValue), RelocInfo::NONE64);
+ Move(dst, Smi::FromInt(kSmiConstantRegisterValue),
+ Assembler::RelocInfoNone());
cmpq(dst, kSmiConstantRegister);
Assert(equal, kUninitializedKSmiConstantRegister);
}
UNREACHABLE();
return;
default:
- Move(dst, source, RelocInfo::NONE64);
+ Move(dst, source, Assembler::RelocInfoNone());
return;
}
if (negative) {
void MacroAssembler::Call(Address destination, RelocInfo::Mode rmode) {
#ifdef DEBUG
- int end_position = pc_offset() + CallSize(destination, rmode);
+ int end_position = pc_offset() + CallSize(destination);
#endif
Move(kScratchRegister, destination, rmode);
call(kScratchRegister);
void InitializeSmiConstantRegister() {
Move(kSmiConstantRegister, Smi::FromInt(kSmiConstantRegisterValue),
- RelocInfo::NONE64);
+ Assembler::RelocInfoNone());
}
// Conversions between tagged smi values and non-tagged integer values.
TypeFeedbackId ast_id = TypeFeedbackId::None());
// The size of the code generated for different call instructions.
- int CallSize(Address destination, RelocInfo::Mode rmode) {
+ int CallSize(Address destination) {
return kCallSequenceLength;
}
int CallSize(ExternalReference ext);