Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::compiler::ffi::NativeFpuRegistersLocation Class Reference

#include <native_location.h>

Inheritance diagram for dart::compiler::ffi::NativeFpuRegistersLocation:
dart::compiler::ffi::NativeLocation dart::ZoneAllocated

Public Member Functions

 NativeFpuRegistersLocation (const NativeType &payload_type, const NativeType &container_type, FpuRegisterKind fpu_reg_kind, intptr_t fpu_register)
 
 NativeFpuRegistersLocation (const NativeType &payload_type, const NativeType &container_type, FpuRegister fpu_register)
 
virtual ~NativeFpuRegistersLocation ()
 
virtual NativeFpuRegistersLocationWithOtherNativeType (Zone *zone, const NativeType &new_payload_type, const NativeType &new_container_type) const
 
virtual bool IsFpuRegisters () const
 
virtual bool IsExpressibleAsLocation () const
 
virtual Location AsLocation () const
 
FpuRegisterKind fpu_reg_kind () const
 
FpuRegister fpu_reg () const
 
virtual void PrintTo (BaseTextBuffer *f) const
 
virtual bool Equals (const NativeLocation &other) const
 
- Public Member Functions inherited from dart::compiler::ffi::NativeLocation
const NativeTypepayload_type () const
 
const NativeTypecontainer_type () const
 
virtual NativeLocationWithOtherNativeType (Zone *zone, const NativeType &new_payload_type, const NativeType &new_container_type) const =0
 
NativeLocationWidenTo4Bytes (Zone *zone) const
 
NativeLocationWidenTo8Bytes (Zone *zone) const
 
virtual bool IsRegisters () const
 
virtual bool IsFpuRegisters () const
 
virtual bool IsStack () const
 
virtual bool IsMultiple () const
 
virtual bool IsPointerToMemory () const
 
virtual bool IsBoth () const
 
virtual bool IsExpressibleAsLocation () const
 
virtual Location AsLocation () const
 
virtual void PrintTo (BaseTextBuffer *f) const
 
const char * ToCString (Zone *zone) const
 
const char * ToCString () const
 
const NativeRegistersLocationAsRegisters () const
 
const NativeFpuRegistersLocationAsFpuRegisters () const
 
const NativeStackLocationAsStack () const
 
const MultipleNativeLocationsAsMultiple () const
 
const PointerToMemoryLocationAsPointerToMemory () const
 
const BothNativeLocationsAsBoth () const
 
virtual NativeLocationSplit (Zone *zone, intptr_t num_parts, intptr_t index) const
 
virtual intptr_t StackTopInBytes () const
 
virtual bool Equals (const NativeLocation &other) const
 
virtual ~NativeLocation ()
 
- Public Member Functions inherited from dart::ZoneAllocated
 ZoneAllocated ()
 
void * operator new (size_t size)
 
void * operator new (size_t size, Zone *zone)
 
void operator delete (void *pointer)
 

Additional Inherited Members

- Static Public Member Functions inherited from dart::compiler::ffi::NativeLocation
static bool LocationCanBeExpressed (Location loc, Representation rep)
 
static NativeLocationFromLocation (Zone *zone, Location loc, Representation rep)
 
static NativeLocationFromPairLocation (Zone *zone, Location loc, Representation rep, intptr_t index)
 
- Protected Member Functions inherited from dart::compiler::ffi::NativeLocation
 NativeLocation (const NativeType &payload_type, const NativeType &container_type)
 

Detailed Description

Definition at line 226 of file native_location.h.

Constructor & Destructor Documentation

◆ NativeFpuRegistersLocation() [1/2]

dart::compiler::ffi::NativeFpuRegistersLocation::NativeFpuRegistersLocation ( const NativeType payload_type,
const NativeType container_type,
FpuRegisterKind  fpu_reg_kind,
intptr_t  fpu_register 
)
inline

Definition at line 228 of file native_location.h.

233 fpu_reg_kind_(fpu_reg_kind),
234 fpu_reg_(fpu_register) {}
const NativeType & container_type() const
NativeLocation(const NativeType &payload_type, const NativeType &container_type)
const NativeType & payload_type() const

◆ NativeFpuRegistersLocation() [2/2]

dart::compiler::ffi::NativeFpuRegistersLocation::NativeFpuRegistersLocation ( const NativeType payload_type,
const NativeType container_type,
FpuRegister  fpu_register 
)
inline

Definition at line 235 of file native_location.h.

239 fpu_reg_kind_(kQuadFpuReg),
240 fpu_reg_(fpu_register) {}

