Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a list of deprecated x86 instructions?

I'm taking an x86 assembly language programming class and know that certain instructions shouldn't be used anymore -- because they're slow on modern processors; for example, the loop instruction.

I haven't been able to find any list of instructions that are considered deprecated and should be avoided; any guidance would be appreciated.

like image 373
LucidDefender Avatar asked Feb 02 '11 22:02

LucidDefender


People also ask

How many x86 instructions are there?

Below is the full 8086/8088 instruction set of Intel (81 instructions total). Most if not all of these instructions are available in 32-bit mode; they just operate on 32-bit registers (eax, ebx, etc.) and values instead of their 16-bit (ax, bx, etc.) counterparts.

How many bits are x86 instructions?

x86-64 (also known as just x64 and/or AMD64) is the 64-bit version of the x86/IA32 instruction set. Below is our overview of its features that are relevant to CS107.

What is referred to as the x86 Intel's instruction set?

x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel based on the Intel 8086 microprocessor and its 8088 variant.

How long is x86 instruction?

x86 instructions can be anywhere between 1 and 15 bytes long. The length is defined separately for each instruction, depending on the available modes of operation of the instruction, the number of required operands and more.


2 Answers

Your best bet is to consult Intel's official optimization guide.

This an other manuals can be found here.

like image 63
Nathan Fellman Avatar answered Oct 11 '22 13:10

Nathan Fellman


Oh, but there still might be a good reason to use the loop instruction. For example, loop label only requires two bytes. As opposed to dec cx followed by jnz label requires three bytes. Sometimes code size is more important than speed.

I would suggest, however, that if you're just learning x86 assembly--especially if this is your first foray into assembly language--that you first concentrate on how to do things. Once you've gotten a better feel for how things work, then worry about making them faster.

like image 28
Jim Mischel Avatar answered Oct 11 '22 14:10

Jim Mischel