V8 Project
v8::internal::FPURegister Struct Reference

#include <assembler-mips.h>

+ Collaboration diagram for v8::internal::FPURegister:

Public Member Functions

bool is_valid () const
 
bool is (FPURegister creg) const
 
FPURegister low () const
 
FPURegister high () const
 
int code () const
 
int bit () const
 
void setcode (int f)
 
bool is_valid () const
 
bool is (FPURegister creg) const
 
FPURegister low () const
 
FPURegister high () const
 
int code () const
 
int bit () const
 
void setcode (int f)
 

Static Public Member Functions

static int NumRegisters ()
 
static int NumAllocatableRegisters ()
 
static int NumAllocatableAliasedRegisters ()
 
static int ToAllocationIndex (FPURegister reg)
 
static const char * AllocationIndexToString (int index)
 
static FPURegister FromAllocationIndex (int index)
 
static FPURegister from_code (int code)
 
static int NumRegisters ()
 
static int NumAllocatableRegisters ()
 
static int NumAllocatableAliasedRegisters ()
 
static int ToAllocationIndex (FPURegister reg)
 
static const char * AllocationIndexToString (int index)
 
static FPURegister FromAllocationIndex (int index)
 
static FPURegister from_code (int code)
 

Public Attributes

int code_
 

Static Public Attributes

static const int kMaxNumRegisters = v8::internal::kNumFPURegisters
 
static const int kNumReservedRegisters = 2
 
static const int kMaxNumAllocatableRegisters
 

Detailed Description

Definition at line 208 of file assembler-mips.h.

Member Function Documentation

◆ AllocationIndexToString() [1/2]

static const char* v8::internal::FPURegister::AllocationIndexToString ( int  index)
static

◆ AllocationIndexToString() [2/2]

static const char* v8::internal::FPURegister::AllocationIndexToString ( int  index)
static

◆ bit() [1/2]

int v8::internal::FPURegister::bit ( ) const
inline

Definition at line 265 of file assembler-mips.h.

265  {
266  DCHECK(is_valid());
267  return 1 << code_;
268  }
#define DCHECK(condition)
Definition: logging.h:205

References code_, DCHECK, and is_valid().

+ Here is the call graph for this function:

◆ bit() [2/2]

int v8::internal::FPURegister::bit ( ) const
inline

Definition at line 256 of file assembler-mips64.h.

256  {
257  DCHECK(is_valid());
258  return 1 << code_;
259  }

References code_, DCHECK, and is_valid().

+ Here is the call graph for this function:

◆ code() [1/2]

int v8::internal::FPURegister::code ( ) const
inline

Definition at line 261 of file assembler-mips.h.

261  {
262  DCHECK(is_valid());
263  return code_;
264  }

References code_, DCHECK, and is_valid().

Referenced by from_code(), and ToAllocationIndex().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ code() [2/2]

int v8::internal::FPURegister::code ( ) const
inline

Definition at line 252 of file assembler-mips64.h.

252  {
253  DCHECK(is_valid());
254  return code_;
255  }

References code_, DCHECK, and is_valid().

+ Here is the call graph for this function:

◆ from_code() [1/2]

static FPURegister v8::internal::FPURegister::from_code ( int  code)
inlinestatic

Definition at line 237 of file assembler-mips.h.

237  {
238  FPURegister r = { code };
239  return r;
240  }

References code().

Referenced by FromAllocationIndex().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ from_code() [2/2]

static FPURegister v8::internal::FPURegister::from_code ( int  code)
inlinestatic

Definition at line 226 of file assembler-mips64.h.

226  {
227  FPURegister r = { code };
228  return r;
229  }

References code().

+ Here is the call graph for this function:

◆ FromAllocationIndex() [1/2]

static FPURegister v8::internal::FPURegister::FromAllocationIndex ( int  index)
inlinestatic

Definition at line 232 of file assembler-mips.h.

232  {
233  DCHECK(index >= 0 && index < kMaxNumAllocatableRegisters);
234  return from_code(index * 2);
235  }
static const int kMaxNumAllocatableRegisters
static FPURegister from_code(int code)

References DCHECK, from_code(), and kMaxNumAllocatableRegisters.

+ Here is the call graph for this function:

◆ FromAllocationIndex() [2/2]

static FPURegister v8::internal::FPURegister::FromAllocationIndex ( int  index)
inlinestatic

Definition at line 221 of file assembler-mips64.h.

221  {
222  DCHECK(index >= 0 && index < kMaxNumAllocatableRegisters);
223  return from_code(index * 2);
224  }

References DCHECK, from_code(), and kMaxNumAllocatableRegisters.

+ Here is the call graph for this function:

◆ high() [1/2]

FPURegister v8::internal::FPURegister::high ( ) const
inline

Definition at line 252 of file assembler-mips.h.

252  {
253  // Find high reg of a Doubel-reg pair, which is reg + 1.
254  DCHECK(code_ % 2 == 0); // Specified Double reg must be even.
255  FPURegister reg;
256  reg.code_ = code_ + 1;
257  DCHECK(reg.is_valid());
258  return reg;
259  }

References code_, DCHECK, and is_valid().

+ Here is the call graph for this function:

◆ high() [2/2]

FPURegister v8::internal::FPURegister::high ( ) const
inline

Definition at line 242 of file assembler-mips64.h.

242  {
243  // TODO(plind): Create DCHECK for FR=0 mode. This usage illegal in FR=1.
244  // Find high reg of a Doubel-reg pair, which is reg + 1.
245  DCHECK(code_ % 2 == 0); // Specified Double reg must be even.
246  FPURegister reg;
247  reg.code_ = code_ + 1;
248  DCHECK(reg.is_valid());
249  return reg;
250  }

References code_, DCHECK, and is_valid().