◆ ~NativeFpuRegistersLocation()

virtual dart::compiler::ffi::NativeFpuRegistersLocation::~NativeFpuRegistersLocation ( )
inlinevirtual

Definition at line 255 of file native_location.h.

255{}

Member Function Documentation

◆ AsLocation()

virtual Location dart::compiler::ffi::NativeFpuRegistersLocation::AsLocation ( ) const
inlinevirtual

Reimplemented from dart::compiler::ffi::NativeLocation.

Definition at line 269 of file native_location.h.

269 {
272 }
static Location FpuRegisterLocation(FpuRegister reg)
Definition: locations.h:410
#define ASSERT(E)

◆ Equals()

bool dart::compiler::ffi::NativeFpuRegistersLocation::Equals ( const NativeLocation other) const
virtual

Reimplemented from dart::compiler::ffi::NativeLocation.

Definition at line 235 of file native_location.cc.

235 {
236 if (!other.IsFpuRegisters()) {
237 return false;
238 }
239 auto& other_fpu_reg = other.AsFpuRegisters();
240 if (other_fpu_reg.fpu_reg_kind() != fpu_reg_kind()) {
241 return false;
242 }
243 // We can only compare `fpu_reg_` if the kind is the same.
244 // Q5 is not the same register as (nor overlaps) D5.
245 return other_fpu_reg.fpu_reg_ == fpu_reg_;
246}

◆ fpu_reg()

FpuRegister dart::compiler::ffi::NativeFpuRegistersLocation::fpu_reg ( ) const
inline

Definition at line 275 of file native_location.h.

275 {
276 ASSERT(fpu_reg_kind_ == kQuadFpuReg);
277 return static_cast<FpuRegister>(fpu_reg_);
278 }
QRegister FpuRegister

◆ fpu_reg_kind()

FpuRegisterKind dart::compiler::ffi::NativeFpuRegistersLocation::fpu_reg_kind ( ) const
inline

Definition at line 274 of file native_location.h.

274{ return fpu_reg_kind_; }

◆ IsExpressibleAsLocation()

virtual bool dart::compiler::ffi::NativeFpuRegistersLocation::IsExpressibleAsLocation ( ) const
inlinevirtual

Reimplemented from dart::compiler::ffi::NativeLocation.

Definition at line 265 of file native_location.h.

265 {
266 return fpu_reg_kind_ == kQuadFpuReg;
267 }

◆ IsFpuRegisters()

virtual bool dart::compiler::ffi::NativeFpuRegistersLocation::IsFpuRegisters ( ) const
inlinevirtual

Reimplemented from dart::compiler::ffi::NativeLocation.

Definition at line 264 of file native_location.h.

264{ return true; }

◆ PrintTo()

void dart::compiler::ffi::NativeFpuRegistersLocation::PrintTo ( BaseTextBuffer f) const
virtual

Reimplemented from dart::compiler::ffi::NativeLocation.

Definition at line 308 of file native_location.cc.

308 {
309 switch (fpu_reg_kind()) {
310 case kQuadFpuReg:
311 f->Printf("%s", RegisterNames::FpuRegisterName(fpu_reg()));
312 break;
313#if defined(TARGET_ARCH_ARM)
314 case kDoubleFpuReg:
315 f->Printf("%s", RegisterNames::FpuDRegisterName(fpu_d_reg()));
316 break;
317 case kSingleFpuReg:
318 f->Printf("%s", RegisterNames::FpuSRegisterName(fpu_s_reg()));
319 break;
320#endif // defined(TARGET_ARCH_ARM)
321 default:
323 }
324
325 PrintRepresentations(f, *this);
326}
static const char * FpuRegisterName(FpuRegister reg)
Definition: constants.h:54
static void PrintRepresentations(BaseTextBuffer *f, const NativeLocation &loc)
#define UNREACHABLE_THIS()
Definition: native_type.h:25

◆ WithOtherNativeType()

virtual NativeFpuRegistersLocation & dart::compiler::ffi::NativeFpuRegistersLocation::WithOtherNativeType ( Zone zone,
const NativeType new_payload_type,
const NativeType new_container_type 
) const
inlinevirtual

Implements dart::compiler::ffi::NativeLocation.

Definition at line 257 of file native_location.h.

260 {
261 return *new (zone) NativeFpuRegistersLocation(
262 new_payload_type, new_container_type, fpu_reg_kind_, fpu_reg_);
263 }
NativeFpuRegistersLocation(const NativeType &payload_type, const NativeType &container_type, FpuRegisterKind fpu_reg_kind, intptr_t fpu_register)

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