| 1 |
(* x86instr-ext.sml |
| 2 |
* |
| 3 |
* COPYRIGHT (c) 2000 Bell Labs, Lucent Technologies |
| 4 |
* |
| 5 |
* extensions to the x86 instruction set. |
| 6 |
*) |
| 7 |
|
| 8 |
structure X86InstrExt = struct |
| 9 |
datatype fsz = single | double | extended |
| 10 |
|
| 11 |
datatype ('s, 'r, 'f, 'c) sext |
| 12 |
(* push an integer value onto the H/W stack *) |
| 13 |
= PUSHL of 'r |
| 14 |
| POP of 'r |
| 15 |
|
| 16 |
(* FSTPS/L/T is a way of pulling things off the floating point |
| 17 |
* stack and must therefore take FREG f as argument |
| 18 |
*) |
| 19 |
| FSTPS of 'f |
| 20 |
| FSTPL of 'f |
| 21 |
| FSTPT of 'f |
| 22 |
|
| 23 |
| LEAVE |
| 24 |
| RET of 'r |
| 25 |
|
| 26 |
| LOCK_CMPXCHGL of ('r * 'r) |
| 27 |
|
| 28 |
| PAUSE (* improves performance of spin-wait loops *) |
| 29 |
(* performs a serializing operation on all load-from-memory and store-to-memory |
| 30 |
* operations issued prior to the mfence instruction. |
| 31 |
*) |
| 32 |
| MFENCE |
| 33 |
(* performs a serializing operation on all load-to-memory operations issued prior to |
| 34 |
* the lfence instruction. |
| 35 |
*) |
| 36 |
| LFENCE |
| 37 |
(* performs a serializing operation on all store-to-memory operations issued prior to |
| 38 |
* the sfence instruction. |
| 39 |
*) |
| 40 |
| SFENCE |
| 41 |
|
| 42 |
|
| 43 |
end |