[Libre-soc-bugs] [Bug 238] POWER Compressed Formal Standard writeup

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sun Nov 22 20:36:51 GMT 2020


https://bugs.libre-soc.org/show_bug.cgi?id=238

--- Comment #58 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(again moved from bug #529)

Uhh, sorry, the comment above was really meant for bug 238.  I'll copy it
there.  There were elements of the proposal to use odd addresses that would be
relevant here, but that I haven't elaborated on.

Specifically, we could make that work for both BE and LE: in 32-bit mode, the
most significant byte (regardless of code endianness) is the one that might
hold the 8-bit nop-ish insn to switch to 16-bit mode, since that's where the
EXT bits are.

As for 16-bit mode, the 4n+1 address would be one of the two bytes of the insn
full-contained in the word, and 4n+2 would be the other, regardless of
endianness.

At 4n+3 addresses, we'd have to go for the least significant byte of the word
at 4n for the first half of the 16-bit insn, again the one holding the opcode,
so that we can tell whether it's a mode-switching nop or we are to fetch the
second half from the next word.

If we're using misaligned 32-bit addresses, again we ought to use the LSB half
of the lower-address word as the MSB of the insn, to recognize the opcode
(possibly an 8-bit nop), and the MSB half of the higher-address word for the
remaining bits of the 32-bit insn split across two words.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list