Search code examples
assemblycpu-architectureinstructionsy86

Why the rA:rB is 2:8 instead of 2:f in the execution of a pushl instruction?


I'm reading the 4th chapter of Computer Systems: A Programmer's Perspective and learn about the sequential Y86 implementations.So here is the Assembly code: enter image description here

And we trace the execution of the pushl instruction to analysis each step of the push operation.Here is the process,left part is generic,right part is specific: enter image description here

I can understand all of the steps except for the rA:rB.Look at the first picture and the instruction is a02f,so in this condition,icode:ifun should be a:0,rA:rB should be 2:f.However,accodring to the book,rA:rB is actually 2:8 instead of 2:f.But why?And I really don't know where the '8' come from.


Solution

  • It’s an errata, and it’s listed in the errata page for the 2nd edition of the book:

    Chapter 4: Processor Architecture

    • p. 370, Aside tracing the pushl instruction: The second instruction byte should be 0x2f, instead of 0x28. The value of rB in the Fetch stage should be 0xf instead of 0x8.