+ Here is the call graph for this function:

◆ is() [1/2]

bool v8::internal::FPURegister::is ( FPURegister  creg) const
inline

Definition at line 243 of file assembler-mips.h.

243 { return code_ == creg.code_; }

References code_.

Referenced by v8::internal::MacroAssembler::Move(), and ToAllocationIndex().

+ Here is the caller graph for this function:

◆ is() [2/2]

bool v8::internal::FPURegister::is ( FPURegister  creg) const
inline

Definition at line 232 of file assembler-mips64.h.

232 { return code_ == creg.code_; }

References code_.

◆ is_valid() [1/2]

bool v8::internal::FPURegister::is_valid ( ) const
inline

Definition at line 242 of file assembler-mips.h.

242 { return 0 <= code_ && code_ < kMaxNumRegisters ; }
static const int kMaxNumRegisters

References code_, and kMaxNumRegisters.

Referenced by bit(), code(), high(), low(), setcode(), and ToAllocationIndex().

+ Here is the caller graph for this function:

◆ is_valid() [2/2]

bool v8::internal::FPURegister::is_valid ( ) const
inline

Definition at line 231 of file assembler-mips64.h.

231 { return 0 <= code_ && code_ < kMaxNumRegisters ; }

References code_, and kMaxNumRegisters.

◆ low() [1/2]

FPURegister v8::internal::FPURegister::low ( ) const
inline

Definition at line 244 of file assembler-mips.h.

244  {
245  // Find low reg of a Double-reg pair, which is the reg itself.
246  DCHECK(code_ % 2 == 0); // Specified Double reg must be even.
247  FPURegister reg;
248  reg.code_ = code_;
249  DCHECK(reg.is_valid());
250  return reg;
251  }

References code_, DCHECK, and is_valid().

+ Here is the call graph for this function:

◆ low() [2/2]

FPURegister v8::internal::FPURegister::low ( ) const
inline

Definition at line 233 of file assembler-mips64.h.

233  {
234  // TODO(plind): Create DCHECK for FR=0 mode. This usage suspect for FR=1.
235  // Find low reg of a Double-reg pair, which is the reg itself.
236  DCHECK(code_ % 2 == 0); // Specified Double reg must be even.
237  FPURegister reg;
238  reg.code_ = code_;
239  DCHECK(reg.is_valid());
240  return reg;
241  }

References code_, DCHECK, and is_valid().

+ Here is the call graph for this function:

◆ NumAllocatableAliasedRegisters() [1/2]

static int v8::internal::FPURegister::NumAllocatableAliasedRegisters ( )
inlinestatic

◆ NumAllocatableAliasedRegisters() [2/2]

static int v8::internal::FPURegister::NumAllocatableAliasedRegisters ( )
inlinestatic

◆ NumAllocatableRegisters() [1/2]

static int v8::internal::FPURegister::NumAllocatableRegisters ( )
inlinestatic

◆ NumAllocatableRegisters() [2/2]

static int v8::internal::FPURegister::NumAllocatableRegisters ( )
inlinestatic

◆ NumRegisters() [1/2]

static int v8::internal::FPURegister::NumRegisters ( )
inlinestatic

◆ NumRegisters() [2/2]

static int v8::internal::FPURegister::NumRegisters ( )
inlinestatic

◆ setcode() [1/2]

void v8::internal::FPURegister::setcode ( int  f)
inline

Definition at line 269 of file assembler-mips.h.

269  {
270  code_ = f;
271  DCHECK(is_valid());
272  }

References code_, DCHECK, and is_valid().

+ Here is the call graph for this function:

◆ setcode() [2/2]

void v8::internal::FPURegister::setcode ( int  f)
inline

Definition at line 260 of file assembler-mips64.h.

260  {
261  code_ = f;
262  DCHECK(is_valid());
263  }

References code_, DCHECK, and is_valid().

+ Here is the call graph for this function:

◆ ToAllocationIndex() [1/2]

int v8::internal::FPURegister::ToAllocationIndex ( FPURegister  reg)
inlinestatic

Definition at line 107 of file assembler-mips-inl.h.

107  {
108  DCHECK(reg.code() % 2 == 0);
109  DCHECK(reg.code() / 2 < kMaxNumAllocatableRegisters);
110  DCHECK(reg.is_valid());
111  DCHECK(!reg.is(kDoubleRegZero));
112  DCHECK(!reg.is(kLithiumScratchDouble));
113  return (reg.code() / 2);
114 }
#define kDoubleRegZero
#define kLithiumScratchDouble

References code(), DCHECK, is(), is_valid(), kDoubleRegZero, kLithiumScratchDouble, and kMaxNumAllocatableRegisters.

+ Here is the call graph for this function:

◆ ToAllocationIndex() [2/2]

static int v8::internal::FPURegister::ToAllocationIndex ( FPURegister  reg)
inlinestatic

Member Data Documentation

◆ code_

int v8::internal::FPURegister::code_

Definition at line 274 of file assembler-mips.h.

Referenced by bit(), code(), high(), is(), is_valid(), low(), and setcode().

◆ kMaxNumAllocatableRegisters

static const int v8::internal::FPURegister::kMaxNumAllocatableRegisters
static
Initial value:

Definition at line 220 of file assembler-mips.h.

Referenced by FromAllocationIndex(), and ToAllocationIndex().

◆ kMaxNumRegisters

static const int v8::internal::FPURegister::kMaxNumRegisters = v8::internal::kNumFPURegisters
static

Definition at line 209 of file assembler-mips.h.

Referenced by is_valid().

◆ kNumReservedRegisters

static const int v8::internal::FPURegister::kNumReservedRegisters = 2
static

Definition at line 219 of file assembler-mips.h.


The documentation for this struct was generated from the following files: