completely wrong. Chebychev (Remez), Padé, and maybe Taylor.
[fmap.git] / x86_64_sse2_x87 / fasm / examples / x86 / include / ext / xsave.inc
blob945fc12ef2f933d77d9991202d6bad9d6b38ff45
1 \r
2 iterate <instr,postbyte>, xsave,4, xrstor,5\r
3 \r
4         macro instr? src*\r
5                 x86.parse_operand @src,src\r
6                 if @src.type = 'mem'\r
7                         x86.store_instruction <0Fh,0AEh>,@src,postbyte\r
8                 else\r
9                         err 'invalid operand'\r
10                 end if\r
11         end macro\r
13         macro instr#64? src*\r
14                 if x86.mode = 64\r
15                         x86.parse_operand @src,src\r
16                         if @src.type = 'mem'\r
17                                 x86.select_operand_prefix @src,8\r
18                                 x86.store_instruction <0Fh,0AEh>,@src,postbyte\r
19                         else\r
20                                 err 'invalid operand'\r
21                         end if\r
22                 else\r
23                         err 'instruction requires long mode'\r
24                 end if\r
25         end macro\r
27 end iterate\r
29 macro xgetbv?\r
30         db 0Fh,1,0D0h\r
31 end macro\r
33 macro xsetbv?\r
34         db 0Fh,1,0D1h\r
35 end macro\r