Moved definitions and added debug build to vvm

This commit is contained in:
Veit Heller
2014-10-08 12:51:35 +02:00
parent 214e44dad0
commit bb59f48e09
3 changed files with 10 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
override CFLAGS+=-Werror -Wall -g -fPIC -O2 -DNDEBUG -ftrapv -Wfloat-equal -Wundef -Wwrite-strings -Wconversion -Wuninitialized override CFLAGS+=-Werror -Wall -g -fPIC -O2 -DNDEBUG -ftrapv -Wfloat-equal -Wundef -Wwrite-strings -Wconversion -Wuninitialized
DEBUG+=-DDEBUG=1 DEBUG+=-DDEBUG_ON
PREFIX=/usr/bin PREFIX=/usr/bin
BUILDDIR=bin/ BUILDDIR=bin/

View File

@@ -1,10 +1,5 @@
#include "vm.h" #include "vm.h"
#define MAX_SIZE 4096
#define TRUE 1
#define FALSE 0
#define DEBUG FALSE
/** /**
* @brief disassemble * @brief disassemble
* @param sp -> stack pointer * @param sp -> stack pointer

View File

@@ -8,6 +8,15 @@
#include "util.h" #include "util.h"
#include "opcode.h" #include "opcode.h"
#define MAX_SIZE 4096
#define TRUE 1
#define FALSE 0
#ifdef DEBUG_ON
#define DEBUG TRUE
#else
#define DEBUG FALSE
#endif
typedef struct{ typedef struct{
unsigned long length; unsigned long length;
int entrypoint; int entrypoint;