[Libre-soc-dev] mulhw / mulhwu in microwatt updates SO

Luke Kenneth Casson Leighton lkcl at lkcl.net
Thu Aug 27 16:39:21 BST 2020


in section v3.0B p73 it says that mulhw, mulhw. and hwu do not have an
overflow version.  CR0 is also intended to be undefined in bits 0:2 in
64-bit mode.  nothing is mentioned about SO however we might
reasonably assume that because there is no OE version of mulhw/mulhwu,
it must be ignored.

wark-wark, fail.

instruction 1035c in 1.bin:
   1035c:   97 2c c1 7f     .long 0x7fc12c97

fail again by this command:
$ powerpc64le-linux-gnu-objdump -D  -b binary -m powerpc:common64 -z
/home/lkcl/src/libresoc/microwatt/tests/1.bin  > 1.dump

manual decode of 0x7fc12c97:

major 31
minor 75
Oe 1
rt 30
ra 1
rb 5
Rc 1

it's "mulhw." but actually it's not, it's "mulhwo." because both OE=1
*and* Rc=1 which is an instruction that doesn't exist in v3.0B.  (so
why is it in microwatt unit test 1.bin, and where did that unit test
come from?)

put simply: if we "obey" the spec, XER gets corrupted.  microwatt is
also not "obeying" the spec, and this is cause for some concern /
alarm, because, strictly speaking, we are violating the OpenPOWER EULA
by not following - to the letter - the v3.0B specification.

some... clarity on this would be greatly appreciated.  are we
permitted to violate the v3.0B spec (and the OpenPOWER EULA) on the
basis that if we don't we will end up fragmenting interoperability
because IBM's POWER9 implementation does something *different* from
what the v3.0B spec says?

l.


---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68



More information about the Libre-soc-dev mailing list