37 #ifndef V8_X64_ASSEMBLER_X64_H_
38 #define V8_X64_ASSEMBLER_X64_H_
83 return kAllocationIndexByRegisterCode[reg.code()];
88 Register result = { kRegisterCodeByAllocationIndex[index] };
94 const char*
const names[] = {
143 static const int kAllocationIndexByRegisterCode[
kNumRegisters];
205 return reg.code() - 1;
216 const char*
const names[] = {
422 inline void set_modrm(
int mod,
Register rm);
429 inline void set_disp8(
int disp);
430 inline void set_disp32(
int disp);
445 class CpuFeatures :
public AllStatic {
453 if (Check(f, cross_compile_))
return true;
455 if (f ==
SSE3 && !FLAG_enable_sse3)
return false;
456 if (f ==
SSE4_1 && !FLAG_enable_sse4_1)
return false;
457 if (f ==
CMOV && !FLAG_enable_cmov)
return false;
458 if (f ==
SAHF && !FLAG_enable_sahf)
return false;
459 return Check(f, supported_);
464 return Check(f, found_by_runtime_probing_only_);
468 return Check(f, cross_compile_) ||
474 return cross_compile_ == 0;
478 uint64_t mask = flag2set(f);
479 return cross_compile_ == 0 ||
480 (cross_compile_ & mask) == mask;
484 static bool Check(
CpuFeature f, uint64_t set) {
485 return (set & flag2set(f)) != 0;
489 return static_cast<uint64_t
>(1) << f;
496 static const uint64_t kDefaultCpuFeatures = (1 <<
CMOV);
499 static bool initialized_;
501 static uint64_t supported_;
502 static uint64_t found_by_runtime_probing_only_;
504 static uint64_t cross_compile_;
512 #define ASSEMBLER_INSTRUCTION_LIST(V) \
535 class Assembler :
public AssemblerBase {
546 static const int kGap = 32;
606 return RelocInfo::NONE64;
609 return RelocInfo::NONE32;
683 #define DECLARE_INSTRUCTION(instruction) \
685 void instruction##p(P1 p1) { \
686 emit_##instruction(p1, kPointerSize); \
690 void instruction##l(P1 p1) { \
691 emit_##instruction(p1, kInt32Size); \
695 void instruction##q(P1 p1) { \
696 emit_##instruction(p1, kInt64Size); \
699 template<class P1, class P2> \
700 void instruction##p(P1 p1, P2 p2) { \
701 emit_##instruction(p1, p2, kPointerSize); \
704 template<class P1, class P2> \
705 void instruction##l(P1 p1, P2 p2) { \
706 emit_##instruction(p1, p2, kInt32Size); \
709 template<class P1, class P2> \
710 void instruction##q(P1 p1, P2 p2) { \
711 emit_##instruction(p1, p2, kInt64Size); \
714 template<class P1, class P2, class P3> \
715 void instruction##p(P1 p1, P2 p2, P3 p3) { \
716 emit_##instruction(p1, p2, p3, kPointerSize); \
719 template<class P1, class P2, class P3> \
720 void instruction##l(P1 p1, P2 p2, P3 p3) { \
721 emit_##instruction(p1, p2, p3, kInt32Size); \
724 template<class P1, class P2, class P3> \
725 void instruction##q(P1 p1, P2 p2, P3 p3) { \
726 emit_##instruction(p1, p2, p3, kInt64Size); \
729 #undef DECLARE_INSTRUCTION
735 void Nop(
int bytes = 1);
743 void pushq(Immediate value);
747 void pushq(Register src);
748 void pushq(
const Operand& src);
750 void popq(Register dst);
751 void popq(
const Operand& dst);
757 void movb(Register dst,
const Operand& src);
758 void movb(Register dst, Immediate imm);
759 void movb(
const Operand& dst, Register src);
760 void movb(
const Operand& dst, Immediate imm);
764 void movw(Register dst,
const Operand& src);
765 void movw(
const Operand& dst, Register src);
766 void movw(
const Operand& dst, Immediate imm);
770 void movl(
const Operand& dst, Label* src);
773 void movp(Register dst,
void* ptr, RelocInfo::Mode rmode);
776 void movq(Register dst, int64_t value);
777 void movq(Register dst, uint64_t value);
779 void movsxbq(Register dst,
const Operand& src);
780 void movsxwq(Register dst,
const Operand& src);
781 void movsxlq(Register dst, Register src);
782 void movsxlq(Register dst,
const Operand& src);
793 void load_rax(
void* ptr, RelocInfo::Mode rmode);
794 void load_rax(ExternalReference ext);
803 immediate_arithmetic_op_8(0x7, dst, src);
809 arithmetic_op(0x3A, dst, src);
813 arithmetic_op(0x3A, dst, src);
817 arithmetic_op(0x38, src, dst);
821 immediate_arithmetic_op_8(0x7, dst, src);
825 immediate_arithmetic_op_16(0x7, dst, src);
829 immediate_arithmetic_op_16(0x7, dst, src);
833 arithmetic_op_16(0x3B, dst, src);
837 arithmetic_op_16(0x3B, dst, src);
841 arithmetic_op_16(0x39, src, dst);
845 immediate_arithmetic_op_8(0x4, dst, src);
860 shift(dst, imm8, 0x2);
864 shift(dst, imm8, 0x0);
868 shift_32(dst, imm8, 0x0);
872 shift(dst, imm8, 0x3);
876 shift(dst, imm8, 0x1);
880 shift_32(dst, imm8, 0x1);
896 shift(dst, shift_amount, 0x7);
902 shift_32(dst, shift_amount, 0x7);
916 shift(dst, shift_amount, 0x4);
928 shift_32(dst, shift_amount, 0x4);
932 shift(dst, shift_amount, 0x5);
944 shift_32(dst, shift_amount, 0x5);
951 immediate_arithmetic_op_8(0x5, dst, src);
996 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET,
1012 void jmp(Label*
L, Label::Distance distance = Label::kFar);
1013 void jmp(
Address entry, RelocInfo::Mode rmode);
1022 Label::Distance distance = Label::kFar);
1039 void fstp(
int index);
1062 void faddp(
int i = 1);
1063 void fsubp(
int i = 1);
1065 void fmulp(
int i = 1);
1066 void fdivp(
int i = 1);
1070 void fxch(
int i = 1);
1072 void ffree(
int i = 0);
1224 void db(uint8_t data);
1225 void dd(uint32_t data);
1233 return pc_ >= reloc_info_writer.pos() - kGap;
1238 return static_cast<int>(reloc_info_writer.pos() -
pc_);
1258 uint32_t long_at(
int pos) {
1259 return *
reinterpret_cast<uint32_t*
>(
addr_at(pos));
1261 void long_at_put(
int pos, uint32_t x) {
1262 *
reinterpret_cast<uint32_t*
>(
addr_at(pos)) = x;
1268 void emit(
byte x) { *
pc_++ = x; }
1269 inline void emitl(uint32_t x);
1270 inline void emitp(
void* x, RelocInfo::Mode rmode);
1271 inline void emitq(uint64_t x);
1273 inline void emit_code_target(Handle<Code> target,
1274 RelocInfo::Mode rmode,
1276 inline void emit_runtime_entry(
Address entry, RelocInfo::Mode rmode);
1277 void emit(Immediate x) { emitl(x.value_); }
1283 inline void emit_rex_64(XMMRegister reg, Register rm_reg);
1284 inline void emit_rex_64(Register reg, XMMRegister rm_reg);
1285 inline void emit_rex_64(Register reg, Register rm_reg);
1292 inline void emit_rex_64(Register reg,
const Operand& op);
1293 inline void emit_rex_64(XMMRegister reg,
const Operand& op);
1299 inline void emit_rex_64(Register rm_reg);
1306 inline void emit_rex_64(
const Operand& op);
1309 void emit_rex_64() { emit(0x48); }
1313 inline void emit_rex_32(Register reg, Register rm_reg);
1318 inline void emit_rex_32(Register reg,
const Operand& op);
1322 inline void emit_rex_32(Register rm_reg);
1326 inline void emit_rex_32(
const Operand& op);
1330 inline void emit_optional_rex_32(Register reg, Register rm_reg);
1336 inline void emit_optional_rex_32(Register reg,
const Operand& op);
1340 inline void emit_optional_rex_32(XMMRegister reg, XMMRegister base);
1344 inline void emit_optional_rex_32(XMMRegister reg, Register base);
1348 inline void emit_optional_rex_32(Register reg, XMMRegister base);
1352 inline void emit_optional_rex_32(XMMRegister reg,
const Operand& op);
1356 inline void emit_optional_rex_32(Register rm_reg);
1360 inline void emit_optional_rex_32(
const Operand& op);
1362 void emit_rex(
int size) {
1371 void emit_rex(P1
p1,
int size) {
1376 emit_optional_rex_32(p1);
1380 template<
class P1,
class P2>
1381 void emit_rex(P1 p1, P2
p2,
int size) {
1383 emit_rex_64(p1, p2);
1386 emit_optional_rex_32(p1, p2);
1394 void emit_operand(Register reg,
const Operand&
adr) {
1395 emit_operand(reg.low_bits(),
adr);
1401 void emit_operand(
int rm,
const Operand& adr);
1404 void emit_modrm(Register reg, Register rm_reg) {
1405 emit(0xC0 | reg.low_bits() << 3 | rm_reg.low_bits());
1410 void emit_modrm(
int code, Register rm_reg) {
1412 emit(0xC0 | code << 3 | rm_reg.low_bits());
1416 inline void emit_code_relative_offset(Label* label);
1428 void arithmetic_op_16(
byte opcode, Register reg, Register rm_reg);
1429 void arithmetic_op_16(
byte opcode, Register reg,
const Operand& rm_reg);
1430 void arithmetic_op_32(
byte opcode, Register reg, Register rm_reg);
1431 void arithmetic_op_32(
byte opcode, Register reg,
const Operand& rm_reg);
1432 void arithmetic_op(
byte opcode, Register reg, Register rm_reg);
1433 void arithmetic_op(
byte opcode, Register reg,
const Operand& rm_reg);
1434 void immediate_arithmetic_op(
byte subcode, Register dst, Immediate src);
1435 void immediate_arithmetic_op(
byte subcode,
const Operand& dst, Immediate src);
1437 void immediate_arithmetic_op_8(
byte subcode,
1440 void immediate_arithmetic_op_8(
byte subcode,
1444 void immediate_arithmetic_op_16(
byte subcode,
1447 void immediate_arithmetic_op_16(
byte subcode,
1451 void immediate_arithmetic_op_32(
byte subcode,
1454 void immediate_arithmetic_op_32(
byte subcode,
1459 void shift(Register dst, Immediate shift_amount,
int subcode);
1460 void shift_32(Register dst, Immediate shift_amount,
int subcode);
1462 void shift(Register dst,
int subcode);
1463 void shift_32(Register dst,
int subcode);
1465 void emit_farith(
int b1,
int b2,
int i);
1469 void bind_to(Label*
L,
int pos);
1472 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0);
1475 void emit_add(Register dst, Register src,
int size) {
1477 arithmetic_op(0x03, dst, src);
1480 arithmetic_op_32(0x03, dst, src);
1484 void emit_add(Register dst, Immediate src,
int size) {
1486 immediate_arithmetic_op(0x0, dst, src);
1489 immediate_arithmetic_op_32(0x0, dst, src);
1493 void emit_add(Register dst,
const Operand& src,
int size) {
1495 arithmetic_op(0x03, dst, src);
1498 arithmetic_op_32(0x03, dst, src);
1502 void emit_add(
const Operand& dst, Register src,
int size) {
1504 arithmetic_op(0x1, src, dst);
1507 arithmetic_op_32(0x1, src, dst);
1511 void emit_add(
const Operand& dst, Immediate src,
int size) {
1513 immediate_arithmetic_op(0x0, dst, src);
1516 immediate_arithmetic_op_32(0x0, dst, src);
1520 void emit_and(Register dst, Register src,
int size) {
1522 arithmetic_op(0x23, dst, src);
1525 arithmetic_op_32(0x23, dst, src);
1529 void emit_and(Register dst,
const Operand& src,
int size) {
1531 arithmetic_op(0x23, dst, src);
1534 arithmetic_op_32(0x23, dst, src);
1538 void emit_and(
const Operand& dst, Register src,
int size) {
1540 arithmetic_op(0x21, src, dst);
1543 arithmetic_op_32(0x21, src, dst);
1547 void emit_and(Register dst, Immediate src,
int size) {
1549 immediate_arithmetic_op(0x4, dst, src);
1552 immediate_arithmetic_op_32(0x4, dst, src);
1556 void emit_and(
const Operand& dst, Immediate src,
int size) {
1558 immediate_arithmetic_op(0x4, dst, src);
1561 immediate_arithmetic_op_32(0x4, dst, src);
1565 void emit_cmp(Register dst, Register src,
int size) {
1567 arithmetic_op(0x3B, dst, src);
1570 arithmetic_op_32(0x3B, dst, src);
1574 void emit_cmp(Register dst,
const Operand& src,
int size) {
1576 arithmetic_op(0x3B, dst, src);
1579 arithmetic_op_32(0x3B, dst, src);
1583 void emit_cmp(
const Operand& dst, Register src,
int size) {
1585 arithmetic_op(0x39, src, dst);
1588 arithmetic_op_32(0x39, src, dst);
1592 void emit_cmp(Register dst, Immediate src,
int size) {
1594 immediate_arithmetic_op(0x7, dst, src);
1597 immediate_arithmetic_op_32(0x7, dst, src);
1601 void emit_cmp(
const Operand& dst, Immediate src,
int size) {
1603 immediate_arithmetic_op(0x7, dst, src);
1606 immediate_arithmetic_op_32(0x7, dst, src);
1610 void emit_dec(Register dst,
int size);
1611 void emit_dec(
const Operand& dst,
int size);
1616 void emit_idiv(Register src,
int size);
1620 void emit_imul(Register src,
int size);
1621 void emit_imul(Register dst, Register src,
int size);
1622 void emit_imul(Register dst,
const Operand& src,
int size);
1623 void emit_imul(Register dst, Register src, Immediate imm,
int size);
1625 void emit_inc(Register dst,
int size);
1626 void emit_inc(
const Operand& dst,
int size);
1628 void emit_lea(Register dst,
const Operand& src,
int size);
1630 void emit_mov(Register dst,
const Operand& src,
int size);
1631 void emit_mov(Register dst, Register src,
int size);
1632 void emit_mov(
const Operand& dst, Register src,
int size);
1633 void emit_mov(Register dst, Immediate value,
int size);
1634 void emit_mov(
const Operand& dst, Immediate value,
int size);
1636 void emit_movzxb(Register dst,
const Operand& src,
int size);
1637 void emit_movzxw(Register dst,
const Operand& src,
int size);
1638 void emit_movzxw(Register dst, Register src,
int size);
1640 void emit_neg(Register dst,
int size);
1641 void emit_neg(
const Operand& dst,
int size);
1643 void emit_not(Register dst,
int size);
1644 void emit_not(
const Operand& dst,
int size);
1646 void emit_or(Register dst, Register src,
int size) {
1648 arithmetic_op(0x0B, dst, src);
1650 arithmetic_op_32(0x0B, dst, src);
1654 void emit_or(Register dst,
const Operand& src,
int size) {
1656 arithmetic_op(0x0B, dst, src);
1658 arithmetic_op_32(0x0B, dst, src);
1662 void emit_or(
const Operand& dst, Register src,
int size) {
1664 arithmetic_op(0x9, src, dst);
1666 arithmetic_op_32(0x9, src, dst);
1670 void emit_or(Register dst, Immediate src,
int size) {
1672 immediate_arithmetic_op(0x1, dst, src);
1674 immediate_arithmetic_op_32(0x1, dst, src);
1678 void emit_or(
const Operand& dst, Immediate src,
int size) {
1680 immediate_arithmetic_op(0x1, dst, src);
1682 immediate_arithmetic_op_32(0x1, dst, src);
1686 void emit_repmovs(
int size);
1688 void emit_sbb(Register dst, Register src,
int size) {
1690 arithmetic_op(0x1b, dst, src);
1693 arithmetic_op_32(0x1b, dst, src);
1697 void emit_sub(Register dst, Register src,
int size) {
1699 arithmetic_op(0x2B, dst, src);
1702 arithmetic_op_32(0x2B, dst, src);
1706 void emit_sub(Register dst, Immediate src,
int size) {
1708 immediate_arithmetic_op(0x5, dst, src);
1711 immediate_arithmetic_op_32(0x5, dst, src);
1715 void emit_sub(Register dst,
const Operand& src,
int size) {
1717 arithmetic_op(0x2B, dst, src);
1720 arithmetic_op_32(0x2B, dst, src);
1724 void emit_sub(
const Operand& dst, Register src,
int size) {
1726 arithmetic_op(0x29, src, dst);
1729 arithmetic_op_32(0x29, src, dst);
1733 void emit_sub(
const Operand& dst, Immediate src,
int size) {
1735 immediate_arithmetic_op(0x5, dst, src);
1738 immediate_arithmetic_op_32(0x5, dst, src);
1742 void emit_test(Register dst, Register src,
int size);
1743 void emit_test(Register reg, Immediate mask,
int size);
1744 void emit_test(
const Operand& op, Register reg,
int size);
1745 void emit_test(
const Operand& op, Immediate mask,
int size);
1748 void emit_xchg(Register dst, Register src,
int size);
1750 void emit_xor(Register dst, Register src,
int size) {
1752 if (dst.code() == src.code()) {
1753 arithmetic_op_32(0x33, dst, src);
1755 arithmetic_op(0x33, dst, src);
1759 arithmetic_op_32(0x33, dst, src);
1763 void emit_xor(Register dst,
const Operand& src,
int size) {
1765 arithmetic_op(0x33, dst, src);
1768 arithmetic_op_32(0x33, dst, src);
1772 void emit_xor(Register dst, Immediate src,
int size) {
1774 immediate_arithmetic_op(0x6, dst, src);
1777 immediate_arithmetic_op_32(0x6, dst, src);
1781 void emit_xor(
const Operand& dst, Immediate src,
int size) {
1783 immediate_arithmetic_op(0x6, dst, src);
1786 immediate_arithmetic_op_32(0x6, dst, src);
1790 void emit_xor(
const Operand& dst, Register src,
int size) {
1792 arithmetic_op(0x31, src, dst);
1795 arithmetic_op_32(0x31, src, dst);
1804 RelocInfoWriter reloc_info_writer;
1817 class EnsureSpace BASE_EMBEDDED {
1820 if (assembler_->buffer_overflow()) assembler_->GrowBuffer();
1822 space_before_ = assembler_->available_space();
1828 int bytes_generated = space_before_ - assembler_->available_space();
1829 ASSERT(bytes_generated < assembler_->kGap);
1834 Assembler* assembler_;
1842 #endif // V8_X64_ASSEMBLER_X64_H_
Address runtime_entry_at(Address pc)
void psllq(XMMRegister reg, int8_t shift)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter NULL
static RelocInfo::Mode RelocInfoNone()
void shl(Register dst, Immediate shift_amount)
void cvtlsi2ss(XMMRegister dst, Register src)
void movapd(XMMRegister dst, XMMRegister src)
static const int kMaximalBufferSize
void pushq_imm32(int32_t imm32)
Isolate * isolate() const
void cmpb(const Operand &dst, Register src)
void fsub(const FPRegister &fd, const FPRegister &fn, const FPRegister &fm)
void load_rax(void *ptr, RelocInfo::Mode rmode)
const int kRegister_r14_Code
const int kRegister_rsp_Code
static const byte kJccShortPrefix
void ucomisd(XMMRegister dst, XMMRegister src)
static void set_target_address_at(Address pc, Code *code, Address target)
#define DECLARE_INSTRUCTION(instruction)
void cvttss2si(Register dst, const Operand &src)
void PopulateConstantPool(ConstantPoolArray *constant_pool)
void cmpw(Register dst, const Operand &src)
static Address target_address_at(Address pc, Code *code)
void ror(Register dst, Immediate imm8)
void roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode)
void bsrl(Register dst, Register src)
bool buffer_overflow() const
void mulsd(XMMRegister dst, XMMRegister src)
void addps(XMMRegister dst, const Operand &src)
bool is_byte_register() const
void cvtsd2si(Register dst, XMMRegister src)
static TypeFeedbackId None()
static const int kMaxNumAllocatableRegisters
void movq(Register dst, int64_t value)
const int kRegister_r13_Code
const int kRegister_rbp_Code
void orpd(XMMRegister dst, XMMRegister src)
static const int kPatchDebugBreakSlotReturnOffset
int SizeOfCodeGeneratedSince(Label *label)
void cmpw(const Operand &dst, Immediate src)
void cvtss2sd(XMMRegister dst, XMMRegister src)
void sqrtsd(XMMRegister dst, XMMRegister src)
static XMMRegister FromAllocationIndex(int index)
static bool IsSupported(CpuFeature f)
static Address target_address_at(Address pc, ConstantPoolArray *constant_pool)
void mulps(XMMRegister dst, const Operand &src)
void andpd(XMMRegister dst, XMMRegister src)
void j(Condition cc, Label *L, Label::Distance distance=Label::kFar)
static Register FromAllocationIndex(int index)
#define ASSERT(condition)
static const int kPatchReturnSequenceAddressOffset
static bool IsSafeForSnapshot(CpuFeature f)
void cvtlsi2sd(XMMRegister dst, const Operand &src)
static const int kShortCallInstructionLength
static const char * AllocationIndexToString(int index)
void movsxlq(Register dst, Register src)
void xorpd(XMMRegister dst, XMMRegister src)
void fdiv(const FPRegister &fd, const FPRegister &fn, const FPRegister &fm)
void bt(const Operand &dst, Register src)
void sarl_cl(Register dst)
static const byte kTestAlByte
void shll(Register dst, Immediate shift_amount)
void cmovl(Condition cc, Register dst, Register src)
void testb(Register dst, Register src)
static const int kMoveAddressIntoScratchRegisterInstructionLength
const int kRegister_rcx_Code
void cmpb(Register dst, Register src)
void fistp_s(const Operand &adr)
void roll(Register dst, Immediate imm8)
ConstantPoolArray * constant_pool()
void addsd(XMMRegister dst, XMMRegister src)
const int kRegister_r12_Code
void shr_cl(Register dst)
void fld_d(const Operand &adr)
static const int kNumRegisters
void cmpb_al(const Operand &op)
void pushq(Immediate value)
void fild_s(const Operand &adr)
EnsureSpace(Assembler *assembler)
void shr(Register dst, Immediate shift_amount)
static const char * AllocationIndexToString(int index)
void enter(const Immediate &size)
void ret(const Register &xn=lr)
Condition ReverseCondition(Condition cond)
static const byte kJcShortOpcode
static const int kMaxNumAllocatableRegisters
void shld(Register dst, Register src)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_string(expose_natives_as
DwVfpRegister DoubleRegister
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object size
void andps(XMMRegister dst, const Operand &src)
void fisttp_d(const Operand &adr)
static const int kRealPatchReturnSequenceAddressOffset
void movss(XMMRegister dst, const Operand &src)
void movb(Register dst, const Operand &src)
void set_byte_at(int pos, byte value)
void cvtsd2ss(XMMRegister dst, XMMRegister src)
void movp(Register dst, void *ptr, RelocInfo::Mode rmode)
static const int kSpecialTargetSize
friend class ExternalReference
const int kRegister_r11_Code
void movsd(XMMRegister dst, XMMRegister src)
void GetCode(CodeDesc *desc)
void movdqa(XMMRegister dst, const Operand &src)
void rol(Register dst, Immediate imm8)
static const int kJSReturnSequenceLength
void sar(Register dst, Immediate shift_amount)
void movdqu(XMMRegister dst, const Operand &src)
static const byte kNopByte
static const int kMaxNumRegisters
int available_space() const
void movsxbq(Register dst, const Operand &src)
static const byte kJzShortOpcode
void movmskpd(Register dst, XMMRegister src)
void fisttp_s(const Operand &adr)
void subb(Register dst, Immediate src)
void cmpb(const Operand &dst, Immediate src)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra code(assertions) for debugging") DEFINE_bool(code_comments
void orps(XMMRegister dst, const Operand &src)
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
static Register from_code(int code)
static const int kCallScratchRegisterInstructionLength
const int kRegister_r8_Code
void cmpb(Register dst, Immediate src)
MaybeObject * AllocateConstantPool(Heap *heap)
static bool IsFoundByRuntimeProbingOnly(CpuFeature f)
void emit_sse_operand(XMMRegister reg, const Operand &adr)
void cvtqsi2sd(XMMRegister dst, const Operand &src)
const int kRegister_r15_Code
static const int kCallTargetAddressOffset
const int kRegister_rsi_Code
void fmul(const FPRegister &fd, const FPRegister &fn, const FPRegister &fm)
void andb(Register dst, Immediate src)
void movl(const Operand &dst, Label *src)
static const int kDebugBreakSlotLength
void setcc(Condition cc, Register reg)
const int kRegister_rbx_Code
void fld_s(const Operand &adr)
void fadd(const FPRegister &fd, const FPRegister &fn, const FPRegister &fm)
static bool IsNop(Instr instr, int type=NON_MARKING_NOP)
void RecordDebugBreakSlot()
const int kRegister_r10_Code
void fstp_d(const Operand &adr)
void movw(Register reg, uint32_t immediate, Condition cond=al)
static const int kCallSequenceLength
static int NumAllocatableRegisters()
static int ToAllocationIndex(XMMRegister reg)
void store_rax(void *dst, RelocInfo::Mode mode)
void fistp_d(const Operand &adr)
bool is(Register reg) const
void cvtsd2siq(Register dst, XMMRegister src)
static const byte kTestEaxByte
friend class PlatformFeatureScope
static const byte kJncShortOpcode
void shrd(Register dst, Register src)
void movaps(XMMRegister dst, XMMRegister src)
void movmskps(Register dst, XMMRegister src)
void rcr(Register dst, Immediate imm8)
Operand(Register reg, Shift shift=LSL, unsigned shift_amount=0)
#define ASSEMBLER_INSTRUCTION_LIST(V)
void RecordComment(const char *msg)
void rorl(Register dst, Immediate imm8)
void fstp_s(const Operand &adr)
void divsd(XMMRegister dst, XMMRegister src)
void shrl_cl(Register dst)
static Address target_address_from_return_address(Address pc)
void rorl_cl(Register dst)
void fild_d(const Operand &adr)
void shll_cl(Register dst)
friend class PositionsRecorder
void shrl(Register dst, Immediate shift_amount)
static bool VerifyCrossCompiling()
Assembler(Isolate *isolate, void *buffer, int buffer_size)
static int NumAllocatableRegisters()
void cmpltsd(XMMRegister dst, XMMRegister src)
Condition NegateCondition(Condition cond)
const int kRegister_rdx_Code
static XMMRegister from_code(int code)
void divps(XMMRegister dst, const Operand &src)
void cmpw(const Operand &dst, Register src)
void sar_cl(Register dst)
void movd(XMMRegister dst, Register src)
void xorps(XMMRegister dst, const Operand &src)
PositionsRecorder * positions_recorder()
void subps(XMMRegister dst, const Operand &src)
void fisub_s(const Operand &adr)
static void set_target_address_at(Address pc, ConstantPoolArray *constant_pool, Address target)
void extractps(Register dst, XMMRegister src, byte imm8)
void shufps(XMMRegister dst, XMMRegister src, byte imm8)
static const byte kJnzShortOpcode
void cmpw(Register dst, Immediate src)
Handle< Object > code_target_object_handle_at(Address pc)
bool requires_rex() const
void cmpb(Register dst, const Operand &src)
static int ToAllocationIndex(Register reg)
void fist_s(const Operand &adr)
void cmpw(Register dst, Register src)
void rcl(Register dst, Immediate imm8)
bool is(XMMRegister reg) const
const int kRegister_r9_Code
void movsxwq(Register dst, const Operand &src)
void adr(const Register &rd, Label *label)
void bts(Register dst, Register src)
void sarl(Register dst, Immediate shift_amount)
void cmovq(Condition cc, Register dst, Register src)
const int kRegister_rax_Code
static bool VerifyCrossCompiling(CpuFeature f)
static const int kPatchDebugBreakSlotAddressOffset
void subsd(XMMRegister dst, XMMRegister src)
const int kRegister_rdi_Code
const int kRegister_no_reg_Code
void cvttsd2siq(Register dst, XMMRegister src)
void mul(Register dst, Register src1, Register src2, SBit s=LeaveCC, Condition cond=al)
void cvttsd2si(Register dst, const Operand &src)
static void deserialization_set_special_target_at(Address instruction_payload, Code *code, Address target)
void shl_cl(Register dst)