| Index: src/x87/macro-assembler-x87.h
|
| diff --git a/src/x87/macro-assembler-x87.h b/src/x87/macro-assembler-x87.h
|
| index 26a721a16f40978b4929107c09cd416307f3d57e..97dbf532dd1403d417d1cb37a8dad2a44c0aadf5 100644
|
| --- a/src/x87/macro-assembler-x87.h
|
| +++ b/src/x87/macro-assembler-x87.h
|
| @@ -71,6 +71,16 @@ class MacroAssembler: public Assembler {
|
| void Load(Register dst, const Operand& src, Representation r);
|
| void Store(Register src, const Operand& dst, Representation r);
|
|
|
| + // Load a register with a long value as efficiently as possible.
|
| + void Set(Register dst, int32_t x) {
|
| + if (x == 0) {
|
| + xor_(dst, dst);
|
| + } else {
|
| + mov(dst, Immediate(x));
|
| + }
|
| + }
|
| + void Set(const Operand& dst, int32_t x) { mov(dst, Immediate(x)); }
|
| +
|
| // Operations on roots in the root-array.
|
| void LoadRoot(Register destination, Heap::RootListIndex index);
|
| void StoreRoot(Register source, Register scratch, Heap::RootListIndex index);
|
| @@ -79,6 +89,22 @@ class MacroAssembler: public Assembler {
|
| // and not in new space).
|
| void CompareRoot(Register with, Heap::RootListIndex index);
|
| void CompareRoot(const Operand& with, Heap::RootListIndex index);
|
| + void PushRoot(Heap::RootListIndex index);
|
| +
|
| + // Compare the object in a register to a value and jump if they are equal.
|
| + void JumpIfRoot(Register with, Heap::RootListIndex index, Label* if_equal,
|
| + Label::Distance if_equal_distance = Label::kNear) {
|
| + CompareRoot(with, index);
|
| + j(equal, if_equal, if_equal_distance);
|
| + }
|
| +
|
| + // Compare the object in a register to a value and jump if they are not equal.
|
| + void JumpIfNotRoot(Register with, Heap::RootListIndex index,
|
| + Label* if_not_equal,
|
| + Label::Distance if_not_equal_distance = Label::kNear) {
|
| + CompareRoot(with, index);
|
| + j(not_equal, if_not_equal, if_not_equal_distance);
|
| + }
|
|
|
| // ---------------------------------------------------------------------------
|
| // GC Support
|
| @@ -240,6 +266,9 @@ class MacroAssembler: public Assembler {
|
| // Find the function context up the context chain.
|
| void LoadContext(Register dst, int context_chain_length);
|
|
|
| + // Load the global proxy from the current context.
|
| + void LoadGlobalProxy(Register dst);
|
| +
|
| // Conditionally load the cached Array transitioned map of type
|
| // transitioned_kind from the native context if the map in register
|
| // map_in_out is the cached Array map in the native context of
|
| @@ -530,6 +559,9 @@ class MacroAssembler: public Assembler {
|
| // Abort execution if argument is not a name, enabled via --debug-code.
|
| void AssertName(Register object);
|
|
|
| + // Abort execution if argument is not a JSFunction, enabled via --debug-code.
|
| + void AssertFunction(Register object);
|
| +
|
| // Abort execution if argument is not undefined or an AllocationSite, enabled
|
| // via --debug-code.
|
| void AssertUndefinedOrAllocationSite(Register object);
|
| @@ -766,8 +798,14 @@ class MacroAssembler: public Assembler {
|
| void Drop(int element_count);
|
|
|
| void Call(Label* target) { call(target); }
|
| + void Call(Handle<Code> target, RelocInfo::Mode rmode) { call(target, rmode); }
|
| + void Jump(Handle<Code> target, RelocInfo::Mode rmode) { jmp(target, rmode); }
|
| void Push(Register src) { push(src); }
|
| + void Push(const Operand& src) { push(src); }
|
| + void Push(Immediate value) { push(value); }
|
| void Pop(Register dst) { pop(dst); }
|
| + void PushReturnAddressFrom(Register src) { push(src); }
|
| + void PopReturnAddressTo(Register dst) { pop(dst); }
|
|
|
| void Lzcnt(Register dst, Register src) { Lzcnt(dst, Operand(src)); }
|
| void Lzcnt(Register dst, const Operand& src);
|
|
|