instructions rename and uninitialized memory error fix
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "impl_macros.h"
|
||||
|
||||
/// MOV [dst_register] [src_register]
|
||||
i32 MOV_impl(VM* vm){
|
||||
/// MOVR [dst_register] [src_register]
|
||||
i32 MOVR_impl(VM* vm){
|
||||
u8 dst_register_i = 0;
|
||||
readRegisterVar(dst_register_i);
|
||||
u8 src_register_i = 0;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "impl_macros.h"
|
||||
|
||||
/// PUSH [dst_register] [value_size] [value]
|
||||
i32 PUSH_impl(VM* vm){
|
||||
/// MOVC [dst_register] [value_size] [value]
|
||||
i32 MOVC_impl(VM* vm){
|
||||
u8 dst_register_i = 0;
|
||||
readRegisterVar(dst_register_i);
|
||||
/*u8 value_size = 0;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#include "../collections/HashMap.h"
|
||||
|
||||
i32 NOP_impl(VM* vm);
|
||||
i32 PUSH_impl(VM* vm);
|
||||
i32 MOV_impl(VM* vm);
|
||||
i32 MOVC_impl(VM* vm);
|
||||
i32 MOVR_impl(VM* vm);
|
||||
i32 ADD_impl(VM* vm);
|
||||
i32 SUB_impl(VM* vm);
|
||||
i32 MUL_impl(VM* vm);
|
||||
@@ -17,8 +17,8 @@ i32 CALL_impl(VM* vm);
|
||||
Array_declare(Instruction);
|
||||
static const Array_Instruction instructions_array = ARRAY(Instruction, {
|
||||
Instruction_construct(NOP),
|
||||
Instruction_construct(PUSH),
|
||||
Instruction_construct(MOV),
|
||||
Instruction_construct(MOVC),
|
||||
Instruction_construct(MOVR),
|
||||
Instruction_construct(ADD),
|
||||
Instruction_construct(SUB),
|
||||
Instruction_construct(MUL),
|
||||
|
||||
@@ -7,8 +7,8 @@ typedef i32 (*InstructionImplFunc_t)(VM* vm);
|
||||
|
||||
typedef enum __attribute__((__packed__)) Opcode {
|
||||
Opcode_NOP,
|
||||
Opcode_PUSH,
|
||||
Opcode_MOV,
|
||||
Opcode_MOVC,
|
||||
Opcode_MOVR,
|
||||
Opcode_ADD,
|
||||
Opcode_SUB,
|
||||
Opcode_MUL,
|
||||
|
||||
Reference in New Issue
Block a user