XPost: comp.lang.forth   
   From: albert@nospicedham.cherry   
      
   In article ,   
   wolfgang kern wrote:   
   >On 10.03.2020 06:09, JJ wrote:   
   >   
   >>> In AMD64, the 4x instructions are *all* REX prefices. The 48   
   >>> instruction is NOT a DEC reg instruction, it's a REX prefix.   
   >   
   >> That's interresting. I didn't realize that there are two sets of opcode for   
   >> `INC/DEC ` instructions in x86: `4x` and `FF Cx`. Is there any article   
   >> about it? Why there's two set of them? And if one was added later, when was   
   >> that?   
   >   
   >There are lots of duplicate opcodes already from the start of it, Caused   
   >by incomplete decoding, but it was cheaper to keep them ...   
      
   The correct reason is that the 8086 had a tiny memory range.   
   It paid of to shave off one byte of a two-byte instructions for   
   special cases to accomodate "larger" programs.   
   This is true for XCHG MOV INC/DEC POP. The shorter instruction   
   accomodates only a register addressing mode, or only register AX/L/H   
   See Stephen Morse " the 8086 primer   
   isbn 0-8104-5165-4   
      
   >wolfgang   
   >   
   --   
   This is the first day of the end of your life.   
   It may not kill you, but it does make your weaker.   
   If you can't beat them, too bad.   
   albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|