Restructing, keeping all emulator modules in emulator directory

This commit is contained in:
sBubshait 2024-06-07 18:08:33 +01:00
parent 46da019131
commit a42576b4ed
21 changed files with 17 additions and 19 deletions

View File

@ -10,8 +10,7 @@ CFLAGS ?= -std=c17 -g\
all: assemble emulate
assemble: assemble.o
emulate: emulate.o
emulate: emulate.o emulator/fileio.o emulator/execute.o emulator/decode.o emulator/print.o
clean:
$(RM) *.o assemble emulate
$(RM) *.o assemble emulate emulator/fileio.o emulator/execute.o emulator/decode.o emulator/print.o

View File

@ -1,12 +1,12 @@
#include <stdlib.h>
#include <stdio.h>
#include "a64instruction.h"
#include "emulator.h"
#include "fileio.h"
#include "emulator/a64instruction/a64instruction.h"
#include "emulator/emulator.h"
#include "emulator/fileio.h"
#include "global.h"
#include "print.h"
#include "decode.h"
#include "execute.h"
#include "emulator/print.h"
#include "emulator/decode.h"
#include "emulator/execute.h"
extern a64inst_instruction *decode(word w);

View File

@ -1,6 +1,6 @@
#include <stdbool.h>
#include "a64instruction_global.h"
#include "global.h"
#include "../../global.h"
typedef enum {
a64inst_UNCONDITIONAL = 0,

View File

@ -1,4 +1,4 @@
#include "global.h"
#include "../../global.h"
typedef struct {
dword value;

View File

@ -1,6 +1,6 @@
#include <stdbool.h>
#include "a64instruction_global.h"
#include "global.h"
#include "../../global.h"
typedef enum {
a64inst_SINGLE_TRANSFER_SINGLE_DATA_TRANSFER = 1,

View File

@ -1,5 +1,5 @@
#include "global.h"
#include "a64instruction.h"
#include "../global.h"
#include "a64instruction/a64instruction.h"
#define HALT_WORD 0x8a000000

View File

@ -1,6 +1,6 @@
#ifndef __EMULATOR__
#define __EMULATOR__
#include "global.h"
#include "../global.h"
#include <stdbool.h>
/************************************

View File

@ -1,6 +1,6 @@
#ifndef __EXECUTE__
#define __EXECUTE__
#include "a64instruction.h"
#include "a64instruction/a64instruction.h"
#include "emulator.h"
void execute(Machine *state, a64inst_instruction *inst);

View File

@ -2,7 +2,7 @@
#include <stdio.h>
#include <string.h>
#include "fileio.h"
#include "global.h"
#include "../global.h"
/* Loads a binary file located at filePath to memory, taking up a block of exactly memorySize bytes,
and returns the starting address of the data. If memorySize is insufficient to store the entire file,

View File

@ -1,7 +1,7 @@
#ifndef __FILEIO__
#define __FILEIO__
#include <stdlib.h>
#include "global.h"
#include "../global.h"
#define EXIT_FAILURE 1

View File

@ -1,7 +1,6 @@
#include <stdbool.h>
#include <stdint.h>
#include <inttypes.h>
#include <string.h>
#include "print.h"
#include "emulator.h"

0
test.sh Normal file → Executable file
View File