Optimize some more
This commit is contained in:
parent
6b3f7c1a6a
commit
3499f9c879
2
Makefile
2
Makefile
|
@ -38,7 +38,7 @@ OBJECTS = $(patsubst %,$(BUILD)/%, $(SOURCES:.c=.o))
|
|||
# commented them out for the time being
|
||||
#LDFLAGS = -Wl,--relax -Wl,--gc-sections
|
||||
LDFLAGS = -lm
|
||||
OPT := -O3 -flto -fno-fat-lto-objects
|
||||
OPT := -O3 -flto -fno-fat-lto-objects -march=native
|
||||
CFLAGS = -c -g -Wall -Wno-format $(OPT) -D LINUX
|
||||
|
||||
all: directory $(SOURCES) $(OBJECTS) Makefile
|
||||
|
|
2
debug.c
2
debug.c
|
@ -247,7 +247,7 @@ int32_t RunProp(int32_t maxloops)
|
|||
while (runflag && (maxloops < 0 || loopcount < maxloops))
|
||||
{
|
||||
runflag = step_chip();
|
||||
CheckCommand();
|
||||
//CheckCommand();
|
||||
if (baudrate)
|
||||
{
|
||||
CheckSerialOut(&serial_out);
|
||||
|
|
|
@ -28,12 +28,16 @@ void PrintResults(int32_t zcri, int32_t zflag, int32_t cflag, int32_t result)
|
|||
|
||||
static int32_t parity(int32_t val)
|
||||
{
|
||||
#if 0
|
||||
val ^= val >> 16;
|
||||
val ^= val >> 8;
|
||||
val ^= val >> 4;
|
||||
val ^= val >> 2;
|
||||
val ^= val >> 1;
|
||||
return val & 1;
|
||||
#else
|
||||
return __builtin_parity(val);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int32_t abs(int32_t val)
|
||||
|
|
19
spininterp.c
19
spininterp.c
|
@ -37,21 +37,10 @@ int32_t MAP_ADDR(int32_t addr)
|
|||
{
|
||||
if ((addr & 0xfffffff0) == 0x12340000)
|
||||
{
|
||||
addr = memsize + (addr & 15);
|
||||
}
|
||||
else if (memsize == 65536)
|
||||
{
|
||||
addr &= 0xffff;
|
||||
}
|
||||
else if (((uint32_t)addr) >= memsize)
|
||||
{
|
||||
#if 0
|
||||
fprintf(tracefile, "MAP_ADDR(%d): address out of bounds %8.8x\n", loopcount, addr);
|
||||
addr = memsize + 12;
|
||||
#else
|
||||
addr &= memsize - 1;
|
||||
#endif
|
||||
}
|
||||
addr = memsize + (addr & 15);
|
||||
} else {
|
||||
addr &= memsize - 1;
|
||||
}
|
||||
//fprintf(tracefile, "MAP_ADDR: %8.8x %8.8x\n", addr, ((uint32_t *)hubram)[addr>>2]);
|
||||
|
||||
return addr;
|
||||
|
|
Loading…
Reference in New Issue