From d880b8ed33e2e91707f77ec8bbc6e15fd622899f Mon Sep 17 00:00:00 2001 From: Benjamin Kyd Date: Wed, 14 Jun 2023 02:25:54 +0100 Subject: [PATCH] testing more compiler options --- src/cpu/mod.rs | 3 +++ src/main.rs | 2 +- test/Makefile | 4 ++-- test/test | Bin 0 -> 5016 bytes test/test.bin | Bin 0 -> 12 bytes 5 files changed, 6 insertions(+), 3 deletions(-) create mode 100755 test/test create mode 100755 test/test.bin diff --git a/src/cpu/mod.rs b/src/cpu/mod.rs index 5c2e9e1..d09bfdc 100644 --- a/src/cpu/mod.rs +++ b/src/cpu/mod.rs @@ -91,6 +91,9 @@ impl CPU { _ => println!("VM > INST {:03b} not implemented", inst.funct3()), } } + inst::S_TYPE => { + println!("VM > OPCODE S TYPE not implemented"); + } _ => println!("VM > OPCODE {:08b} not implemented", opcode), }; diff --git a/src/main.rs b/src/main.rs index 11780ee..2ecfb7e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -64,7 +64,7 @@ fn main() { println!("VM Starting Up"); let mut vm = VMRV32I::new(); - vm.load_prog("./test/add.bin"); + vm.load_prog("./test/test.bin"); vm.dump_prog(); vm.dispatch(); } diff --git a/test/Makefile b/test/Makefile index ecfd0d3..5996cd4 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,7 +1,7 @@ GCC_COMPILER=riscv32-unknown-elf-gcc GCC_OBJCOPY=riscv32-unknown-elf-objcopy -all: build +all: bin assemble: $(GCC_COMPILER) -S test.c @@ -9,7 +9,7 @@ assemble: build: $(GCC_COMPILER) -Wl,-Ttext=0x0 -nostdlib -march=rv64i -mabi=lp64 -o test test.S -bin: +bin: build $(GCC_OBJCOPY) -O binary test test.bin clean: diff --git a/test/test b/test/test new file mode 100755 index 0000000000000000000000000000000000000000..30af358b491320d4efd8f9de1a002b4967098199 GIT binary patch literal 5016 zcmeHL%}T>S5T2wzC={&Xq3TI2;wcmr@z~bZB1lo|RhFa;8fcr6tRGy|Fe&46Y=Gq8>U zAOGr`r46yP|e{r=(HYNtljP1^ch3DJs7ZVzZ2_D z7_yMt0Y`i}%pKX>2Ifw&y%oMqxb5K1gJge^8h0ZOR(#`@&3WKCuiOps#Q&EAEJ3$f zR!a$<)47iDtM_||IL(&Sba@|nb0ry1y;ol!z=`O8C!QMhr891bMERUH(Z>EO5^X1t Wr+7rU6s54g@;^oXSsIxrYW^=MCrV@h literal 0 HcmV?d00001 diff --git a/test/test.bin b/test/test.bin new file mode 100755 index 0000000000000000000000000000000000000000..b350ba17a5a3f9df56ae20b1209287cecf50d09d GIT binary patch literal 12 Tcmd02aA26s