made counting for register messages depending on a #define,

adapted makefile to make version with peephole optimizer library
This commit is contained in:
ceriel
1988-02-16 16:23:00 +00:00
parent 3e01918c57
commit b54a58e93c
7 changed files with 545 additions and 13 deletions

View File

@@ -18,6 +18,7 @@
#include "util.h"
#include "use_tmp.h"
#include "regcount.h"
#include "sizes.h"
#include "align.h"
#include "stack.h"
@@ -27,6 +28,11 @@ static struct localvar *FreeTmps;
static int loc_id;
#endif USE_TMP
#ifdef PEEPHOLE
#undef REGCOUNTING
#define REGCOUNTING 1
#endif
extern char options[];
LocalInit()
@@ -179,7 +185,9 @@ LoadLocal(off, sz)
register struct localvar *p = find_reg(off);
#ifdef USE_TMP
#ifdef REGCOUNTING
if (p) p->t_count++;
#endif
#endif
if (sz == word_size) C_lol(off);
else if (sz == dword_size) C_ldl(off);
@@ -196,7 +204,9 @@ StoreLocal(off, sz)
register struct localvar *p = find_reg(off);
#ifdef USE_TMP
#ifdef REGCOUNTING
if (p) p->t_count++;
#endif
#endif
if (sz == word_size) C_stl(off);
else if (sz == dword_size) C_sdl(off);