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
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
...
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: