Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
base::internal::SaturateFastAsmOp< Dst, Src > Struct Template Reference

#include <safe_conversions.h>

Public Member Functions

 __attribute__ ((always_inline)) static Dst Do(Src value)
 

Static Public Member Functions

static constexpr Dst Do (Src)
 

Static Public Attributes

static constexpr bool is_supported = false
 

Detailed Description

template<typename Dst, typename Src>
struct base::internal::SaturateFastAsmOp< Dst, Src >

Definition at line 31 of file safe_conversions.h.

Member Function Documentation

◆ __attribute__()

template<typename Dst , typename Src >
base::internal::SaturateFastAsmOp< Dst, Src >::__attribute__ ( (always_inline)  )
inline

Definition at line 27 of file safe_conversions_arm_impl.h.

27 {
28 int32_t src = value;
30 uint32_t>::type result;
32 asm("ssat %[dst], %[shift], %[src]"
33 : [dst] "=r"(result)
34 : [src] "r"(src), [shift] "n"(IntegerBitsPlusSign<Dst>::value <= 32
36 : 32));
37 } else {
38 asm("usat %[dst], %[shift], %[src]"
39 : [dst] "=r"(result)
40 : [src] "r"(src), [shift] "n"(IntegerBitsPlusSign<Dst>::value < 32
42 : 31));
43 }
44 return static_cast<Dst>(result);
45 }
GLenum type
uint8_t value
GAsyncResult * result
dst
Definition: cp.py:12

◆ Do()

template<typename Dst , typename Src >
static constexpr Dst base::internal::SaturateFastAsmOp< Dst, Src >::Do ( Src  )
inlinestaticconstexpr

Definition at line 33 of file safe_conversions.h.

33 {
34 // Force a compile failure if instantiated.
35 return CheckOnFailure::template HandleFailure<Dst>();
36 }

Member Data Documentation

◆ is_supported

template<typename Dst , typename Src >
static constexpr bool base::internal::SaturateFastAsmOp< Dst, Src >::is_supported = false
staticconstexpr

Definition at line 32 of file safe_conversions.h.


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