Rational behind removing register forms of inc, dec?



"Charles Crayne" <ccrayne@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?


Rod Pemberton

.



Relevant Pages

  • Re: 8-Bit Register on Pentium 4
    ... MOV AH, BYTE PTR ... Intel's instructions such as CBW instruction, MOVZX instruction, and/or ... can only modify in the memory rather than register. ...
    (comp.lang.asm.x86)
  • Re: asm in C
    ... The instructions section contains instructions, ... "D" is register edi for Intel 386. ... mov "from", %esi ...
    (alt.lang.asm)
  • Re: Optimization Questions
    ... cycles you'd save would be more than offset by the cycles you'd burn ... instructions go through port 0 and port 1. ... a 16-bit register, writing one afterwards will be fast. ... Pre-read the value in EAX ...
    (comp.lang.asm.x86)
  • Re: Learning ARM assembler...
    ... the newer ARM instructions, you can largely ignore them if you prefer. ... programmers also develop habits that help to avoid non-orthogonality (for ... that you can't use another register for the same purpose). ... instructions have a more compact encoding when used in this way, ...
    (comp.sys.acorn.programmer)
  • Re: Learning ARM assembler...
    ... the sum of a displacement plus a register plus a second register shifted ... instruction encoding standpoint. ... instructions have a more compact encoding when used in this way, ...
    (comp.sys.acorn.programmer)