Adds build file for VM with libvm.a (32 bit) and vm (host executable)
This commit is contained in:
parent
51b091fb88
commit
a8b6ad3580
3 changed files with 22 additions and 1 deletions
21
prototypes/supervm/Makefile
Normal file
21
prototypes/supervm/Makefile
Normal file
|
@ -0,0 +1,21 @@
|
|||
|
||||
AS=gcc
|
||||
CC=gcc
|
||||
CXX=g++
|
||||
LD=ld
|
||||
AR=ar
|
||||
|
||||
FLAGS = -Werror -Wall -iquote include -O3 -g
|
||||
VMFLAGS = $(FLAGS) -m32 -mno-sse -ffreestanding
|
||||
|
||||
ARTIFACT = libvm.a
|
||||
PROGRAM = vm
|
||||
|
||||
all: $(ARTIFACT) $(PROGRAM)
|
||||
|
||||
$(PROGRAM): main.c vm.c vm.h
|
||||
$(CC) -o $@ $(FLAGS) main.c vm.c
|
||||
|
||||
$(ARTIFACT): vm.c vm.h
|
||||
$(CC) $(VMFLAGS) -c -o obj/vm.o.32 vm.c
|
||||
$(AR) rcs $(ARTIFACT) obj/vm.o.32
|
|
@ -84,7 +84,7 @@ int vm_step_process(Process *process)
|
|||
// the execution condition is met.
|
||||
if(exec)
|
||||
{
|
||||
CommandInfo info;
|
||||
CommandInfo info = { 0 };
|
||||
switch(instr.input0)
|
||||
{
|
||||
case VM_INPUT_ZERO: info.input0 = 0; break;
|
||||
|
|
Loading…
Reference in a new issue