Commit dcdb45e1 authored by anton's avatar anton

Added configure variable STACK_CACHE_REGS and set useful defaults

  currently supported: 0-4 regs, default reg 0-4.
parent 2cd15cb3
......@@ -113,6 +113,7 @@ XLDFLAGS = @LDFLAGS@
LDFLAGS = $(DEBUGFLAG) $(XLDFLAGS)
LDLIBS = @LIBS@
STACK_CACHE_REGS = @STACK_CACHE_REGS@
STACK_CACHE_DEFAULT_FAST = @STACK_CACHE_DEFAULT_FAST@
# ------------ Install Directories
......@@ -763,8 +764,8 @@ prim.b: prim cache0.vmg
$(M4) -Dcondbranch_opt=0 $(srcdir)/prim >$@
sleep 1 #should make hpux-workaround unnecessary
prim-fast.b: prim cache-fast$(STACK_CACHE_DEFAULT_FAST).vmg peeprules.vmg Makefile.in
$(M4) -Dcondbranch_opt=@condbranch_opt@ -DSTACK_CACHE_FILE=cache-fast$(STACK_CACHE_DEFAULT_FAST).vmg $(srcdir)/prim >$@
prim-fast.b: prim cache-fast$(STACK_CACHE_DEFAULT_FAST).vmg cache-regs$(STACK_CACHE_REGS).vmg peeprules.vmg Makefile
$(M4) -Dcondbranch_opt=@condbranch_opt@ -DSTACK_CACHE_FILE=cache-fast$(STACK_CACHE_DEFAULT_FAST).vmg -DSTACK_CACHE_REGS=cache-regs$(STACK_CACHE_REGS).vmg $(srcdir)/prim >$@
sleep 1 #should make hpux-workaround unnecessary
$(FORTH_GEN_ENGINE_FAST): prim-fast.b prims2x.fs
......
......@@ -55,12 +55,7 @@
\E state S7
\E state S8
\E S3 state-disable
\E S4 state-disable
\E S5 state-disable
\E S6 state-disable
\E S7 state-disable
\E S8 state-disable
include(STACK_CACHE_REGS)
\E ss0 data-stack S0 set-ss
\E ss1 data-stack S1 set-ss
......
\ stack cache setup
\ stack cache setup: default state S1
\ Copyright (C) 2003,2004,2005,2006,2007 Free Software Foundation, Inc.
......@@ -59,12 +59,7 @@
\E state S7
\E state S8
\E S3 state-disable
\E S4 state-disable
\E S5 state-disable
\E S6 state-disable
\E S7 state-disable
\E S8 state-disable
include(STACK_CACHE_REGS)
\E ss0 data-stack S0 set-ss
\E ss1 data-stack S1 set-ss
......
......@@ -55,6 +55,8 @@
\E state S7
\E state S8
include(STACK_CACHE_REGS)
\E ss0 data-stack S0 set-ss
\E ss1 data-stack S1 set-ss
\E ss2 data-stack S2 set-ss
......
......@@ -55,6 +55,8 @@
\E state S7
\E state S8
include(STACK_CACHE_REGS)
\E ss0 data-stack S0 set-ss
\E ss1 data-stack S1 set-ss
\E ss2 data-stack S2 set-ss
......
......@@ -55,6 +55,8 @@
\E state S7
\E state S8
include(STACK_CACHE_REGS)
\E ss0 data-stack S0 set-ss
\E ss1 data-stack S1 set-ss
\E ss2 data-stack S2 set-ss
......
\ stack cache diablers: maximun state S1
\ Copyright (C) 2008 Free Software Foundation, Inc.
\ This file is part of Gforth.
\ Gforth is free software; you can redistribute it and/or
\ modify it under the terms of the GNU General Public License
\ as published by the Free Software Foundation, either version 3
\ of the License, or (at your option) any later version.
\ This program is distributed in the hope that it will be useful,
\ but WITHOUT ANY WARRANTY; without even the implied warranty of
\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\ GNU General Public License for more details.
\ You should have received a copy of the GNU General Public License
\ along with this program. If not, see http://www.gnu.org/licenses/.
\E S2 state-disable
\E S3 state-disable
\E S4 state-disable
\E S5 state-disable
\E S6 state-disable
\E S7 state-disable
\E S8 state-disable
\ stack cache diablers: maximun state S2
\ Copyright (C) 2008 Free Software Foundation, Inc.
\ This file is part of Gforth.
\ Gforth is free software; you can redistribute it and/or
\ modify it under the terms of the GNU General Public License
\ as published by the Free Software Foundation, either version 3
\ of the License, or (at your option) any later version.
\ This program is distributed in the hope that it will be useful,
\ but WITHOUT ANY WARRANTY; without even the implied warranty of
\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\ GNU General Public License for more details.
\ You should have received a copy of the GNU General Public License
\ along with this program. If not, see http://www.gnu.org/licenses/.
\E S3 state-disable
\E S4 state-disable
\E S5 state-disable
\E S6 state-disable
\E S7 state-disable
\E S8 state-disable
\ stack cache diablers: maximun state S3
\ Copyright (C) 2008 Free Software Foundation, Inc.
\ This file is part of Gforth.
\ Gforth is free software; you can redistribute it and/or
\ modify it under the terms of the GNU General Public License
\ as published by the Free Software Foundation, either version 3
\ of the License, or (at your option) any later version.
\ This program is distributed in the hope that it will be useful,
\ but WITHOUT ANY WARRANTY; without even the implied warranty of
\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\ GNU General Public License for more details.
\ You should have received a copy of the GNU General Public License
\ along with this program. If not, see http://www.gnu.org/licenses/.
\E S4 state-disable
\E S5 state-disable
\E S6 state-disable
\E S7 state-disable
\E S8 state-disable
\ stack cache diablers: maximun state S4
\ Copyright (C) 2008 Free Software Foundation, Inc.
\ This file is part of Gforth.
\ Gforth is free software; you can redistribute it and/or
\ modify it under the terms of the GNU General Public License
\ as published by the Free Software Foundation, either version 3
\ of the License, or (at your option) any later version.
\ This program is distributed in the hope that it will be useful,
\ but WITHOUT ANY WARRANTY; without even the implied warranty of
\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\ GNU General Public License for more details.
\ You should have received a copy of the GNU General Public License
\ along with this program. If not, see http://www.gnu.org/licenses/.
\E S5 state-disable
\E S6 state-disable
\E S7 state-disable
\E S8 state-disable
......@@ -120,8 +120,9 @@ else
fi])
#variables mentioned in INSTALL
AC_ARG_VAR(CC, [The C compiler (must support GNU C 2.x); gcc-2.95 recommended.])
AC_ARG_VAR(CC, [The C compiler (must support GNU C 2.x).])
AC_ARG_VAR(FORTHSIZES, [Gforth command line options for the default stack and dictionary sizes (see INSTALL).])
AC_ARG_VAR(STACK_CACHE_REGS, [number of registers in the maximum stack cache state for gforth-fast and gforth-native (default platform-dependent).])
AC_ARG_VAR(STACK_CACHE_DEFAULT_FAST, [number of registers in the default stack cache state for gforth-fast and gforth-native (default 1).])
AC_ARG_VAR(GCC_PR15242_WORKAROUND, [Force the enabling (1) or disabling (0) of a workaround for a gcc-3.x performance bug (default unset: use workaround for gcc-3.x)])
......@@ -314,6 +315,9 @@ case "$host_cpu" in
test x$ac_cv_sizeof_long_long = x &&
($CC -v 2>&1 |grep -q 'gcc version 2.95') &&
ac_cv_sizeof_long_long=0
#The only architecture with enough callee-saved registers
test x$STACK_CACHE_REGS = x && STACK_CACHE_REGS=3
#or use 2, hardly slower at run-time and starts up faster
;;
*)
AC_MSG_WARN([Using a generic machine description])
......@@ -348,6 +352,11 @@ then
fi
AC_SUBST(MAKEINC)
AC_ARG_VAR(STACK_CACHE_REGS, [number of registers in the maximum stack cache state for gforth-fast and gforth-native (default platform-dependent).])
test x$STACK_CACHE_REGS = x && STACK_CACHE_REGS=1
AC_DEFINE_UNQUOTED(STACK_CACHE_REGS, $STACK_CACHE_REGS,
[number of registers in the maximum stack cache state for gforth-fast and gforth-native])
test x$STACK_CACHE_DEFAULT_FAST = x && STACK_CACHE_DEFAULT_FAST=1
AC_DEFINE_UNQUOTED(STACK_CACHE_DEFAULT_FAST, $STACK_CACHE_DEFAULT_FAST,
[number of registers in the default stack cache state for gforth-fast and gforth-native])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment