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 0000000..30af358 Binary files /dev/null and b/test/test differ diff --git a/test/test.bin b/test/test.bin new file mode 100755 index 0000000..b350ba1 Binary files /dev/null and b/test/test.bin differ