v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
maglev-ir-x64.cc File Reference
Include dependency graph for maglev-ir-x64.cc:

Go to the source code of this file.

Namespaces

namespace  v8
 
namespace  v8::internal
 
namespace  v8::internal::maglev
 

Macros

#define __   masm->
 
#define DEF_BITWISE_BINOP(Instruction, opcode)
 
#define DEF_SHIFT_BINOP(Instruction, opcode)
 

Macro Definition Documentation

◆ __

#define __   masm->

Definition at line 23 of file maglev-ir-x64.cc.

◆ DEF_BITWISE_BINOP

#define DEF_BITWISE_BINOP ( Instruction,
opcode )
Value:
void Instruction::SetValueLocationConstraints() { \
UseRegister(left_input()); \
if (TryGetInt32ConstantInput(kRightIndex)) { \
UseAny(right_input()); \
} else { \
UseRegister(right_input()); \
} \
DefineSameAsFirst(this); \
} \
\
void Instruction::GenerateCode(MaglevAssembler* masm, \
const ProcessingState& state) { \
Register left = ToRegister(left_input()); \
if (!right_input().operand().IsRegister()) { \
auto right_const = TryGetInt32ConstantInput(kRightIndex); \
DCHECK(right_const); \
__ opcode(left, Immediate(*right_const)); \
} else { \
Register right = ToRegister(right_input()); \
__ opcode(left, right); \
} \
}
#define __
Register ToRegister(BaselineAssembler *basm, BaselineAssembler::ScratchRegisterScope *scope, Arg arg)

Definition at line 473 of file maglev-ir-x64.cc.

◆ DEF_SHIFT_BINOP

#define DEF_SHIFT_BINOP ( Instruction,
opcode )
Value:
void Instruction::SetValueLocationConstraints() { \
UseRegister(left_input()); \
if (TryGetInt32ConstantInput(kRightIndex)) { \
UseAny(right_input()); \
} else { \
UseFixed(right_input(), rcx); \
} \
DefineSameAsFirst(this); \
} \
\
void Instruction::GenerateCode(MaglevAssembler* masm, \
const ProcessingState& state) { \
Register left = ToRegister(left_input()); \
if (auto right_const = TryGetInt32ConstantInput(kRightIndex)) { \
DCHECK(right_const); \
int right = *right_const & 31; \
if (right != 0) { \
__ opcode(left, Immediate(right)); \
} \
} else { \
DCHECK_EQ(rcx, ToRegister(right_input())); \
__ opcode##_cl(left); \
} \
}

Definition at line 501 of file maglev-ir-x64.cc.