24 is2_add(
unsigned int result,
unsigned int a,
unsigned int b) {
34 is2_mul(
unsigned int result,
unsigned int a,
unsigned int b) {
41 const std::uint32_t prod = (
static_cast<std::uint32_t
>(
registers[a])
42 * static_cast<std::uint32_t>(
registers[b]));
53 is2_nor(
unsigned int result,
unsigned int a,
unsigned int b) {
63 is2_sha(
unsigned int result,
unsigned int a,
unsigned int b) {
73 is2_shl(
unsigned int result,
unsigned int a,
unsigned int b) {
86 assert(immed7 <= 0x7F);
93 is2_sub(
unsigned int result,
unsigned int a,
unsigned int b) {
103 is2_xor(
unsigned int result,
unsigned int a,
unsigned int b) {
void is2_xor(unsigned int result, unsigned int a, unsigned int b)
R[result] <– R[a] XOR R[b] (== ~(a ^ b))
bool is2_shl(unsigned int result, unsigned int a, unsigned int b)
(SHift Logic) R[result] <– (R[a] << R[b]) or (R[a] >> -R[b])
bool is1_add(unsigned int result, unsigned int a, unsigned int b)
R[result] <– R[a] + R[b].
void is1_nor(unsigned int result, unsigned int a, unsigned int b)
R[result] <– R[a] NOR R[b] (== ~(a | b))
Additional Instructions Set 1 IS[1]: 8 new instructions is1_* and 1 instruction modified is1_add...
void is2_shifti(unsigned int result, unsigned int a, immed_t immed7)
(Shift Immediate) R[result] <– (R[a] << immed5) or (R[a] >> -immed5)
void is1_xor(unsigned int result, unsigned int a, unsigned int b)
R[result] <– R[a] XOR R[b] (== ~(a ^ b))
bool is1_sub(unsigned int result, unsigned int a, unsigned int b)
R[result] <– R[a] - R[b].
bool is2_sha(unsigned int result, unsigned int a, unsigned int b)
(SHift Arithmetic) R[result] <– (R[a] << R[b]) or (R[a] >> -R[b])
std::uint16_t immed_t
Type for immediate value.
word16_t registers[8]
Registers.
const unsigned int nb_registers
Number of registers: 8 word16_t items.
void is2_mul(unsigned int result, unsigned int a, unsigned int b)
R[result - 1]:R[result] <– R[a]*R[b].
uint64_t nb_executed
Number of instructions executed.
bool is1_shl(unsigned int result, unsigned int a, unsigned int b)
(SHift Logic) R[result] <– (R[a] << R[b]) or (R[a] >> -R[b])
bool is2_add(unsigned int result, unsigned int a, unsigned int b)
R[result] <– R[a] + R[b].
Additional Instructions Set 2 IS[2]: 8 new instructions is2_* and 1 instruction modified is2_add...
bool is2_sub(unsigned int result, unsigned int a, unsigned int b)
R[result] <– R[a] - R[b].
void is2_nor(unsigned int result, unsigned int a, unsigned int b)
R[result] <– R[a] NOR R[b] (== ~(a | b))
bool is1_sha(unsigned int result, unsigned int a, unsigned int b)
(SHift Arithmetic) R[result] <– (R[a] << R[b]) or (R[a] >> -R[b])
void is1_shifti(unsigned int result, unsigned int a, immed_t immed7)
(Shift Immediate) R[result] <– (R[a] << immed5) or (R[a] >> -immed5)