[v1.03][RISCV] Add support for compiling to RISC-V

This commit is contained in:
Dr-Noob
2023-03-31 17:57:01 +02:00
parent cf77360d1b
commit 1f450b23a1
9 changed files with 67 additions and 1 deletions

12
src/riscv/riscv.c Normal file
View File

@@ -0,0 +1,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
struct cpuInfo* get_cpu_info(void) {
return NULL;
}
void print_debug(struct cpuInfo* cpu) {
printf("Unimplemented!\n");
}

9
src/riscv/riscv.h Normal file
View File

@@ -0,0 +1,9 @@
#ifndef __RISCV__
#define __RISCV__
#include "../common/cpu.h"
struct cpuInfo* get_cpu_info(void);
void print_debug(struct cpuInfo* cpu);
#endif

11
src/riscv/uarch.c Normal file
View File

@@ -0,0 +1,11 @@
#include <stdint.h>
struct uarch {
//MICROARCH uarch;
char* uarch_str;
int32_t process; // measured in nanometers
};
void free_uarch_struct(struct uarch* arch) {
}

11
src/riscv/uarch.h Normal file
View File

@@ -0,0 +1,11 @@
#ifndef __UARCH__
#define __UARCH__
#include <stdint.h>
#include "riscv.h"
struct uarch;
void free_uarch_struct(struct uarch* arch);
#endif