cpprisc16
June 16, 2020
|
Additional Instructions Set 1 IS[1]: 8 new instructions is1_* and 1 instruction modified is1_add. More...
#include "cpprisc16.hpp"
Go to the source code of this file.
Namespaces | |
cpprisc16 | |
Macros | |
#define | is1_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 | is1_bg(a, b, label) |
(Branch if Greater) If R[a] > R[b] then jump to label. More... | |
#define | is1_bl(a, b, label) |
(Branch if Lower) If R[a] < R[b] then jump to label. More... | |
#define | is1_sha_bo(result, a, b, label) |
(SHift Arithmetic) R[result] <– (R[a] << R[b]) or (R[a] >> -R[b]) More... | |
#define | is1_shl_bo(result, a, b, label) |
(SHift Logic if Overflow) R[result] <– (R[a] << R[b]) or (R[a] >> -R[b]) More... | |
#define | is1_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::is1_add (unsigned int result, unsigned int a, unsigned int b) |
R[result] <– R[a] + R[b]. More... | |
void | cpprisc16::is1_nor (unsigned int result, unsigned int a, unsigned int b) |
R[result] <– R[a] NOR R[b] (== ~(a | b)) More... | |
bool | cpprisc16::is1_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::is1_shifti (unsigned int result, unsigned int a, immed_t immed7) |
(Shift Immediate) R[result] <– (R[a] << immed5) or (R[a] >> -immed5) More... | |
bool | cpprisc16::is1_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::is1_sub (unsigned int result, unsigned int a, unsigned int b) |
R[result] <– R[a] - R[b]. More... | |
void | cpprisc16::is1_xor (unsigned int result, unsigned int a, unsigned int b) |
R[result] <– R[a] XOR R[b] (== ~(a ^ b)) More... | |
Additional Instructions Set 1 IS[1]: 8 new instructions is1_* and 1 instruction modified is1_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 cppis1.hpp.
#define is1_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 32 of file cppis1.hpp.
#define is1_bg | ( | a, | |
b, | |||
label | |||
) |
(Branch if Greater) If R[a] > R[b] then jump to label.
Count for 1 instruction.
Definition at line 46 of file cppis1.hpp.
#define is1_bl | ( | a, | |
b, | |||
label | |||
) |
(Branch if Lower) If R[a] < R[b] then jump to label.
Count for 1 instruction.
Definition at line 61 of file cppis1.hpp.
#define is1_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 84 of file cppis1.hpp.
#define is1_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 104 of file cppis1.hpp.
#define is1_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 119 of file cppis1.hpp.