[Libre-soc-dev] demo of 16/32/48/64-bit LE/BE backward-compatible encoding

Jacob Lifshay programmerjake at gmail.com
Thu Nov 26 18:14:34 GMT 2020


On Thu, Nov 26, 2020, 09:54 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
wrote:

> On 11/26/20, Jacob Lifshay <programmerjake at gmail.com> wrote:
> > On Thu, Nov 26, 2020, 03:35 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
> > wrote:
> >> 0x1000+0/1/2/3 etc. brilliant.  ah: last piece of "clarity"
> >> information missing is of course the sequence number (aka "program
> >> order")
> >>
> >
> > The 0x1000+0/1/2/... column, the 0x1000 is the PC (also has column header
> > "PC"), which counts in the program order.
>
> ah no it doesn't: look at 101c and 1020, there's an instruction
> embedded *in between*!
>

Actually, yes, it does follow program order. Remember, the table is sorted
in *memory* order, not *program* order, those are the last two bytes of the
previous instruction, which is evident from the PC for those two bytes:
0x1016, which comes *before* 0x101E. (notice the color matches the previous
instruction too.)

>
> Program Order has a very specific definition which is *assumed* 100%
> to be unilaterally synonymous with "PC order" right across the entire
> computing industry for ooo abouuut 50+ years,


yup, it still is. Never changed. Only thing that changed is memory order !=
PC order. Basically (LE mode): memory address = 0x3 XOR PC
(took me a while to figure that out, though blindingly obvious in hindsight)

until 2 weeks ago when
> you came up with this scheme :)
>

nope


> Program Order is very specifically defined as, "the sequential order
> in which a program sees, receives, and executes instructions".
>
> with this scheme that is emphatically NOT synonymous with "PC
> sequential order" because of the reversal of checking 23 01 rather
> than 01 23.
>

Actually, it checks in order 32 10 in LE mode, 01 23 in BE mode.

>
> and that's going to be hell to explain unless we have very clear
> indicators of the differences.  took me 2 weeks to get it and i had to
> pretend i was a 4-year-old.
>

hope the above makes it clear.

Jacob


More information about the Libre-soc-dev mailing list