[v1.03][RISCV] Fix bug in Makefile and implement --debug option

This commit is contained in:
Dr-Noob
2023-04-13 15:49:06 +02:00
parent 91cc04c653
commit 889fbf2d67
4 changed files with 24 additions and 2 deletions

View File

@@ -101,5 +101,20 @@ char* get_str_extensions(struct cpuInfo* cpu) {
}
void print_debug(struct cpuInfo* cpu) {
printf("Unimplemented!\n");
printf("- soc: ");
if(cpu->soc->raw_name == NULL) {
printf("NULL\n");
}
else {
printf("'%s'\n", cpu->soc->raw_name);
}
printf("- uarch: ");
char* arch_cpuinfo_str = get_arch_cpuinfo_str(cpu);
if(arch_cpuinfo_str == NULL) {
printf("NULL\n");
}
else {
printf("'%s'\n", arch_cpuinfo_str);
}
}