Flutter Engine
The Flutter Engine
Classes | Namespaces | Macros
assembler_x64.h File Reference
#include <functional>
#include "platform/assert.h"
#include "platform/utils.h"
#include "vm/compiler/assembler/assembler_base.h"
#include "vm/constants.h"
#include "vm/constants_x86.h"
#include "vm/hash_map.h"
#include "vm/pointer_tagging.h"

Go to the source code of this file.

Classes

class  dart::compiler::Immediate
 
class  dart::compiler::Operand
 
class  dart::compiler::Address
 
class  dart::compiler::FieldAddress
 
class  dart::compiler::Assembler
 

Namespaces

namespace  dart
 
namespace  dart::compiler
 

Macros

#define OBJ(op)   op##q
 
#define RR(width, name, ...)    void name(Register dst, Register src) { Emit##width(dst, src, __VA_ARGS__); }
 
#define RA(width, name, ...)
 
#define RAB(name, ...)
 
#define AR(width, name, ...)
 
#define ARB(name, ...)
 
#define REGULAR_INSTRUCTION(name, ...)
 
#define DECLARE_CMOV(name, code)
 
#define SIMPLE(name, ...)    void name() { EmitSimple(__VA_ARGS__); }
 
#define XX(width, name, ...)
 
#define XA(width, name, ...)
 
#define AX(width, name, ...)
 
#define DECLARE_XMM(name, code)
 
#define DECLARE_CMPPS(name, code)
 
#define DECLARE_SIMPLE(name, opcode)    void name() { EmitSimple(opcode); }
 
#define DECLARE_ALU(op, c)
 
#define REGULAR_UNARY(name, opcode, modrm)
 

Macro Definition Documentation

◆ AR

#define AR (   width,
  name,
  ... 
)
Value:
void name(const Address& dst, Register src) { \
Emit##width(src, dst, __VA_ARGS__); \
}
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
dst
Definition: cp.py:12
int32_t width

Definition at line 342 of file assembler_x64.h.

◆ ARB

#define ARB (   name,
  ... 
)
Value:
void name(const Address& dst, ByteRegister src) { \
EmitB(src, dst, __VA_ARGS__); \
}

Definition at line 346 of file assembler_x64.h.

◆ AX

#define AX (   width,
  name,
  ... 
)
Value:
void name(const Address& dst, XmmRegister src) { \
Emit##width(src, dst, __VA_ARGS__); \
}

Definition at line 423 of file assembler_x64.h.

◆ DECLARE_ALU

#define DECLARE_ALU (   op,
 
)
Value:
void op##w(Register dst, Register src) { EmitW(dst, src, c * 8 + 3); } \
void op##l(Register dst, Register src) { EmitL(dst, src, c * 8 + 3); } \
void op##q(Register dst, Register src) { EmitQ(dst, src, c * 8 + 3); } \
void op##w(Register dst, const Address& src) { EmitW(dst, src, c * 8 + 3); } \
void op##l(Register dst, const Address& src) { EmitL(dst, src, c * 8 + 3); } \
void op##q(Register dst, const Address& src) { EmitQ(dst, src, c * 8 + 3); } \
void op##w(const Address& dst, Register src) { EmitW(src, dst, c * 8 + 1); } \
void op##l(const Address& dst, Register src) { EmitL(src, dst, c * 8 + 1); } \
void op##q(const Address& dst, Register src) { EmitQ(src, dst, c * 8 + 1); } \
void op##l(Register dst, const Immediate& imm) { AluL(c, dst, imm); } \
void op##q(Register dst, const Immediate& imm) { \
AluQ(c, c * 8 + 3, dst, imm); \
} \
void op##b(const Address& dst, const Immediate& imm) { AluB(c, dst, imm); } \
void op##w(const Address& dst, const Immediate& imm) { AluW(c, dst, imm); } \
void op##l(const Address& dst, const Immediate& imm) { AluL(c, dst, imm); } \
void op##q(const Address& dst, const Immediate& imm) { \
AluQ(c, c * 8 + 3, dst, imm); \
}
static bool b
SkScalar w

Definition at line 619 of file assembler_x64.h.

◆ DECLARE_CMOV

