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();
72 if (!source_reg.
is(
sp)) {
73 __ mov(source_reg,
sp);
81 if (!reg.
is(destination_reg)) {
92 if (inline_fastpath) {
94 __ TryInlineTruncateDoubleToI(destination_reg,
d0, &done);
95 if (destination_reg.
is(source_reg) && !source_reg.
is(
sp)) {
100 __ Call(start, RelocInfo::EXTERNAL_REFERENCE);
106 for (--reg_num; reg_num >= 0; --reg_num) {
108 if (!reg.
is(destination_reg)) {
111 __ Assert(
eq, kRegisterWasClobbered);
118 if (!destination_reg.
is(
r0))
119 __ mov(
r0, destination_reg);
129 CPU::FlushICache(buffer, actual_size);
130 return (reinterpret_cast<ConvertDToIFunc>(
131 reinterpret_cast<intptr_t>(buffer)));
138 return reinterpret_cast<Isolate*
>((*context)->GetIsolate());
145 return CALL_GENERATED_FP_INT(func, from, 0);
147 return (*func)(from);
155 Isolate* isolate = GetIsolateFrom(&context);
168 for (
size_t s = 0; s <
sizeof(source_registers) /
sizeof(
Register); s++) {
169 for (
size_t d = 0; d <
sizeof(dest_registers) /
sizeof(
Register); d++) {
void RunAllTruncationTests(ConvertDToIFunc func)
const LowDwVfpRegister d0
ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate *isolate, Register source_reg, Register destination_reg, bool inline_fastpath)
static int NumAllocatableRegisters()
static const int kMinimalBufferSize
int32_t RunGeneratedCodeCallWrapper(ConvertDToIFunc func, double from)
bool use_eabi_hardfloat()
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)
ConvertDToIFuncType * ConvertDToIFunc