git-svn-id: trunk@33418 -
@@ -14997,6 +14997,7 @@ tests/webtbs/tw29893.pp svneol=native#text/pascal
tests/webtbs/tw29912.pp svneol=native#text/plain
tests/webtbs/tw29923.pp svneol=native#text/plain
tests/webtbs/tw29930.pp svneol=native#text/plain
+tests/webtbs/tw29958.pp svneol=native#text/pascal
tests/webtbs/tw2998.pp svneol=native#text/plain
tests/webtbs/tw2999.pp svneol=native#text/plain
tests/webtbs/tw3004.pp svneol=native#text/plain
@@ -1033,5 +1033,6 @@
'xend',
'xtest',
'rdrand',
-'rdseed'
+'rdseed',
+'xgetbv'
);
@@ -1033,5 +1033,6 @@ attsufNONE,
attsufNONE,
+attsufNONE,
attsufNONE
@@ -1,2 +1,2 @@
{ don't edit, this file is generated from x86ins.dat }
-1951;
+1952;
@@ -1033,5 +1033,6 @@ A_XABORT,
A_XEND,
A_XTEST,
A_RDRAND,
-A_RDSEED
+A_RDSEED,
+A_XGETBV
(Ch: (Ch_None, Ch_None, Ch_None)),
(Ch: (Ch_WFlags, Ch_None, Ch_None)),
(Ch: (Ch_Wop1, Ch_WFlags, CH_None)),
-(Ch: (Ch_Wop1, Ch_WFlags, CH_None))
+(Ch: (Ch_Wop1, Ch_WFlags, CH_None)),
+(Ch: (Ch_WEAX, Ch_WEDX, Ch_RECX))
@@ -13656,5 +13656,12 @@
optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none,ot_none);
code : #208#2#15#199#135;
flags : if_rand
+ ),
+ (
+ opcode : A_XGETBV;
+ ops : 0;
+ optypes : (ot_none,ot_none,ot_none,ot_none);
+ code : #3#15#1#208;
+ flags : if_xsave
)
@@ -1047,5 +1047,6 @@
@@ -1047,5 +1047,6 @@ attsufNONE,
-1983;
+1984;
@@ -1047,5 +1047,6 @@ A_XABORT,
@@ -13880,5 +13880,12 @@
@@ -449,6 +449,7 @@ implementation
IF_FMA4 = $00200000;
IF_TSX = $00200000;
IF_RAND = $00200000;
+ IF_XSAVE = $00200000;
IF_PLEVEL = $0F000000; { mask for processor level }
IF_8086 = $00000000; { 8086 instruction }
@@ -5410,3 +5410,11 @@ reg16|32|64 \320\2\x0F\xC7\206 RAND
[RDSEED]
(Ch_Wop1, Ch_WFlags, CH_None)
reg16|32|64 \320\2\x0F\xC7\207 RAND
+
+;*******************************************************************************
+;********** XSAVE **************************************************************
+[XGETBV]
+(Ch_WEAX, Ch_WEDX, Ch_RECX)
+void \3\x0F\x01\xD0 XSAVE
@@ -1027,5 +1027,6 @@ attsufNONE,
@@ -1027,5 +1027,6 @@
-1972;
+1973;
@@ -1027,5 +1027,6 @@ A_XABORT,
@@ -13803,5 +13803,12 @@
@@ -0,0 +1,25 @@
+{ %CPU=i386,x86_64 }
+{ %norun }
+const
+ expected_code : array[0..2] of byte = ($0f,$01,$D0);
+procedure proc;assembler;nostackframe;
+ asm
+ xgetbv
+ end;
+var
+ P : pointer;
+ i : integer;
+begin
+ for i:=0 to high(expected_code) do
+ if (pbyte(@proc)+i)^<>expected_code[i] then
+ begin
+ writeln('Error at pos ',i,'. Expected $',hexstr(expected_code[i],2),' got $',hexstr((pbyte(@proc)+i)^,2));
+ halt(1);
+ writeln('ok');
+end.