Specifications
Intel
®
 Quark SoC X1000 Core
October 2013 Developer’s Manual
Order Number: 329679-001US 263
Instruction Set Summary—Intel
®
 Quark Core
12.2.5 Intel
®
 Quark SoC X1000 Core Instructions 
The instructions below were added to the Intel
®
 Quark SoC X1000 Core (in microcode 
and in hardware for RDTSC). 
12.2.5.1 CMPXCHG8B - Compare and Exchange Bytes
Description
Compares the 64-bit value in EDX:EAX (or 128-bit value in RDX:RAX if operand size is 
128 bits) with the operand (destination operand). If the values are equal, the 64-bit 
value in ECX:EBX (or 128-bit value in RCX:RBX) is stored in the destination operand. 
Otherwise, the value in the destination operand is loaded into EDX:EAX (or RDX:RAX). 
The destination operand is an 8-byte memory location (or 16-byte memory location if 
operand size is 128 bits). For the EDX:EAX and ECX:EBX register pairs, EDX and ECX 
contain the high-order 32 bits and EAX and EBX contain the loworder 32 bits of a 64-bit 
value. For the RDX:RAX and RCX:RBX register pairs, RDX and RCX contain the high-
order 64 bits and RAX and RBX contain the low-order 64 bits of a 128-bit value.
This instruction can be used with a LOCK prefix to allow the instruction to be executed 
atomically. To simplify the interface to the processor’s bus, the destination operand 
receives a write cycle without regard to the result of the comparison. The destination 
operand is written back if the comparison fails; otherwise, the source operand is 
written into the destination. (The processor never produces a locked read without also 
producing a locked write.)
Table 88. Encoding of Floating-Point Instruction Fields
Instruction
Optional
Fields
 First Byte Second Byte
1  11011 OPA 1 mod 1 OPB r/m s-i-b disp
2  11011 MF OPA mod OPB r/m s-i-b disp
3  11011 d P OPA 1 1 OPB ST(i)
4  11011 0 0 1 1 1 1 OP
5  11011 0 1 1 1 1 1 OP
 15–11 10 9 8 7 6 5 4 3 2 1  0
Table Key:
OP = Instruction opcode, 
possibly split into two fields OPA 
and OPB
MF = Memory Format
00–32-bit real
01–32-bit integer
10–64-bit real
11–16-bit integer
P=Pop
0–Do not pop stack
1–Pop stack after operation
d = Destination
0–Destination is ST(0)
1–Destination is ST(i)
R XOR d=0–Destination (op) 
Source
R XOR d=1–Source (op) 
Destination
ST(i)=Register stack element i
000 = Stack top
001 = Second stack element
111 = Eighth stack element
CMPXCHG8B CoMPare and eXCHanGe 8 Bytes
RDMSR  ReaD from Model-Specific Register
RDTSC ReaD Time Stamp Counter
WRMSR  WRite to Model-Specific Register










