desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
F2 f = FUNCTION_CAST<F2>(code->entry());
int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0));
- ::printf("f() = %d\n", res);
CHECK_EQ(static_cast<int32_t>(0xabc), res);
}
desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
F1 f = FUNCTION_CAST<F1>(code->entry());
int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 50, 0, 0, 0, 0));
- ::printf("f() = %d\n", res);
CHECK_EQ(1275, res);
}
desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
F2 f = FUNCTION_CAST<F2>(code->entry());
int res = reinterpret_cast<int>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0));
- ::printf("f() = %d\n", res);
CHECK_EQ(static_cast<int32_t>(0x31415926), res);
}
F2 f = FUNCTION_CAST<F2>(code->entry());
int64_t res =
reinterpret_cast<int64_t>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0));
- ::printf("f() = %ld\n", res);
CHECK_EQ(0xabcL, res);
}
F1 f = FUNCTION_CAST<F1>(code->entry());
int64_t res =
reinterpret_cast<int64_t>(CALL_GENERATED_CODE(f, 50, 0, 0, 0, 0));
- ::printf("f() = %ld\n", res);
CHECK_EQ(1275L, res);
}
F2 f = FUNCTION_CAST<F2>(code->entry());
int64_t res =
reinterpret_cast<int64_t>(CALL_GENERATED_CODE(f, 0xab0, 0xc, 0, 0, 0));
- ::printf("f() = %ld\n", res);
CHECK_EQ(0x31415926L, res);
}