[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT/INTEL-INTRINSICS PATCH v2 3/3] Implement _mm_getcsr and _mm_setcsr
Hey Felipe, The patch looks great, thanks! Vlad Reviewed-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx> On 6/16/19 12:29 AM, Felipe Huici wrote: > Signed-off-by: Felipe Huici <felipe.huici@xxxxxxxxx> > --- > include/xmmintrin.h | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/include/xmmintrin.h b/include/xmmintrin.h > index 0b271b3..a630e48 100644 > --- a/include/xmmintrin.h > +++ b/include/xmmintrin.h > @@ -3101,6 +3101,20 @@ static inline void __DEFAULT_FN_ATTRS _mm_pause(void) > #undef __DEFAULT_FN_ATTRS > #undef __DEFAULT_FN_ATTRS_MMX > > +/* Set the control register to I. */ > +extern __inline void __attribute__((__gnu_inline__, __always_inline__, > __artificial__)) > +_mm_setcsr (unsigned int __I) > +{ > + __builtin_ia32_ldmxcsr (__I); > +} > + > +/* Return the contents of the control register. */ > +extern __inline unsigned int __attribute__((__gnu_inline__, > __always_inline__, __artificial__)) > +_mm_getcsr (void) > +{ > + return __builtin_ia32_stmxcsr (); > +} > + > /* Ugly hack for backwards-compatibility (compatible with gcc) */ > #ifdef __GNUC__ > #include <emmintrin.h> _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |