V8 Project
v8::internal::TestAndBranch Class Reference
+ Inheritance diagram for v8::internal::TestAndBranch:
+ Collaboration diagram for v8::internal::TestAndBranch:

Public Member Functions

 TestAndBranch (LCodeGen *codegen, Condition cond, const Register &value, uint64_t mask)
 
virtual void Emit (Label *label) const
 
virtual void EmitInverted (Label *label) const
 

Private Attributes

Condition cond_
 
const Registervalue_
 
uint64_t mask_
 

Detailed Description

Definition at line 106 of file lithium-codegen-arm64.cc.

Constructor & Destructor Documentation

◆ TestAndBranch()

v8::internal::TestAndBranch::TestAndBranch ( LCodeGen codegen,
Condition  cond,
const Register value,
uint64_t  mask 
)
inline

Definition at line 108 of file lithium-codegen-arm64.cc.

112  : BranchGenerator(codegen),
113  cond_(cond),
114  value_(value),
115  mask_(mask) { }

Member Function Documentation

◆ Emit()

virtual void v8::internal::TestAndBranch::Emit ( Label *  label) const
inlinevirtual

Definition at line 117 of file lithium-codegen-arm64.cc.

117  {
118  switch (cond_) {
119  case eq:
120  __ TestAndBranchIfAllClear(value_, mask_, label);
121  break;
122  case ne:
123  __ TestAndBranchIfAnySet(value_, mask_, label);
124  break;
125  default:
126  __ Tst(value_, mask_);
127  __ B(cond_, label);
128  }
129  }
#define __

References __, v8::internal::B, cond_, v8::internal::eq, mask_, v8::internal::ne, and value_.

◆ EmitInverted()

virtual void v8::internal::TestAndBranch::EmitInverted ( Label *  label) const
inlinevirtual

Definition at line 131 of file lithium-codegen-arm64.cc.

131  {
132  // The inverse of "all clear" is "any set" and vice versa.
133  switch (cond_) {
134  case eq:
135  __ TestAndBranchIfAnySet(value_, mask_, label);
136  break;
137  case ne:
138  __ TestAndBranchIfAllClear(value_, mask_, label);
139  break;
140  default:
141  __ Tst(value_, mask_);
142  __ B(NegateCondition(cond_), label);
143  }
144  }
Condition NegateCondition(Condition cond)
Definition: constants-arm.h:86

References __, v8::internal::B, cond_, v8::internal::eq, mask_, v8::internal::ne, v8::internal::NegateCondition(), and value_.

+ Here is the call graph for this function:

Member Data Documentation

◆ cond_

Condition v8::internal::TestAndBranch::cond_
private

Definition at line 147 of file lithium-codegen-arm64.cc.

Referenced by Emit(), and EmitInverted().

◆ mask_

uint64_t v8::internal::TestAndBranch::mask_
private

Definition at line 149 of file lithium-codegen-arm64.cc.

Referenced by Emit(), and EmitInverted().

◆ value_

const Register& v8::internal::TestAndBranch::value_
private

Definition at line 148 of file lithium-codegen-arm64.cc.

Referenced by Emit(), and EmitInverted().


The documentation for this class was generated from the following file: