Displaying 2 results from an estimated 2 matches for "xstate_opmask".
2013 Nov 19
6
[PATCH 2/5] X86 architecture instruction set extension definiation
...*/
@@ -327,14 +321,33 @@ unsigned int xstate_ctxt_size(u64 xcr0)
return ebx;
}
+static bool_t valid_xcr0(u64 xcr0)
+{
+ if ( !(xcr0 & XSTATE_FP) )
+ return 0;
+
+ if ( (xcr0 & XSTATE_YMM) && !(xcr0 & XSTATE_SSE) )
+ return 0;
+
+ if ( xcr0 & (XSTATE_OPMASK | XSTATE_ZMM | XSTATE_HI_ZMM) )
+ {
+ if ( !(xcr0 & XSTATE_YMM) )
+ return 0;
+
+ if ( ~xcr0 & (XSTATE_OPMASK | XSTATE_ZMM | XSTATE_HI_ZMM) )
+ return 0;
+ }
+
+ return !(xcr0 & XSTATE_BNDREGS) == !(xcr0 & XSTATE_BNDCSR);
+}
+
int valida...
2013 Nov 25
0
[PATCH 2/4 V2] X86: enable support for new ISA extensions
...turn ebx;
}
+static bool_t valid_xcr0(u64 xcr0)
+{
+ /* FP must be unconditionally set. */
+ if ( !(xcr0 & XSTATE_FP) )
+ return 0;
+
+ /* YMM depends on SSE. */
+ if ( (xcr0 & XSTATE_YMM) && !(xcr0 & XSTATE_SSE) )
+ return 0;
+
+ if ( xcr0 & (XSTATE_OPMASK | XSTATE_ZMM | XSTATE_HI_ZMM) )
+ {
+ /* OPMASK, ZMM, and HI_ZMM require YMM. */
+ if ( !(xcr0 & XSTATE_YMM) )
+ return 0;
+
+ /* OPMASK, ZMM, and HI_ZMM must be the same. */
+ if ( ~xcr0 & (XSTATE_OPMASK | XSTATE_ZMM | XSTATE_HI_ZMM) )
+...