Permalink
Browse files

Assume gcc 2.95+ with DOS and Win32 builds. These versions of gcc have

introduced extra stack alignment to avoid huge penalties of MMX, SSE, and
floating point operations on unaligned variables on the stack.  In John,
we are not using any floating point and none of the MMX instructions refer
to locations on the stack.  Thus, this extra alignment is not needed and
we now disable it with -mpreferred-stack-boundary=2 to avoid the overhead
on function entry associated with this gcc feature.
  • Loading branch information...
solar
solar committed Jan 12, 2006
1 parent 0570244 commit 5fd8f688b695669951a3b0d406dd0bb5832d6d06
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/Makefile
View
@@ -542,24 +542,28 @@ dos-djgpp-x86-mmx:
copy x86-mmx.h arch.h
$(MAKE) $(PROJ_DOS) \
JOHN_OBJS="$(JOHN_OBJS_MINIMAL) x86.o x86-mmx.o" \
+ CFLAGS="$(CFLAGS) -mpreferred-stack-boundary=2" \
ASFLAGS="$(ASFLAGS) -DUNDERSCORES -DALIGN_LOG"
dos-djgpp-x86-any:
copy x86-any.h arch.h
$(MAKE) $(PROJ_DOS) \
JOHN_OBJS="$(JOHN_OBJS) x86.o" \
+ CFLAGS="$(CFLAGS) -mpreferred-stack-boundary=2" \
ASFLAGS="$(ASFLAGS) -DUNDERSCORES -DALIGN_LOG"
win32-cygwin-x86-mmx:
$(CP) x86-mmx.h arch.h
$(MAKE) $(PROJ_WIN32) \
JOHN_OBJS="$(JOHN_OBJS_MINIMAL) x86.o x86-mmx.o" \
+ CFLAGS="$(CFLAGS) -mpreferred-stack-boundary=2" \
ASFLAGS="$(ASFLAGS) -DUNDERSCORES"
win32-cygwin-x86-any:
$(CP) x86-any.h arch.h
$(MAKE) $(PROJ_WIN32) \
JOHN_OBJS="$(JOHN_OBJS) x86.o" \
+ CFLAGS="$(CFLAGS) -mpreferred-stack-boundary=2" \
ASFLAGS="$(ASFLAGS) -DUNDERSCORES"
beos-x86-mmx:

0 comments on commit 5fd8f68

Please sign in to comment.