flat assembler
Message board for the users of flat assembler.

Index > Main > PUSH and POP

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
Quote:
The Pentium 4 processor provides special support for XOR, SUB, and PXOR opera-
tions when executed within the same register. This recognizes that clearing a register
does not depend on the old value of the register.


Newest P4 workarounds old design fault of
8086 (where mov wastes 1 byte) and 80386 (where mov wastes 3 bytes). Shocked Confused Shocked Confused

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 31 Jan 2007, 19:52
View user's profile Send private message Reply with quote
tom tobias



Joined: 09 Sep 2003
Posts: 1320
Location: usa
tom tobias
Quote:
...and 80386 (where mov wastes 3 bytes)....

Wow, I am so sad to learn that I will have only half a BILLION more bytes to waste, writing something readable, instead of gobbledygook code, which saves 18.63 picoseconds...
Post 31 Jan 2007, 23:10
View user's profile Send private message Reply with quote
FrozenKnight



Joined: 24 Jun 2005
Posts: 128
FrozenKnight
i guess your right i was referencing an old optimization book for 486 and Pentium most of the tricks it mentioned still work but that one is out of date i guess.
Quote:
AMD Athlon™ Processor x86 Code Optimization Guide

Use XOR Instruction to Clear Integer Registers
To clear an integer register to all 0s, use “XOR reg, reg”. The
AMD Athlon processor is able to avoid the false read
dependency on the XOR instruction.
Example 1 (Acceptable):
MOV REG, 0
Example 2 (Preferred):
XOR REG, REG
Post 01 Feb 2007, 11:11
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.