last_lazy_deopt_pc_ = masm()->pc_offset();
}
-#if !V8_TURBOFAN_BACKEND
-
-void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
- UNIMPLEMENTED();
-}
-
-
-void CodeGenerator::AssembleArchBranch(Instruction* instr,
- BranchInfo* branch) {
- UNIMPLEMENTED();
-}
-
-
-void CodeGenerator::AssembleArchBoolean(Instruction* instr,
- FlagsCondition condition) {
- UNIMPLEMENTED();
-}
-
-
-void CodeGenerator::AssembleArchJump(RpoNumber target) { UNIMPLEMENTED(); }
-
-
-void CodeGenerator::AssembleDeoptimizerCall(
- int deoptimization_id, Deoptimizer::BailoutType bailout_type) {
- UNIMPLEMENTED();
-}
-
-
-void CodeGenerator::AssemblePrologue() { UNIMPLEMENTED(); }
-
-
-void CodeGenerator::AssembleReturn() { UNIMPLEMENTED(); }
-
-
-void CodeGenerator::AssembleMove(InstructionOperand* source,
- InstructionOperand* destination) {
- UNIMPLEMENTED();
-}
-
-
-void CodeGenerator::AssembleSwap(InstructionOperand* source,
- InstructionOperand* destination) {
- UNIMPLEMENTED();
-}
-
-
-void CodeGenerator::AddNopForSmiCodeInlining() { UNIMPLEMENTED(); }
-
-
-void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) {
- UNIMPLEMENTED();
-}
-
-#endif // !V8_TURBOFAN_BACKEND
-
OutOfLineCode::OutOfLineCode(CodeGenerator* gen)
: masm_(gen->masm()), next_(gen->ools_) {
}
-#if V8_TURBOFAN_BACKEND
-
void InstructionSelector::VisitLoadStackPointer(Node* node) {
OperandGenerator g(this);
Emit(kArchStackPointer, g.DefineAsRegister(node));
}
-#endif // V8_TURBOFAN_BACKEND
-
// 32 bit targets do not implement the following instructions.
-#if !V8_TURBOFAN_BACKEND_64
+#if V8_TARGET_ARCH_32_BIT
void InstructionSelector::VisitWord64And(Node* node) { UNIMPLEMENTED(); }
UNIMPLEMENTED();
}
-#endif // V8_TARGET_ARCH_32_BIT && !V8_TARGET_ARCH_X64 && V8_TURBOFAN_BACKEND
+#endif // V8_TARGET_ARCH_32_BIT
void InstructionSelector::VisitFinish(Node* node) {
DCHECK(value_index == descriptor->GetSize());
}
-
-#if !V8_TURBOFAN_BACKEND
-
-#define DECLARE_UNIMPLEMENTED_SELECTOR(x) \
- void InstructionSelector::Visit##x(Node* node) { UNIMPLEMENTED(); }
-MACHINE_OP_LIST(DECLARE_UNIMPLEMENTED_SELECTOR)
-#undef DECLARE_UNIMPLEMENTED_SELECTOR
-
-
-void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
- UNIMPLEMENTED();
-}
-
-
-void InstructionSelector::VisitTailCall(Node* node) { UNIMPLEMENTED(); }
-
-
-void InstructionSelector::VisitBranch(Node* branch, BasicBlock* tbranch,
- BasicBlock* fbranch) {
- UNIMPLEMENTED();
-}
-
-
-void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) {
- UNIMPLEMENTED();
-}
-
-
-// static
-MachineOperatorBuilder::Flags
-InstructionSelector::SupportedMachineOperatorFlags() {
- return MachineOperatorBuilder::Flag::kNoFlags;
-}
-
-#endif // !V8_TURBOFAN_BACKEND
-
} // namespace compiler
} // namespace internal
} // namespace v8
GraphReplayPrinter::PrintReplay(data.graph());
}
- // Bailout here in case target architecture is not supported.
- if (!SupportedTarget()) return Handle<Code>::null();
-
base::SmartPointer<Typer> typer;
if (info()->is_typing_enabled()) {
// Type the graph.
PipelineData* data = this->data_;
DCHECK_NOT_NULL(data->graph());
- CHECK(SupportedBackend());
if (data->schedule() == nullptr) Run<ComputeSchedulePhase>();
TraceSchedule(data->info(), data->schedule());
InstructionSequence* sequence,
bool run_verifier);
- static inline bool SupportedBackend() { return V8_TURBOFAN_BACKEND != 0; }
- static inline bool SupportedTarget() { return V8_TURBOFAN_TARGET != 0; }
-
private:
static Handle<Code> GenerateCodeForTesting(CompilationInfo* info,
CallDescriptor* call_descriptor,
# define V8_INFINITY INFINITY
#endif
-#if V8_TARGET_ARCH_IA32 || (V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_32_BIT) || \
- V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
- V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_X87
-
-#define V8_TURBOFAN_BACKEND 1
-#if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS64 || \
- V8_TARGET_ARCH_PPC64
-// 64-bit TurboFan backends support 64-bit integer arithmetic.
-#define V8_TURBOFAN_BACKEND_64 1
-#else
-#define V8_TURBOFAN_BACKEND_64 0
-#endif
-
-#else
-#define V8_TURBOFAN_BACKEND 0
-#endif
-
-#if V8_TURBOFAN_BACKEND
-#define V8_TURBOFAN_TARGET 1
-#else
-#define V8_TURBOFAN_TARGET 0
-#endif
-
namespace v8 {
namespace base {
}
-#if V8_TURBOFAN_TARGET
-
TEST(ParametersEqual) {
RawMachineAssemblerTester<int32_t> m(kMachInt32, kMachInt32);
Node* p1 = m.Parameter(1);
FOR_FLOAT64_INPUTS(i) { CheckDoubleEq(*i, bt.call(-11.25, *i)); }
}
}
-
-#endif // V8_TURBOFAN_TARGET
#include "src/rewriter.h"
#include "src/scopes.h"
-#define USE_CRANKSHAFT 0
-
namespace v8 {
namespace internal {
namespace compiler {
Handle<JSFunction> Compile(Handle<JSFunction> function) {
// TODO(titzer): make this method private.
-#if V8_TURBOFAN_TARGET
Zone zone;
ParseInfo parse_info(&zone, function);
CompilationInfo info(&parse_info);
CHECK(!code.is_null());
info.context()->native_context()->AddOptimizedCode(*code);
function->ReplaceCode(*code);
-#elif USE_CRANKSHAFT
- Handle<Code> unoptimized = Handle<Code>(function->code());
- Handle<Code> code = Compiler::GetOptimizedCode(function, unoptimized,
- Compiler::NOT_CONCURRENT);
- CHECK(!code.is_null());
-#if ENABLE_DISASSEMBLER
- if (FLAG_print_opt_code) {
- CodeTracer::Scope tracing_scope(isolate->GetCodeTracer());
- code->Disassemble("test code", tracing_scope.file());
- }
-#endif
- function->ReplaceCode(*code);
-#endif
return function;
}
// Compile the given machine graph instead of the source of the function
// and replace the JSFunction's code with the result.
Handle<JSFunction> CompileGraph(Graph* graph) {
- CHECK(Pipeline::SupportedTarget());
Zone zone;
ParseInfo parse_info(&zone, function);
CompilationInfo info(&parse_info);
}
virtual byte* Generate() {
- if (!Pipeline::SupportedBackend()) return NULL;
if (code_.is_null()) {
Zone* zone = graph()->zone();
CallDescriptor* desc =
#include "test/cctest/cctest.h"
#include "test/cctest/compiler/codegen-tester.h"
-#if V8_TURBOFAN_TARGET
-
using namespace v8::internal;
using namespace v8::internal::compiler;
m.Expect(arraysize(expected), expected);
}
}
-
-#endif // V8_TURBOFAN_TARGET
#include "test/cctest/compiler/codegen-tester.h"
#include "test/cctest/compiler/value-helper.h"
-#if V8_TURBOFAN_TARGET
-
using namespace v8::internal;
using namespace v8::internal::compiler;
}
}
}
-#endif // V8_TURBOFAN_TARGET
ChangesLoweringTester<int32_t> t(kMachAnyTagged);
t.BuildAndLower(t.simplified()->ChangeTaggedToInt32());
- if (Pipeline::SupportedTarget()) {
FOR_INT32_INPUTS(i) {
int32_t input = *i;
int32_t result = t.Call(*number);
CHECK_EQ(input, result);
}
- }
}
}
ChangesLoweringTester<uint32_t> t(kMachAnyTagged);
t.BuildAndLower(t.simplified()->ChangeTaggedToUint32());
- if (Pipeline::SupportedTarget()) {
FOR_UINT32_INPUTS(i) {
uint32_t input = *i;
CHECK_EQ(static_cast<int32_t>(input), static_cast<int32_t>(result));
}
}
- }
}
t.machine()->Store(StoreRepresentation(kMachFloat64, kNoWriteBarrier)),
&result);
- if (Pipeline::SupportedTarget()) {
+ {
FOR_INT32_INPUTS(i) {
int32_t input = *i;
}
}
- if (Pipeline::SupportedTarget()) {
+ {
FOR_FLOAT64_INPUTS(i) {
double input = *i;
{
ChangesLoweringTester<int32_t> t(kMachAnyTagged);
t.BuildAndLower(t.simplified()->ChangeBoolToBit());
- if (Pipeline::SupportedTarget()) {
+ {
Object* true_obj = t.heap()->true_value();
int32_t result = t.Call(true_obj);
CHECK_EQ(1, result);
}
- if (Pipeline::SupportedTarget()) {
+ {
Object* false_obj = t.heap()->false_value();
int32_t result = t.Call(false_obj);
CHECK_EQ(0, result);
ChangesLoweringTester<Object*> t(kMachInt32);
t.BuildAndLower(t.simplified()->ChangeBitToBool());
- if (Pipeline::SupportedTarget()) {
+ {
Object* result = t.Call(1);
Object* true_obj = t.heap()->true_value();
CHECK_EQ(true_obj, result);
}
- if (Pipeline::SupportedTarget()) {
+ {
Object* result = t.Call(0);
Object* false_obj = t.heap()->false_value();
CHECK_EQ(false_obj, result);
}
}
-
-
-#if V8_TURBOFAN_BACKEND
-// TODO(titzer): disabled on ARM
-
-TEST(RunChangeInt32ToTaggedSmi) {
- ChangesLoweringTester<Object*> t;
- int32_t input;
- t.BuildLoadAndLower(t.simplified()->ChangeInt32ToTagged(),
- t.machine()->Load(kMachInt32), &input);
-
- if (Pipeline::SupportedTarget()) {
- FOR_INT32_INPUTS(i) {
- input = *i;
- if (!Smi::IsValid(input)) continue;
- Object* result = t.Call();
- t.CheckNumber(static_cast<double>(input), result);
- }
- }
-}
-
-
-TEST(RunChangeUint32ToTaggedSmi) {
- ChangesLoweringTester<Object*> t;
- uint32_t input;
- t.BuildLoadAndLower(t.simplified()->ChangeUint32ToTagged(),
- t.machine()->Load(kMachUint32), &input);
-
- if (Pipeline::SupportedTarget()) {
- FOR_UINT32_INPUTS(i) {
- input = *i;
- if (input > static_cast<uint32_t>(Smi::kMaxValue)) continue;
- Object* result = t.Call();
- double expected = static_cast<double>(input);
- t.CheckNumber(expected, result);
- }
- }
-}
-
-
-TEST(RunChangeInt32ToTagged) {
- ChangesLoweringTester<Object*> t;
- int32_t input;
- t.BuildLoadAndLower(t.simplified()->ChangeInt32ToTagged(),
- t.machine()->Load(kMachInt32), &input);
-
- if (Pipeline::SupportedTarget()) {
- for (int m = 0; m < 3; m++) { // Try 3 GC modes.
- FOR_INT32_INPUTS(i) {
- if (m == 0) CcTest::heap()->EnableInlineAllocation();
- if (m == 1) CcTest::heap()->DisableInlineAllocation();
- if (m == 2) SimulateFullSpace(CcTest::heap()->new_space());
-
- input = *i;
- Object* result = t.CallWithPotentialGC<Object>();
- t.CheckNumber(static_cast<double>(input), result);
- }
- }
- }
-}
-
-
-TEST(RunChangeUint32ToTagged) {
- ChangesLoweringTester<Object*> t;
- uint32_t input;
- t.BuildLoadAndLower(t.simplified()->ChangeUint32ToTagged(),
- t.machine()->Load(kMachUint32), &input);
-
- if (Pipeline::SupportedTarget()) {
- for (int m = 0; m < 3; m++) { // Try 3 GC modes.
- FOR_UINT32_INPUTS(i) {
- if (m == 0) CcTest::heap()->EnableInlineAllocation();
- if (m == 1) CcTest::heap()->DisableInlineAllocation();
- if (m == 2) SimulateFullSpace(CcTest::heap()->new_space());
-
- input = *i;
- Object* result = t.CallWithPotentialGC<Object>();
- double expected = static_cast<double>(input);
- t.CheckNumber(expected, result);
- }
- }
- }
-}
-
-
-TEST(RunChangeFloat64ToTagged) {
- ChangesLoweringTester<Object*> t;
- double input;
- t.BuildLoadAndLower(t.simplified()->ChangeFloat64ToTagged(),
- t.machine()->Load(kMachFloat64), &input);
-
- if (Pipeline::SupportedTarget()) {
- for (int m = 0; m < 3; m++) { // Try 3 GC modes.
- FOR_FLOAT64_INPUTS(i) {
- if (m == 0) CcTest::heap()->EnableInlineAllocation();
- if (m == 1) CcTest::heap()->DisableInlineAllocation();
- if (m == 2) SimulateFullSpace(CcTest::heap()->new_space());
-
- input = *i;
- Object* result = t.CallWithPotentialGC<Object>();
- t.CheckNumber(input, result);
- }
- }
- }
-}
-
-#endif // V8_TURBOFAN_BACKEND
#include "src/compiler/schedule.h"
#include "test/cctest/cctest.h"
-#if V8_TURBOFAN_TARGET
-
using namespace v8::internal;
using namespace v8::internal::compiler;
TEST(TestLinkageStubCall) {
// TODO(titzer): test linkage creation for outgoing stub calls.
}
-
-#endif // V8_TURBOFAN_TARGET
CompilationInfo info(&parse_info);
Pipeline pipeline(&info);
-#if V8_TURBOFAN_TARGET
Handle<Code> code = pipeline.GenerateCode();
- CHECK(Pipeline::SupportedTarget());
CHECK(!code.is_null());
-#else
- USE(pipeline);
-#endif
}
using namespace v8::internal;
using namespace v8::internal::compiler;
-#if V8_TURBOFAN_TARGET
-
static void IsOptimized(const v8::FunctionCallbackInfo<v8::Value>& args) {
JavaScriptFrameIterator it(CcTest::i_isolate());
JavaScriptFrame* frame = it.frame();
#endif
}
-#endif
TEST(DeoptTrivial) {
FLAG_allow_natives_syntax = true;
#include "test/cctest/compiler/function-tester.h"
-#if V8_TURBOFAN_TARGET
-
using namespace v8::internal;
using namespace v8::internal::compiler;
InstallAssertInlineCountHelper(CcTest::isolate());
T.CheckCall(T.Val(42), T.Val(1));
}
-
-#endif // V8_TURBOFAN_TARGET
#include "test/cctest/compiler/codegen-tester.h"
#include "test/cctest/compiler/value-helper.h"
-#if V8_TURBOFAN_TARGET
-
using namespace v8::base;
using namespace v8::internal;
using namespace v8::internal::compiler;
}
-#if V8_TURBOFAN_BACKEND_64
+#if V8_TARGET_ARCH_64_BIT
static Node* Int64Input(RawMachineAssemblerTester<int64_t>* m, int index) {
switch (index) {
case 0:
// TODO(titzer): add tests that run 64-bit integer operations.
-#endif // V8_TURBOFAN_BACKEND_64
+#endif // V8_TARGET_ARCH_64_BIT
TEST(RunGoto) {
}
#endif // USE_SIMULATOR
-
-#endif // V8_TURBOFAN_TARGET
#include "src/parser.h"
#include "test/cctest/compiler/function-tester.h"
-#if V8_TURBOFAN_TARGET
-
using namespace v8::internal;
using namespace v8::internal::compiler;
Handle<Object> result = ft.Call(leftArg, rightArg).ToHandleChecked();
CHECK(String::Equals(ft.Val("linksrechts"), Handle<String>::cast(result)));
}
-
-#endif // V8_TURBOFAN_TARGET
t.LowerAllNodes();
t.GenerateCode();
- if (Pipeline::SupportedTarget()) {
FOR_FLOAT64_INPUTS(i) {
input = *i;
int32_t expected = DoubleToInt32(*i);
t.Call();
CHECK_EQ(expected, result);
}
- }
}
t.LowerAllNodes();
t.GenerateCode();
- if (Pipeline::SupportedTarget()) {
FOR_FLOAT64_INPUTS(i) {
input = *i;
uint32_t expected = DoubleToUint32(*i);
CHECK_EQ(static_cast<int32_t>(expected), static_cast<int32_t>(result));
}
}
-}
// Create a simple JSObject with a unique map.
t.LowerAllNodes();
t.GenerateCode();
- if (Pipeline::SupportedTarget()) {
- Handle<JSObject> src = TestObject();
- Handle<Map> src_map(src->map());
- Object* result = t.Call(*src); // TODO(titzer): raw pointers in call
- CHECK_EQ(*src_map, result);
- }
+ Handle<JSObject> src = TestObject();
+ Handle<Map> src_map(src->map());
+ Object* result = t.Call(*src); // TODO(titzer): raw pointers in call
+ CHECK_EQ(*src_map, result);
}
t.LowerAllNodes();
t.GenerateCode();
- if (Pipeline::SupportedTarget()) {
Handle<JSObject> src = TestObject();
Handle<Map> src_map(src->map());
Handle<JSObject> dst = TestObject();
t.Call(*src_map, *dst); // TODO(titzer): raw pointers in call
CHECK(*src_map == dst->map());
}
-}
TEST(RunLoadProperties) {
t.LowerAllNodes();
t.GenerateCode();
- if (Pipeline::SupportedTarget()) {
Handle<JSObject> src = TestObject();
Handle<FixedArray> src_props(src->properties());
Object* result = t.Call(*src); // TODO(titzer): raw pointers in call
CHECK_EQ(*src_props, result);
- }
}
t.LowerAllNodes();
t.GenerateCode();
- if (Pipeline::SupportedTarget()) {
Handle<JSObject> src = TestObject();
Handle<Map> src_map(src->map());
Handle<JSObject> dst = TestObject();
CHECK(result->IsMap());
CHECK_EQ(*src_map, result);
CHECK(*src_map == dst->map());
- }
}
t.LowerAllNodes();
t.GenerateCode();
- if (Pipeline::SupportedTarget()) {
Handle<FixedArray> array = t.factory()->NewFixedArray(2);
Handle<JSObject> src = TestObject();
Handle<JSObject> dst = TestObject();
CHECK_EQ(*src, result);
CHECK_EQ(*src, array->get(0));
CHECK_EQ(*src, array->get(1));
- }
}
t.LowerAllNodes();
t.GenerateCode();
- if (Pipeline::SupportedTarget()) {
Handle<JSArrayBuffer> array = t.factory()->NewJSArrayBuffer();
Runtime::SetupArrayBufferAllocatingData(t.isolate(), array, array_length);
uint8_t* data = reinterpret_cast<uint8_t*>(array->backing_store());
CHECK_EQ(data[i], expected);
}
}
-}
TEST(RunLoadFieldFromUntaggedBase) {
t.Return(load);
t.LowerAllNodes();
- if (!Pipeline::SupportedTarget()) continue;
-
for (int j = -5; j <= 5; j++) {
Smi* expected = Smi::FromInt(j);
smis[i] = expected;
t.Return(p0);
t.LowerAllNodes();
- if (!Pipeline::SupportedTarget()) continue;
-
for (int j = -5; j <= 5; j++) {
Smi* expected = Smi::FromInt(j);
smis[i] = Smi::FromInt(-100);
t.Return(load);
t.LowerAllNodes();
- if (!Pipeline::SupportedTarget()) continue;
-
for (int k = -5; k <= 5; k++) {
Smi* expected = Smi::FromInt(k);
smis[i + j] = expected;
t.Return(p0);
t.LowerAllNodes();
- if (!Pipeline::SupportedTarget()) continue;
-
for (int k = -5; k <= 5; k++) {
Smi* expected = Smi::FromInt(k);
smis[i + j] = Smi::FromInt(-100);
t.LowerAllNodes();
t.GenerateCode();
- if (Pipeline::SupportedTarget()) {
Object* result = t.Call();
CHECK_EQ(t.isolate()->heap()->true_value(), result);
- }
}
// Create and run code that copies the field in either {untagged_array}
t.LowerAllNodes();
t.GenerateCode();
- if (Pipeline::SupportedTarget()) {
Object* result = t.Call();
CHECK_EQ(t.isolate()->heap()->true_value(), result);
- }
}
// Create and run code that copies the elements from {this} to {that}.
t.LowerAllNodes();
t.GenerateCode();
- if (Pipeline::SupportedTarget()) {
Object* result = t.Call();
CHECK_EQ(t.isolate()->heap()->true_value(), result);
- }
#endif
}
} else {
a.RunCopyElement(i, i + 1); // Test element read/write.
}
- if (Pipeline::SupportedTarget()) { // verify.
for (int j = 0; j < num_elements; j++) {
E expect =
j == (i + 1) ? original_elements[i] : original_elements[j];
CHECK_EQ(expect, a.GetElement(j));
}
- }
}
}
}
AccessTester<E> a(tf == 1, rep, original_elements, num);
AccessTester<E> b(tt == 1, rep, original_elements, num);
a.RunCopyElements(&b);
- if (Pipeline::SupportedTarget()) { // verify.
for (int i = 0; i < num_elements; i++) {
CHECK_EQ(a.GetElement(i), b.GetElement(i));
- }
}
}
}
RunAccessTest<Smi*>(kMachAnyTagged, data, arraysize(data));
}
-#if V8_TURBOFAN_TARGET
+
TEST(RunAllocate) {
PretenureFlag flag[] = {NOT_TENURED, TENURED};
t.LowerAllNodes();
t.GenerateCode();
- if (Pipeline::SupportedTarget()) {
HeapObject* result = t.CallWithPotentialGC<HeapObject>();
CHECK(t.heap()->new_space()->Contains(result) || flag[i] == TENURED);
CHECK(t.heap()->old_space()->Contains(result) || flag[i] == NOT_TENURED);
CHECK(result->IsHeapNumber());
- }
}
}
-#endif
+
// Fills in most of the nodes of the graph in order to make tests shorter.
class TestingGraph : public HandleAndZoneScope, public GraphAndBuilders {
TEST(LowerStringOps_to_call_and_compare) {
- if (Pipeline::SupportedTarget()) {
// These tests need linkage for the calls.
TestingGraph t(Type::String(), Type::String());
IrOpcode::Value compare_eq =
t.CheckLoweringBinop(compare_lt, t.simplified()->StringLessThan());
t.CheckLoweringBinop(compare_le, t.simplified()->StringLessThanOrEqual());
}
-}
void CheckChangeInsertion(IrOpcode::Value expected, MachineType from,
Node* trunc = t.NumberToInt32(div);
t.Return(trunc);
- if (Pipeline::SupportedTarget()) {
t.LowerAllNodesAndLowerChanges();
t.GenerateCode();
int32_t x = 0 - *i;
t.CheckNumberCall(static_cast<double>(x), static_cast<double>(*i));
}
- }
}
Node* trunc = t.NumberToInt32(mul);
t.Return(trunc);
- if (Pipeline::SupportedTarget()) {
t.LowerAllNodesAndLowerChanges();
t.GenerateCode();
t.CheckNumberCall(static_cast<double>(x), static_cast<double>(*i));
}
}
- }
}
Node* trunc = t.NumberToUint32(mul);
t.Return(trunc);
- if (Pipeline::SupportedTarget()) {
t.LowerAllNodesAndLowerChanges();
t.GenerateCode();
FOR_UINT32_INPUTS(i) {
uint32_t x = DoubleToUint32(static_cast<double>(*i) * k);
t.CheckNumberCall(static_cast<double>(x), static_cast<double>(*i));
- }
}
}
}
Node* trunc = t.NumberToUint32(div);
t.Return(trunc);
- if (Pipeline::SupportedTarget()) {
t.LowerAllNodesAndLowerChanges();
t.GenerateCode();
uint32_t x = DoubleToUint32(static_cast<double>(*i / 2.0));
t.CheckNumberCall(static_cast<double>(x), static_cast<double>(*i));
}
- }
}
Node* trunc = t.NumberToInt32(div);
t.Return(trunc);
- if (Pipeline::SupportedTarget()) {
t.LowerAllNodesAndLowerChanges();
t.GenerateCode();
if (*i == INT_MAX) continue; // exclude max int.
int32_t x = DoubleToInt32(static_cast<double>(*i) / k);
t.CheckNumberCall(static_cast<double>(x), static_cast<double>(*i));
- }
}
}
}
Node* trunc = t.NumberToUint32(div);
t.Return(trunc);
- if (Pipeline::SupportedTarget()) {
t.LowerAllNodesAndLowerChanges();
t.GenerateCode();
FOR_UINT32_INPUTS(i) {
uint32_t x = *i / k;
t.CheckNumberCall(static_cast<double>(x), static_cast<double>(*i));
- }
}
}
}
Node* trunc = t.NumberToInt32(mod);
t.Return(trunc);
- if (Pipeline::SupportedTarget()) {
t.LowerAllNodesAndLowerChanges();
t.GenerateCode();
if (*i == INT_MAX) continue; // exclude max int.
int32_t x = DoubleToInt32(std::fmod(static_cast<double>(*i), k));
t.CheckNumberCall(static_cast<double>(x), static_cast<double>(*i));
- }
}
}
}
Node* trunc = t.NumberToUint32(mod);
t.Return(trunc);
- if (Pipeline::SupportedTarget()) {
t.LowerAllNodesAndLowerChanges();
t.GenerateCode();
FOR_UINT32_INPUTS(i) {
uint32_t x = *i % k;
t.CheckNumberCall(static_cast<double>(x), static_cast<double>(*i));
- }
}
}
}
v8::V8::Initialize();
v8::HandleScope scope(CcTest::isolate());
LocalContext context;
-#if V8_TURBOFAN_TARGET
bool should_be_neuterable = !i::FLAG_turbo_asm;
-#else
- bool should_be_neuterable = true;
-#endif
const char* load =
"function Module(stdlib, foreign, heap) {"
" 'use asm';"
// The TARGET_TEST(Case, Name) macro works just like
// TEST(Case, Name), except that the test is disabled
// if the platform is not a supported TurboFan target.
-#if V8_TURBOFAN_TARGET
#define TARGET_TEST(Case, Name) TEST(Case, Name)
-#else
-#define TARGET_TEST(Case, Name) TEST(Case, DISABLED_##Name)
-#endif
// The TARGET_TEST_F(Case, Name) macro works just like
// TEST_F(Case, Name), except that the test is disabled
// if the platform is not a supported TurboFan target.
-#if V8_TURBOFAN_TARGET
#define TARGET_TEST_F(Case, Name) TEST_F(Case, Name)
-#else
-#define TARGET_TEST_F(Case, Name) TEST_F(Case, DISABLED_##Name)
-#endif
// The TARGET_TEST_P(Case, Name) macro works just like
// TEST_P(Case, Name), except that the test is disabled
// if the platform is not a supported TurboFan target.
-#if V8_TURBOFAN_TARGET
#define TARGET_TEST_P(Case, Name) TEST_P(Case, Name)
-#else
-#define TARGET_TEST_P(Case, Name) TEST_P(Case, DISABLED_##Name)
-#endif
// The TARGET_TYPED_TEST(Case, Name) macro works just like
// TYPED_TEST(Case, Name), except that the test is disabled
// if the platform is not a supported TurboFan target.
-#if V8_TURBOFAN_TARGET
#define TARGET_TYPED_TEST(Case, Name) TYPED_TEST(Case, Name)
-#else
-#define TARGET_TYPED_TEST(Case, Name) TYPED_TEST(Case, DISABLED_##Name)
-#endif
} // namespace compiler
} // namespace internal
}
}
-#if V8_TURBOFAN_TARGET
// -----------------------------------------------------------------------------
// JSAdd
input0, input1, input2, _, context, frame_state, effect, control));
}
-#endif // V8_TURBOFAN_TARGET
-
// -----------------------------------------------------------------------------
// JSCreateWithContext