EasyManuals Logo

AMD K5 User Manual

AMD K5
406 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #86 background imageLoading...
Page #86 background image
3-32 Software Environment and Extensions
AMD-K5 Processor Technical Reference Manual 18524C/0Nov1996
3.3.4 RDTSC
mnemonic opcode description
RDTSC 0F31 Read time stamp counter
Privilege: Selectable by TSD bit in CR4
Registers Affected: EAX, EDX
Flags Affected: none
Exceptions Generated: Real, Virtual-8086 modeInvalid Opcode
Protected modeGP (0) if CPL not = 0 when CR4.TSD = 1
The processor’s 64-bit time stamp counter (TSC) increments on each processor clock.
In Real or Protected mode, the counter can be read with the RDMSR instruction and
written with the WRMSR instruction when CPL = 0. However, in Protected mode the
RDTSC instruction can be used to read the counter at privilege levels higher than
CPL = 0.
The required privilege level for using the RDTSC instruction is determined by the
Time Stamp Disable (TSD) bit in CR4, as follows:
CPL = 0Set the TSD bit in CR4 to 1
Any CPLClear the TSD bit in CR4 to 0
The RDTSC instruction reads the counter value into the EDX and EAX registers as
follows:
EDXUpper 32 bits of TSC
EAXLower 32 bits of TSC
The following example shows how the RDTSC instruction can be used. After this
code is executed, EAX and EDX contain the time required to execute the RDTSC
instruction.
mov ecx,10h ;Time Stamp Counter Access via MSRs
mov eax,00000000h ;Initialize the Counter to zero
db 0Fh, 30h ;WRMSR
db 0Fh, 31h ;RDTSC
db 0Fh, 31h ;RDTSC

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the AMD K5 and is the answer not in the manual?

AMD K5 Specifications

General IconGeneral
ManufacturerAMD
ModelK5
Architecturex86
MicroarchitectureK5
Introduction Year1996
Clock Speed75 - 133 MHz
Core Count1
SocketSocket 7
Core steppingSSA/5, 5k86
Voltage3.3V
Transistors4.3 million
L1 Cache8 KB (data) + 16 KB (instruction)
FSB50 MHz to 66 MHz
Process Technology350 nm

Related product manuals