diff options
Diffstat (limited to 'deps/v8/src/compiler/raw-machine-assembler.h')
-rw-r--r-- | deps/v8/src/compiler/raw-machine-assembler.h | 57 |
1 files changed, 39 insertions, 18 deletions
diff --git a/deps/v8/src/compiler/raw-machine-assembler.h b/deps/v8/src/compiler/raw-machine-assembler.h index b338368024..bc28e6c817 100644 --- a/deps/v8/src/compiler/raw-machine-assembler.h +++ b/deps/v8/src/compiler/raw-machine-assembler.h @@ -285,11 +285,14 @@ class RawMachineAssembler : public GraphBuilder { Node* Int64LessThan(Node* a, Node* b) { return NewNode(machine()->Int64LessThan(), a, b); } + Node* Int64LessThanOrEqual(Node* a, Node* b) { + return NewNode(machine()->Int64LessThanOrEqual(), a, b); + } Node* Uint64LessThan(Node* a, Node* b) { return NewNode(machine()->Uint64LessThan(), a, b); } - Node* Int64LessThanOrEqual(Node* a, Node* b) { - return NewNode(machine()->Int64LessThanOrEqual(), a, b); + Node* Uint64LessThanOrEqual(Node* a, Node* b) { + return NewNode(machine()->Uint64LessThanOrEqual(), a, b); } Node* Int64GreaterThan(Node* a, Node* b) { return Int64LessThan(b, a); } Node* Int64GreaterThanOrEqual(Node* a, Node* b) { @@ -302,15 +305,6 @@ class RawMachineAssembler : public GraphBuilder { return NewNode(machine()->Uint64Mod(), a, b); } - // TODO(turbofan): What is this used for? - Node* ConvertIntPtrToInt32(Node* a) { - return kPointerSize == 8 ? NewNode(machine()->TruncateInt64ToInt32(), a) - : a; - } - Node* ConvertInt32ToIntPtr(Node* a) { - return kPointerSize == 8 ? NewNode(machine()->ChangeInt32ToInt64(), a) : a; - } - #define INTPTR_BINOP(prefix, name) \ Node* IntPtr##name(Node* a, Node* b) { \ return kPointerSize == 8 ? prefix##64##name(a, b) \ @@ -418,20 +412,20 @@ class RawMachineAssembler : public GraphBuilder { Node* TruncateFloat64ToFloat32(Node* a) { return NewNode(machine()->TruncateFloat64ToFloat32(), a); } - Node* TruncateFloat64ToInt32(Node* a) { - return NewNode(machine()->TruncateFloat64ToInt32(), a); + Node* TruncateFloat64ToInt32(TruncationMode mode, Node* a) { + return NewNode(machine()->TruncateFloat64ToInt32(mode), a); } Node* TruncateInt64ToInt32(Node* a) { return NewNode(machine()->TruncateInt64ToInt32(), a); } Node* Float64RoundDown(Node* a) { - return NewNode(machine()->Float64RoundDown(), a); + return NewNode(machine()->Float64RoundDown().op(), a); } Node* Float64RoundTruncate(Node* a) { - return NewNode(machine()->Float64RoundTruncate(), a); + return NewNode(machine()->Float64RoundTruncate().op(), a); } Node* Float64RoundTiesAway(Node* a) { - return NewNode(machine()->Float64RoundTiesAway(), a); + return NewNode(machine()->Float64RoundTiesAway().op(), a); } // Float64 bit operations. @@ -450,12 +444,23 @@ class RawMachineAssembler : public GraphBuilder { // Stack operations. Node* LoadStackPointer() { return NewNode(machine()->LoadStackPointer()); } + Node* LoadFramePointer() { return NewNode(machine()->LoadFramePointer()); } // Parameters. Node* Parameter(size_t index); + // Pointer utilities. + Node* LoadFromPointer(void* address, MachineType rep, int32_t offset = 0) { + return Load(rep, PointerConstant(address), Int32Constant(offset)); + } + void StoreToPointer(void* address, MachineType rep, Node* node) { + Store(rep, PointerConstant(address), node); + } + Node* StringConstant(const char* string) { + return HeapConstant(isolate()->factory()->InternalizeUtf8String(string)); + } + // Control flow. - Label* Exit(); void Goto(Label* label); void Branch(Node* condition, Label* true_val, Label* false_val); void Switch(Node* index, Label* default_label, int32_t* case_values, @@ -469,6 +474,23 @@ class RawMachineAssembler : public GraphBuilder { // Call to a runtime function with zero parameters. Node* CallRuntime1(Runtime::FunctionId function, Node* arg0, Node* context, Node* frame_state); + // Call to a C function with zero parameters. + Node* CallCFunction0(MachineType return_type, Node* function); + // Call to a C function with one parameter. + Node* CallCFunction1(MachineType return_type, MachineType arg0_type, + Node* function, Node* arg0); + // Call to a C function with two parameters. + Node* CallCFunction2(MachineType return_type, MachineType arg0_type, + MachineType arg1_type, Node* function, Node* arg0, + Node* arg1); + // Call to a C function with eight parameters. + Node* CallCFunction8(MachineType return_type, MachineType arg0_type, + MachineType arg1_type, MachineType arg2_type, + MachineType arg3_type, MachineType arg4_type, + MachineType arg5_type, MachineType arg6_type, + MachineType arg7_type, Node* function, Node* arg0, + Node* arg1, Node* arg2, Node* arg3, Node* arg4, + Node* arg5, Node* arg6, Node* arg7); void Return(Node* value); void Bind(Label* label); void Deoptimize(Node* state); @@ -509,7 +531,6 @@ class RawMachineAssembler : public GraphBuilder { const MachineSignature* machine_sig_; CallDescriptor* call_descriptor_; Node** parameters_; - Label exit_label_; BasicBlock* current_block_; DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler); |