40 using namespace v8::internal;
47 bool inline_fastpath) {
55 MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size));
56 DoubleToIStub stub(source_reg, destination_reg, 0,
true, inline_fastpath);
58 byte* start = stub.GetCode(isolate)->instruction_start();
61 __ SetStackPointer(csp);
62 __ PushCalleeSavedRegisters();
64 __ SetStackPointer(jssp);
68 __ Mov(source_reg, jssp);
77 if (!reg.
is(destination_reg)) {
88 if (inline_fastpath) {
90 __ TryConvertDoubleToInt64(destination_reg,
d0, &done);
91 if (destination_reg.
is(source_reg)) {
93 __ add(source_reg, jssp,
Operand(source_reg_offset));
96 __ Call(start, RelocInfo::EXTERNAL_REFERENCE);
102 for (--reg_num; reg_num >= 0; --reg_num) {
104 if (!reg.
is(destination_reg)) {
107 __ Assert(
eq, kRegisterWasClobbered);
113 if (!destination_reg.
is(x0))
114 __ Mov(x0, destination_reg);
118 __ SetStackPointer(csp);
119 __ PopCalleeSavedRegisters();
125 CPU::FlushICache(buffer, actual_size);
126 return (reinterpret_cast<ConvertDToIFunc>(
127 reinterpret_cast<intptr_t>(buffer)));
134 return reinterpret_cast<Isolate*
>((*context)->GetIsolate());
141 Simulator::CallArgument args[] = {
142 Simulator::CallArgument(from),
143 Simulator::CallArgument::End()
145 return Simulator::current(Isolate::Current())->CallInt64(
148 return (*func)(from);
156 Isolate* isolate = GetIsolateFrom(&context);
166 Register source_registers[] = {jssp, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9,
167 x10, x11, x12, x13, x14, x15, x18, x19, x20,
169 Register dest_registers[] = {x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11,
170 x12, x13, x14, x15, x18, x19, x20, x21, x22, x23,
173 for (
size_t s = 0; s <
sizeof(source_registers) /
sizeof(
Register); s++) {
174 for (
size_t d = 0; d <
sizeof(dest_registers) /
sizeof(
Register); d++) {
void RunAllTruncationTests(ConvertDToIFunc func)
const LowDwVfpRegister d0
static int NumAllocatableRegisters()
static const int kMinimalBufferSize
ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate *isolate, Register source_reg, Register destination_reg, bool inline_fastpath)
int32_t RunGeneratedCodeCallWrapper(ConvertDToIFunc func, double from)
void GetCode(CodeDesc *desc)
static Register from_code(int code)
bool is(Register reg) const
static void InitializeVM()
static void * Allocate(const size_t requested, size_t *allocated, bool is_executable)
int STDCALL ConvertDToICVersion(double d)
void Queue(const CPURegister &rt)
ConvertDToIFuncType * ConvertDToIFunc