Skip to content

Commit

Permalink
add XGETV
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Jan 16, 2012
1 parent cb49cd5 commit 4b699fa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/backend/ptrntab.c
Expand Up @@ -2938,6 +2938,7 @@ getsec
*/


OPTABLE0(XGETBV, XGETBV, _modaxdx);


//////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -3639,6 +3640,7 @@ getsec
X("wrmsr", 0, aptb0WRMSR ) \
X("xadd", 2, (P) aptb2XADD ) \
X("xchg", 2, (P) aptb2XCHG ) \
X("xgetbv", 0, aptb0XGETBV ) \
X("xlat", ITopt | 1, (P) aptb1XLAT ) \
X("xlatb", 0, aptb0XLATB ) \
X("xor", 2, (P) aptb2XOR ) \
Expand Down
3 changes: 3 additions & 0 deletions src/backend/xmm.h
Expand Up @@ -299,4 +299,7 @@ enum
// POPCNT and LZCNT (have their own CPUID bits)
POPCNT = 0xF30FB8,
// LZCNT

// AVX
XGETBV = 0x0F01D0,
};
2 changes: 2 additions & 0 deletions test/runnable/iasm.d
Expand Up @@ -2257,6 +2257,7 @@ void test23()
0xDD, 0x4D, 0xE0, // fisttp long64 ptr -010h[EBP]
0x0F, 0x01, 0xC8, // monitor
0x0F, 0x01, 0xC9, // mwait
0x0F, 0x01, 0xD0, // xgetbv

0x66, 0x0F, 0xD0, 0xCA, // addsubpd XMM1,XMM2
0x66, 0x0F, 0xD0, 0x4D, 0xE8, // addsubpd XMM1,-010h[EBP]
Expand Down Expand Up @@ -2296,6 +2297,7 @@ void test23()

monitor ;
mwait ;
xgetbv ;

addsubpd XMM1,XMM2 ;
addsubpd XMM1,m128[EBP] ;
Expand Down
2 changes: 2 additions & 0 deletions test/runnable/iasm64.d
Expand Up @@ -2244,6 +2244,7 @@ void test23()
0xDD, 0x4D, 0xD8, // fisttp long64 ptr -028h[RBP]
0x0F, 0x01, 0xC8, // monitor
0x0F, 0x01, 0xC9, // mwait
0x0F, 0x01, 0xD0, // xgetbv

0x66, 0x0F, 0xD0, 0xCA, // addsubpd XMM1,XMM2
0x66, 0x0F, 0xD0, 0x4D, 0xE0, // addsubpd XMM1,-020h[RBP]
Expand Down Expand Up @@ -2283,6 +2284,7 @@ void test23()

monitor ;
mwait ;
xgetbv ;

addsubpd XMM1,XMM2 ;
addsubpd XMM1,m128[RBP] ;
Expand Down

0 comments on commit 4b699fa

Please sign in to comment.