Re: clock cycle values AMD manual
- From: "Alexei A. Frounze" <spamtrap@xxxxxxxxxx>
- Date: Sun, 18 May 2008 01:07:09 -0700 (PDT)
On May 17, 4:11 am, roger21 <spamt...@xxxxxxxxxx> wrote:
hi,
just a newb question : where do i get the length of each instruction or
at last the number of clock cycle for each instruction in the amd docs ?
thx
The length of an instruction adds up from these components:
- its prefixes (segment override, lock, rep(e/ne), operand size
override, address size override, and if 64-bit mode, REX). These can
be combined and with the exception of the REX prefix the order is
arbitrary.
- its opcode byte(s): there're single-byte opcodes and two-byte
opcodes (the first in the two-byte one is 0fh). Intel seems to have a
few three-byte opcodes among new multimedia instructions.
- ModR/M byte, potentially followed by a SIB byte, potentially
followed by an 8/16/32 displacement. These add up to 1 to 6 bytes.
- any immediate operands, whose size depends on the instruction,
operand and address sizes.
Maximum allowed instruction length is 15 bytes.
There's no way to say how many bytes are in an arbitrary instruction
without knowing the CPU mode, operand size, address size and some
additional information specific to the instruction. See the volume 3
"General-Purpose and System Instructions", "Appendix A Opcode and
Operand Encodings".
Alex
.
- References:
- clock cycle values AMD manual
- From: roger21
- clock cycle values AMD manual
- Prev by Date: Re: clock cycle values AMD manual
- Next by Date: Re: clock cycle values AMD manual
- Previous by thread: Re: clock cycle values AMD manual
- Next by thread: Re: clock cycle values AMD manual
- Index(es):
Relevant Pages
|