diff options
| author | Kathy Gray | 2015-12-22 13:46:11 +0000 |
|---|---|---|
| committer | Kathy Gray | 2015-12-22 13:46:11 +0000 |
| commit | 9219f8adddac4f6b6fc10e9c4965215b09829468 (patch) | |
| tree | 1467bbdecb328c4162d5b51fd5e02a9aea2dfc65 | |
| parent | 0ca565a91df971fac0f69b28d84def84174e1ccf (diff) | |
More make file goo, and fixing a typo in run_with_elf
| -rw-r--r-- | mips/Makefile | 18 | ||||
| -rw-r--r-- | src/lem_interp/run_with_elf.ml | 2 |
2 files changed, 15 insertions, 5 deletions
diff --git a/mips/Makefile b/mips/Makefile index 3042d331..bd1ff306 100644 --- a/mips/Makefile +++ b/mips/Makefile @@ -15,7 +15,11 @@ endif # the order of the files is important MIPSSOURCES= mips.sail -all: $(BUILDDIR)mips.ml $(BUILDDIR)mips_extras.ml +all: $(BUILDDIR)mips.ml $(BUILDDIR)mips_extras.ml run_native + +run_native: run_with_elf.native + +run_byte: run_with_elf.byte lem: $(BUILDDIR)mips.lem @@ -59,8 +63,14 @@ $(BUILDDIR)mips_extras.ml: $(LEM) -ocaml -only_changed_output -lib $(SAILDIR)/src/lem_interp/ $< touch $@ -$(BUILDDIR)run_with_elf.ml: - cp $(SAILDIR)/src/lem_interp/run_with_elf.ml $@ +run_with_elf.ml: $(SAILDIR)/src/lem_interp/run_with_elf.ml + cp $< $@ + +run_with_elf.native: run_with_elf.ml + ocamlbuild -use-ocamlfind run_with_elf.native + +run_with_elf.byte: run_with_elf.ml + ocamlbuild -use-ocamlfind run_with_elf.byte $(BUILDDIR)/test.lem: test.sail $(SAIL) | $(BUILDDIR) # if bash is detected we can print nicer errors @@ -74,4 +84,4 @@ endif clean: rm -rf $(BUILDDIR) -.PHONY: all full clean test +.PHONY: all full clean test diff --git a/src/lem_interp/run_with_elf.ml b/src/lem_interp/run_with_elf.ml index 811cdc8e..e873f162 100644 --- a/src/lem_interp/run_with_elf.ml +++ b/src/lem_interp/run_with_elf.ml @@ -875,7 +875,7 @@ let fetch_instruction_opcode_and_update_ia model = (([Mem.find pc_a !prog_mem; Mem.find (add1 pc_a) !prog_mem; Mem.find (add1 (add1 pc_a)) !prog_mem; - Mem.find (add1 (add1 (add1 pc_a))) !prog_mem])) in + Mem.find (add1 (add1 (add1 pc_a))) !prog_mem]))) in Opcode opcode | None -> failwith "PC address contains unknown or undefined") | _ -> assert false |
