1 /* { dg-do compile } */
2 /* { dg-options "-O2 -msgx" } */
3 /* { dg-final { scan-assembler-times "enclu" 2 } } */
4 /* { dg-final { scan-assembler-times "encls" 2 } } */
5 /* { dg-final { scan-assembler-times "enclv" 2 } } */
9 extern unsigned int leaf
;
11 #define SGX_EENTER 0x02
12 #define SGX_EBLOCK 0x09
13 #define SGX_EINCVIRTCHILD 0x01
22 unsigned int res1
= _encls_u32 (leaf
, test
);
23 unsigned int res2
= _enclu_u32 (leaf
, test
);
24 unsigned int res5
= _enclv_u32 (leaf
, test
);
26 unsigned int res3
= _encls_u32 (SGX_EBLOCK
, test
);
27 unsigned int res4
= _enclu_u32 (SGX_EENTER
, test
);
28 unsigned int res6
= _enclv_u32 (SGX_EINCVIRTCHILD
, test
);