| Index: src/x64/assembler-x64.h
|
| ===================================================================
|
| --- src/x64/assembler-x64.h (revision 7006)
|
| +++ src/x64/assembler-x64.h (working copy)
|
| @@ -571,16 +571,20 @@
|
| // TODO(X64): Rename this, removing the "Real", after changing the above.
|
| static const int kRealPatchReturnSequenceAddressOffset = 2;
|
|
|
| - // The x64 JS return sequence is padded with int3 to make it large
|
| - // enough to hold a call instruction when the debugger patches it.
|
| + // Some x64 JS code is padded with int3 to make it large
|
| + // enough to hold an instruction when the debugger patches it.
|
| + static const int kJumpInstructionLength = 13;
|
| static const int kCallInstructionLength = 13;
|
| static const int kJSReturnSequenceLength = 13;
|
| + static const int kShortCallInstructionLength = 5;
|
|
|
| // The debug break slot must be able to contain a call instruction.
|
| static const int kDebugBreakSlotLength = kCallInstructionLength;
|
|
|
| // One byte opcode for test eax,0xXXXXXXXX.
|
| static const byte kTestEaxByte = 0xA9;
|
| + // One byte opcode for test al, 0xXX.
|
| + static const byte kTestAlByte = 0xA8;
|
|
|
| // ---------------------------------------------------------------------------
|
| // Code generation
|
| @@ -603,7 +607,7 @@
|
|
|
| // Insert the smallest number of nop instructions
|
| // possible to align the pc offset to a multiple
|
| - // of m. m must be a power of 2.
|
| + // of m, where m must be a power of 2.
|
| void Align(int m);
|
| // Aligns code to something that's optimal for a jump target for the platform.
|
| void CodeTargetAlign();
|
| @@ -879,6 +883,7 @@
|
| void imul(Register dst, Register src, Immediate imm); // dst = src * imm.
|
| // Signed 32-bit multiply instructions.
|
| void imull(Register dst, Register src); // dst = dst * src.
|
| + void imull(Register dst, const Operand& src); // dst = dst * src.
|
| void imull(Register dst, Register src, Immediate imm); // dst = src * imm.
|
|
|
| void incq(Register dst);
|
| @@ -912,6 +917,10 @@
|
| arithmetic_op(0x0B, dst, src);
|
| }
|
|
|
| + void orl(Register dst, const Operand& src) {
|
| + arithmetic_op_32(0x0B, dst, src);
|
| + }
|
| +
|
| void or_(const Operand& dst, Register src) {
|
| arithmetic_op(0x09, src, dst);
|
| }
|
| @@ -1075,6 +1084,18 @@
|
| arithmetic_op_32(0x33, dst, src);
|
| }
|
|
|
| + void xorl(Register dst, const Operand& src) {
|
| + arithmetic_op_32(0x33, dst, src);
|
| + }
|
| +
|
| + void xorl(Register dst, Immediate src) {
|
| + immediate_arithmetic_op_32(0x6, dst, src);
|
| + }
|
| +
|
| + void xorl(const Operand& dst, Immediate src) {
|
| + immediate_arithmetic_op_32(0x6, dst, src);
|
| + }
|
| +
|
| void xor_(Register dst, const Operand& src) {
|
| arithmetic_op(0x33, dst, src);
|
| }
|
| @@ -1129,6 +1150,12 @@
|
| void call(Label* L);
|
| void call(Handle<Code> target, RelocInfo::Mode rmode);
|
|
|
| + // Calls directly to the given address using a relative offset.
|
| + // Should only ever be used in Code objects for calls within the
|
| + // same Code object. Should not be used when generating new code (use labels),
|
| + // but only when patching existing code.
|
| + void call(Address target);
|
| +
|
| // Call near absolute indirect, address in register
|
| void call(Register adr);
|
|
|
| @@ -1272,6 +1299,8 @@
|
| void ucomisd(XMMRegister dst, XMMRegister src);
|
| void ucomisd(XMMRegister dst, const Operand& src);
|
|
|
| + void movmskpd(Register dst, XMMRegister src);
|
| +
|
| // The first argument is the reg field, the second argument is the r/m field.
|
| void emit_sse_operand(XMMRegister dst, XMMRegister src);
|
| void emit_sse_operand(XMMRegister reg, const Operand& adr);
|
|
|