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

Public Member Functions

 BranchIfNonZeroNumber (LCodeGen *codegen, const FPRegister &value, const FPRegister &scratch)
 
virtual void Emit (Label *label) const
 
virtual void EmitInverted (Label *label) const
 

Private Attributes

const FPRegistervalue_
 
const FPRegisterscratch_
 

Detailed Description

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

Constructor & Destructor Documentation

◆ BranchIfNonZeroNumber()

v8::internal::BranchIfNonZeroNumber::BranchIfNonZeroNumber ( LCodeGen codegen,
const FPRegister value,
const FPRegister scratch 
)
inline

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

Member Function Documentation

◆ Emit()

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

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

160  {
161  __ Fabs(scratch_, value_);
162  // Compare with 0.0. Because scratch_ is positive, the result can be one of
163  // nZCv (equal), nzCv (greater) or nzCV (unordered).
164  __ Fcmp(scratch_, 0.0);
165  __ B(gt, label);
166  }
#define __

References __, v8::internal::B, v8::internal::gt, scratch_, and value_.

◆ EmitInverted()

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

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

168  {
169  __ Fabs(scratch_, value_);
170  __ Fcmp(scratch_, 0.0);
171  __ B(le, label);
172  }

References __, v8::internal::B, v8::internal::le, scratch_, and value_.

Member Data Documentation

◆ scratch_

const FPRegister& v8::internal::BranchIfNonZeroNumber::scratch_
private

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

Referenced by Emit(), and EmitInverted().

◆ value_

const FPRegister& v8::internal::BranchIfNonZeroNumber::value_
private

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

Referenced by Emit(), and EmitInverted().


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