#define DECLARE_CMOV (   name,
  code 
)
Value:
RR(Q, cmov##name##q, 0x40 + code, 0x0F) \
RR(L, cmov##name##l, 0x40 + code, 0x0F) \
RA(Q, cmov##name##q, 0x40 + code, 0x0F) \
RA(L, cmov##name##l, 0x40 + code, 0x0F)
#define RR(width, name,...)

Definition at line 391 of file assembler_x64.h.

◆ DECLARE_CMPPS

#define DECLARE_CMPPS (   name,
  code 
)
Value:
void cmpps##name(XmmRegister dst, XmmRegister src) { \
EmitL(dst, src, 0xC2, 0x0F); \
AssemblerBuffer::EnsureCapacity ensured(&buffer_); \
EmitUint8(code); \
}

Definition at line 468 of file assembler_x64.h.

◆ DECLARE_SIMPLE

#define DECLARE_SIMPLE (   name,
  opcode 
)     void name() { EmitSimple(opcode); }

Definition at line 477 of file assembler_x64.h.

◆ DECLARE_XMM

#define DECLARE_XMM (   name,
  code 
)
Value:
XX(L, name##ps, 0x50 + code, 0x0F) \
XA(L, name##ps, 0x50 + code, 0x0F) \
AX(L, name##ps, 0x50 + code, 0x0F) \
XX(L, name##pd, 0x50 + code, 0x0F, 0x66) \
XA(L, name##pd, 0x50 + code, 0x0F, 0x66) \
AX(L, name##pd, 0x50 + code, 0x0F, 0x66) \
XX(L, name##sd, 0x50 + code, 0x0F, 0xF2) \
XA(L, name##sd, 0x50 + code, 0x0F, 0xF2) \
AX(L, name##sd, 0x50 + code, 0x0F, 0xF2) \
XX(L, name##ss, 0x50 + code, 0x0F, 0xF3) \
XA(L, name##ss, 0x50 + code, 0x0F, 0xF3) \
AX(L, name##ss, 0x50 + code, 0x0F, 0xF3)
#define XX(width, name,...)

Definition at line 442 of file assembler_x64.h.

◆ OBJ

#define OBJ (   op)    op##q

Definition at line 290 of file assembler_x64.h.

◆ RA

#define RA (   width,
  name,
  ... 
)
Value:
void name(Register dst, const Address& src) { \
Emit##width(dst, src, __VA_ARGS__); \
}

Definition at line 334 of file assembler_x64.h.

◆ RAB

#define RAB (   name,
  ... 
)
Value:
void name(ByteRegister dst, const Address& src) { \
EmitB(dst, src, __VA_ARGS__); \
}

Definition at line 338 of file assembler_x64.h.

◆ REGULAR_INSTRUCTION

#define REGULAR_INSTRUCTION (   name,
  ... 
)
Value:
RA(W, name##w, __VA_ARGS__) \
RA(L, name##l, __VA_ARGS__) \
RA(Q, name##q, __VA_ARGS__) \
RR(W, name##w, __VA_ARGS__) \
RR(L, name##l, __VA_ARGS__) \
RR(Q, name##q, __VA_ARGS__)
#define W
Definition: aaa.cpp:17
#define RA(width, name,...)

Definition at line 350 of file assembler_x64.h.

◆ REGULAR_UNARY

#define REGULAR_UNARY (   name,
  opcode,
  modrm 
)
Value:
void name##q(Register reg) { EmitUnaryQ(reg, opcode, modrm); } \
void name##l(Register reg) { EmitUnaryL(reg, opcode, modrm); } \
void name##q(const Address& address) { EmitUnaryQ(address, opcode, modrm); } \
void name##l(const Address& address) { EmitUnaryL(address, opcode, modrm); }

Definition at line 647 of file assembler_x64.h.

◆ RR

#define RR (   width,
  name,
  ... 
)     void name(Register dst, Register src) { Emit##width(dst, src, __VA_ARGS__); }

Definition at line 332 of file assembler_x64.h.

◆ SIMPLE

#define SIMPLE (   name,
  ... 
)     void name() { EmitSimple(__VA_ARGS__); }

Definition at line 402 of file assembler_x64.h.

◆ XA

#define XA (   width,
  name,
  ... 
)
Value:
void name(XmmRegister dst, const Address& src) { \
Emit##width(dst, src, __VA_ARGS__); \
}

Definition at line 419 of file assembler_x64.h.

◆ XX

#define XX (   width,
  name,
  ... 
)
Value:
Emit##width(dst, src, __VA_ARGS__); \
}

Definition at line 415 of file assembler_x64.h.