SLAU846B June 2023 – November 2024 MSPM0G1105 , MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G3105 , MSPM0G3106 , MSPM0G3107 , MSPM0G3505 , MSPM0G3506 , MSPM0G3507
The Square64 function (SQUARE64) is a variation of the MPY32 function and performs a square operation on operand OP2 with the 64-bit result in RES1 and RES2.
The SQUARE64 function can perform the types of multiply shown in Table 6-21.
Data type (Base) | Data type (Square Result) | Condition |
---|---|---|
Uint32_t | Uint64_t | Result is < 264 - 1 |
Int32_t | Int64_t | Result is > -263 and < 263 - 1 |
Table 6-22 shows the operands and descriptions for the SQUARE64 function.
Register (Bit Field) | Value | Description |
---|---|---|
OP1 | User value | Base |
CTL.FUNC | 9h | MPY64 |
CTL.OPTYPE | 0h = unsigned operands 1h = signed operands | Operand sign |
RES1 | Lower 32 bits of product | Product (64-bit) |
RES2 | Upper 32 bits of product |
Status, Errors, and Overflow
There are no status, error, or overflow bits for SQUARE64.
Configuration
To perform an SQUARE64: