cpprisc16
June 16, 2020
|
Additional Instructions Set 2 IS[2]: 8 new instructions is2_* and 1 instruction modified is2_add. More...
#include "cpprisc16.hpp"
Go to the source code of this file.
Namespaces | |
cpprisc16 | |
Macros | |
#define | is2_add_bo(result, a, b, label) |
(Add Branch if Overflow) R[result] <– R[a] + R[b] and if overflow then jump to label. More... | |
#define | is2_bl(a, b, label) |
(Branch if Lower) If R[a] < R[b] then jump to label. More... | |
#define | is2_sha_bo(result, a, b, label) |
(SHift Arithmetic) R[result] <– (R[a] << R[b]) or (R[a] >> -R[b]) More... | |
#define | is2_shl_bo(result, a, b, label) |
(SHift Logic if Overflow) R[result] <– (R[a] << R[b]) or (R[a] >> -R[b]) More... | |
#define | is2_sub_bo(result, a, b, label) |
(Sub Branch if Overflow) R[result] <– R[a] - R[b] and if overflow then jump to label. More... | |
Functions | |
bool | cpprisc16::is2_add (unsigned int result, unsigned int a, unsigned int b) |
R[result] <– R[a] + R[b]. More... | |
void | cpprisc16::is2_mul (unsigned int result, unsigned int a, unsigned int b) |
R[result - 1]:R[result] <– R[a]*R[b]. More... | |
void | cpprisc16::is2_nor (unsigned int result, unsigned int a, unsigned int b) |
R[result] <– R[a] NOR R[b] (== ~(a | b)) More... | |
bool | cpprisc16::is2_sha (unsigned int result, unsigned int a, unsigned int b) |
(SHift Arithmetic) R[result] <– (R[a] << R[b]) or (R[a] >> -R[b]) More... | |
void | cpprisc16::is2_shifti (unsigned int result, unsigned int a, immed_t immed7) |
(Shift Immediate) R[result] <– (R[a] << immed5) or (R[a] >> -immed5) More... | |
bool | cpprisc16::is2_shl (unsigned int result, unsigned int a, unsigned int b) |
(SHift Logic) R[result] <– (R[a] << R[b]) or (R[a] >> -R[b]) More... | |
bool | cpprisc16::is2_sub (unsigned int result, unsigned int a, unsigned int b) |
R[result] <– R[a] - R[b]. More... | |
void | cpprisc16::is2_xor (unsigned int result, unsigned int a, unsigned int b) |
R[result] <– R[a] XOR R[b] (== ~(a ^ b)) More... | |
Additional Instructions Set 2 IS[2]: 8 new instructions is2_* and 1 instruction modified is2_add.
(March 15, 2017) Piece of cpprisc16. https://bitbucket.org/OPiMedia/cpprisc16
GPLv3 — Copyright (C) 2017 Olivier Pirson http://www.opimedia.be/
Definition in file cppis2.hpp.
#define is2_add_bo | ( | result, | |
a, | |||
b, | |||
label | |||
) |
(Add Branch if Overflow) R[result] <– R[a] + R[b] and if overflow then jump to label.
Count for 1 instruction.
Definition at line 31 of file cppis2.hpp.
#define is2_bl | ( | a, | |
b, | |||
label | |||
) |
(Branch if Lower) If R[a] < R[b] then jump to label.
Count for 1 instruction.
Definition at line 45 of file cppis2.hpp.
#define is2_sha_bo | ( | result, | |
a, | |||
b, | |||
label | |||
) |
(SHift Arithmetic) R[result] <– (R[a] << R[b]) or (R[a] >> -R[b])
If R[b] >= 0 then shift to the left, else shift to the right with duplication of the sign bit.
And if overflow then jump to label.
Count for 1 instruction.
Definition at line 68 of file cppis2.hpp.
#define is2_shl_bo | ( | result, | |
a, | |||
b, | |||
label | |||
) |
(SHift Logic if Overflow) R[result] <– (R[a] << R[b]) or (R[a] >> -R[b])
If R[b] >= 0 then shift to the left, else shift to the right.
And if overflow then jump to label.
Count for 1 instruction.
Definition at line 88 of file cppis2.hpp.
#define is2_sub_bo | ( | result, | |
a, | |||
b, | |||
label | |||
) |
(Sub Branch if Overflow) R[result] <– R[a] - R[b] and if overflow then jump to label.
Count for 1 instruction.
Definition at line 103 of file cppis2.hpp.