Skip to content

Commit

Permalink
compile time cycles
Browse files Browse the repository at this point in the history
  • Loading branch information
steveschnepp committed Sep 18, 2023
1 parent 87f111b commit 7da2773
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
#####################################################################
BIN := emu

CYCLES_PER_INSTR=12
OPTIM=g
CFLAGS += -O$(OPTIM)
CFLAGS += -pipe
CFLAGS += -g -Wall -Wextra -Wno-unused-parameter -Wshadow
CFLAGS += -DCYCLES_PER_INSTR=$(CYCLES_PER_INSTR)

# Uncomment to activate LTO
#CFLAGS += -flto
Expand Down
2 changes: 2 additions & 0 deletions emu.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
#include "emu8051.h"
#include "emulator.h"

#ifndef CYCLES_PER_INSTR
#define CYCLES_PER_INSTR 12
#endif // CYCLES_PER_INSTR

unsigned char history[HISTORY_LINES * (128 + 64 + sizeof(int))];

Expand Down

0 comments on commit 7da2773

Please sign in to comment.