From 767daef41c1c164effd90d5b466c5b9bfe7c7117 Mon Sep 17 00:00:00 2001 From: lkcl Date: Sun, 25 Sep 2022 01:20:20 +0100 Subject: [PATCH] --- openpower/sv/overview/discussion.mdwn | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/openpower/sv/overview/discussion.mdwn b/openpower/sv/overview/discussion.mdwn index 8398c8663..0700ba21b 100644 --- a/openpower/sv/overview/discussion.mdwn +++ b/openpower/sv/overview/discussion.mdwn @@ -236,7 +236,9 @@ where all definitions of RA below are consistent / identical: RA = W0||W1 RA = D0 -If we then perform the following **arithmetic** operations: +If we then perform the following **arithmetic** operations, +again using the same Pseudocode notation +(Power ISA Public v3.1 Book I Section 1.3.2) RA = 1 << 63 RB = 128 @@ -249,7 +251,7 @@ then the following bits are set (all others zero): RT.b61-3 = 1 RT.B7 = 0x07 RT.H3 = 0x0007 RT.W1 = 0x00000007 Now taking the c struct definition `elreg_t` above we may provide -a link between the two: +a link between the two definitions: elreg_t x = RA; x.actual_bytes[0] = RA.B7; // byte zero in LE is byte 7 in MSB0 @@ -257,13 +259,15 @@ a link between the two: ... x.actual_bytes[7] = RA.B0; // byte 7 in LE is byte 0 in MSB0 -The following **arithmetic** operations - in c - produce the exact +The following **arithmetic** operations - in c - which are exactly +the same arithmetic operations as given in Pseudocode form +abive - 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; + x.l[0] = 1 << 63; // e0 is element 0 + y.l[0] = 128; // e0, defined above + z.l[0] = 3 + 4; // e0 (LSB0 element-numbering) Next, elements are introduced. Using the definition `int_regfile` above let us perform two operations: -- 2.30.2