From: lkcl Date: Sat, 24 Sep 2022 23:50:46 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~302 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d66ea33c5bab5c337c594cb19d5cf170642aafb8;p=libreriscv.git --- diff --git a/openpower/sv/overview/discussion.mdwn b/openpower/sv/overview/discussion.mdwn index 51e0d8c6a..9424dd5ca 100644 --- a/openpower/sv/overview/discussion.mdwn +++ b/openpower/sv/overview/discussion.mdwn @@ -248,10 +248,17 @@ then the following bits are set (all others zero): Now taking the c struct definition `elreg_t` above we may provide a link between the two: - elreg_t x; + elreg_t x = RA; x.actual_bytes[0] = RA.B7; // byte zero in LE is byte 7 in MSB0 x.actual_bytes[1] = RA.B6; ... x.actual_bytes[7] = RA.B0; // byte 7 in LE is byte 0 in MSB0 - +The following **arithmetic** operations - in c - produce the exact +same results as above: + + elreg_t x = RA, y = RB, z = RT; + x.l[0] = 1 << 63; + y.l[0] = 128; + z.l[0] = 3 + 4; +