Re: Rational behind removing register forms of inc, dec?
- From: "robertwessel2@xxxxxxxxx" <robertwessel2@xxxxxxxxx>
- Date: Wed, 24 Oct 2007 17:34:25 -0700
On Oct 23, 4:22 pm, "Rod Pemberton" <do_not_h...@xxxxxxxxxxxxx> wrote:
"Charles Crayne" <ccra...@xxxxxxxxxx> wrote in message
news:20071023133450.2ae6de9c@xxxxxxxxxxxxxxxxxx
Long mode is 64-bit mode, but, fortunately, the r/m inc/dec instructions
have not gone away -- just the register only forms. Unless you code at
the machine code level, you won't even notice the difference.
Anyone know what the rational behind removing the register forms of inc, dec
is?
I'd think that if one was forced to remove instruction modes from
instructions, one would start with the memory modes since a mov or lea could
be used to replicate the removed mode. I'd also think that since hand coded
x86 code can be heavily register based, sometimes avoiding memory forms of
instructions completely (using mov or lea exclusively), that one would
choose to preserve register based instructions. The two opcode frequency
documents I have indicate that inc (but not dec) is also a high usage
instruction comparable to push. It's listed in the top five used
instructions. Was it really that hard to find a few bytes when they
elimated most of the obsolete instructions from the single byte instruction
table?
The instructions are still there, just not the one byte forms (there
are multi byte forms that are identical in operation). Pure and
simple, they needed a block of consecutive opcodes to implement the
REX prefix byte(s). My personal opinion is that the great effort to
not change the majority of instruction encodings in long mode was a
serious mistake, and a big opportunity to clean that mess up was
missed.
And yes, even with the obsolete instructions they eliminated, the
opcode space is still pretty dense.
.
- References:
- Rational behind removing register forms of inc, dec?
- From: Rod Pemberton
- Rational behind removing register forms of inc, dec?
- Prev by Date: Re: FASMLIB 0.7.0 is out
- Next by Date: Re: FASMLIB 0.7.0 is out
- Previous by thread: Re: Rational behind removing register forms of inc, dec?
- Index(es):
Relevant Pages
|