V8 Project
v8::internal::XMMRegister Struct Reference

#include <assembler-ia32.h>

+ Collaboration diagram for v8::internal::XMMRegister:

Public Member Functions

bool is_valid () const
 
int code () const
 
bool is (XMMRegister reg) const
 
bool is_valid () const
 
bool is (XMMRegister reg) const
 
int code () const
 
int high_bit () const
 
int low_bits () const
 

Static Public Member Functions

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

Public Attributes

int code_
 

Static Public Attributes

static const int kMaxNumAllocatableRegisters = 7
 
static const int kMaxNumRegisters = 8
 

Detailed Description

Definition at line 144 of file assembler-ia32.h.

Member Function Documentation

◆ AllocationIndexToString() [1/2]

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

Definition at line 182 of file assembler-ia32.h.

182  {
183  DCHECK(index >= 0 && index < kMaxNumAllocatableRegisters);
184  const char* const names[] = {
185  "xmm1",
186  "xmm2",
187  "xmm3",
188  "xmm4",
189  "xmm5",
190  "xmm6",
191  "xmm7"
192  };
193  return names[index];
194  }
#define DCHECK(condition)
Definition: logging.h:205
static const int kMaxNumAllocatableRegisters

References DCHECK, and kMaxNumAllocatableRegisters.

◆ AllocationIndexToString() [2/2]

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

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

219  {
220  DCHECK(index >= 0 && index < kMaxNumAllocatableRegisters);
221  const char* const names[] = {
222  "xmm1",
223  "xmm2",
224  "xmm3",
225  "xmm4",
226  "xmm5",
227  "xmm6",
228  "xmm7",
229  "xmm8",
230  "xmm9",
231  "xmm10",
232  "xmm11",
233  "xmm12",
234  "xmm13",
235  "xmm14",
236  "xmm15"
237  };
238  return names[index];
239  }

References DCHECK, and kMaxNumAllocatableRegisters.

◆ code() [1/2]

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

Definition at line 175 of file assembler-ia32.h.

175  {
176  DCHECK(is_valid());
177  return code_;
178  }

References code_, DCHECK, and is_valid().

Referenced by v8::internal::Assembler::emit_optional_rex_32(), v8::internal::Assembler::emit_rex_64(), 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::XMMRegister::code ( ) const
inline

Definition at line 249 of file assembler-x64.h.

249  {
250  DCHECK(is_valid());
251  return code_;
252  }

References code_, DCHECK, and is_valid().

+ Here is the call graph for this function:

◆ from_code() [1/2]

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

Definition at line 166 of file assembler-ia32.h.

166  {
167  XMMRegister result = { code };
168  return result;
169  }

References code().

Referenced by FromAllocationIndex(), v8::internal::RecordWriteStub::RegisterAllocation::RestoreCallerSaveRegisters(), and v8::internal::RecordWriteStub::RegisterAllocation::SaveCallerSaveRegisters().

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

◆ from_code() [2/2]

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

Definition at line 241 of file assembler-x64.h.

241  {
242  DCHECK(code >= 0);
244  XMMRegister r = { code };
245  return r;
246  }
static const int kMaxNumRegisters

References code(), DCHECK, and kMaxNumRegisters.

+ Here is the call graph for this function:

◆ FromAllocationIndex() [1/2]

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

Definition at line 161 of file assembler-ia32.h.

161  {
162  DCHECK(index >= 0 && index < kMaxNumAllocatableRegisters);
163  return from_code(index + 1);
164  }
static XMMRegister from_code(int code)

References DCHECK, from_code(), and kMaxNumAllocatableRegisters.

+ Here is the call graph for this function:

◆ FromAllocationIndex() [2/2]

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

Definition at line 213 of file assembler-x64.h.

213  {
214  DCHECK(0 <= index && index < kMaxNumAllocatableRegisters);
215  XMMRegister result = { index + 1 };
216  return result;
217  }

References DCHECK, and kMaxNumAllocatableRegisters.

◆ high_bit()

int v8::internal::XMMRegister::high_bit ( ) const
inline

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

256  {
257  return code_ >> 3;
258  }

References code_.

◆ is() [1/2]

bool v8::internal::XMMRegister::is ( XMMRegister  reg) const
inline

Definition at line 180 of file assembler-ia32.h.

180 { return code_ == reg.code_; }

References code_.

◆ is() [2/2]

bool v8::internal::XMMRegister::is ( XMMRegister  reg) const
inline

Definition at line 248 of file assembler-x64.h.

248 { return code_ == reg.code_; }

References code_.

◆ is_valid() [1/2]

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

Definition at line 171 of file assembler-ia32.h.

171  {
172  return 0 <= code_ && code_ < kMaxNumRegisters;
173  }

References code_, and kMaxNumRegisters.

Referenced by code().

+ Here is the caller graph for this function:

◆ is_valid() [2/2]

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

Definition at line 247 of file assembler-x64.h.

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

References code_, and kMaxNumRegisters.

◆ low_bits()

int v8::internal::XMMRegister::low_bits ( ) const
inline

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

261  {
262  return code_ & 0x7;
263  }

References code_.

◆ NumAllocatableAliasedRegisters() [1/2]

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

Definition at line 152 of file assembler-ia32.h.

152  {
153  return NumAllocatableRegisters();
154  }
static int NumAllocatableRegisters()

References NumAllocatableRegisters().

+ Here is the call graph for this function:

◆ NumAllocatableAliasedRegisters() [2/2]

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

Definition at line 204 of file assembler-x64.h.

204  {
205  return NumAllocatableRegisters();
206  }

References NumAllocatableRegisters().

+ Here is the call graph for this function:

◆ NumAllocatableRegisters() [1/2]

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

Definition at line 147 of file assembler-ia32.h.

147  {
149  }

References kMaxNumAllocatableRegisters.

Referenced by NumAllocatableAliasedRegisters().

+ Here is the caller graph for this function:

◆ NumAllocatableRegisters() [2/2]

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

Definition at line 199 of file assembler-x64.h.

199  {
201  }

References kMaxNumAllocatableRegisters.

◆ ToAllocationIndex() [1/2]

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

Definition at line 156 of file assembler-ia32.h.

156  {
157  DCHECK(reg.code() != 0);
158  return reg.code() - 1;
159  }

References code(), and DCHECK.

+ Here is the call graph for this function:

◆ ToAllocationIndex() [2/2]

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

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

208  {
209  DCHECK(reg.code() != 0);
210  return reg.code() - 1;
211  }

References DCHECK.

Member Data Documentation

◆ code_

int v8::internal::XMMRegister::code_

Definition at line 196 of file assembler-ia32.h.

Referenced by code(), high_bit(), is(), is_valid(), and low_bits().

◆ kMaxNumAllocatableRegisters

static const int v8::internal::XMMRegister::kMaxNumAllocatableRegisters = 7
static

◆ kMaxNumRegisters


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