From 53dc8c1815c31957069f05dca2c96c84466398b4 Mon Sep 17 00:00:00 2001 From: dcs Date: Tue, 23 Nov 1999 11:17:37 +0000 Subject: (Hopefully) make all necessary changes for ficl to support alpha. --- sys/boot/ficl/alpha/sysdep.h | 4 ++++ sys/boot/ficl/i386/sysdep.h | 4 ++++ sys/boot/ficl/sysdep.h | 4 ++++ sys/boot/ficl/testmain.c | 10 +++++----- sys/boot/ficl/words.c | 2 +- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/sys/boot/ficl/alpha/sysdep.h b/sys/boot/ficl/alpha/sysdep.h index 99ccd58..94159ea 100644 --- a/sys/boot/ficl/alpha/sysdep.h +++ b/sys/boot/ficl/alpha/sysdep.h @@ -248,7 +248,11 @@ typedef struct ** machine. 3 would be appropriate for a 64 bit machine. */ #if !defined FICL_ALIGN +#if defined __i386__ #define FICL_ALIGN 2 +#elif defined __alpha__ +#define FICL_ALIGN 4 +#endif #define FICL_ALIGN_ADD ((1 << FICL_ALIGN) - 1) #endif diff --git a/sys/boot/ficl/i386/sysdep.h b/sys/boot/ficl/i386/sysdep.h index 99ccd58..94159ea 100644 --- a/sys/boot/ficl/i386/sysdep.h +++ b/sys/boot/ficl/i386/sysdep.h @@ -248,7 +248,11 @@ typedef struct ** machine. 3 would be appropriate for a 64 bit machine. */ #if !defined FICL_ALIGN +#if defined __i386__ #define FICL_ALIGN 2 +#elif defined __alpha__ +#define FICL_ALIGN 4 +#endif #define FICL_ALIGN_ADD ((1 << FICL_ALIGN) - 1) #endif diff --git a/sys/boot/ficl/sysdep.h b/sys/boot/ficl/sysdep.h index 99ccd58..94159ea 100644 --- a/sys/boot/ficl/sysdep.h +++ b/sys/boot/ficl/sysdep.h @@ -248,7 +248,11 @@ typedef struct ** machine. 3 would be appropriate for a 64 bit machine. */ #if !defined FICL_ALIGN +#if defined __i386__ #define FICL_ALIGN 2 +#elif defined __alpha__ +#define FICL_ALIGN 4 +#endif #define FICL_ALIGN_ADD ((1 << FICL_ALIGN) - 1) #endif diff --git a/sys/boot/ficl/testmain.c b/sys/boot/ficl/testmain.c index 657d609..8871ca9 100644 --- a/sys/boot/ficl/testmain.c +++ b/sys/boot/ficl/testmain.c @@ -161,7 +161,7 @@ static void ficlLoad(FICL_VM *pVM) ** any pending REFILLs (as required by FILE wordset) */ pVM->sourceID.i = -1; - ficlExec(pVM, "", 0); + ficlExec(pVM, ""); pVM->sourceID = id; fclose(fp); @@ -271,14 +271,14 @@ void buildTestInterface(void) int main(int argc, char **argv) { - char in[nINBUF]; + char in[256]; FICL_VM *pVM; ficlInitSystem(10000); buildTestInterface(); pVM = ficlNewVM(); - ficlExec(pVM, ".ver .( " __DATE__ " ) cr quit", -1); + ficlExec(pVM, ".ver .( " __DATE__ " ) cr quit"); /* ** load file from cmd line... @@ -286,7 +286,7 @@ int main(int argc, char **argv) if (argc > 1) { sprintf(in, ".( loading %s ) cr load %s\n cr", argv[1], argv[1]); - ficlExec(pVM, in, -1); + ficlExec(pVM, in); } for (;;) @@ -294,7 +294,7 @@ int main(int argc, char **argv) int ret; if (fgets(in, sizeof(in) - 1, stdin) == NULL) break; - ret = ficlExec(pVM, in, -1); + ret = ficlExec(pVM, in); if (ret == VM_USEREXIT) { ficlTermSystem(); diff --git a/sys/boot/ficl/words.c b/sys/boot/ficl/words.c index a24e9ed..8ca612a 100644 --- a/sys/boot/ficl/words.c +++ b/sys/boot/ficl/words.c @@ -1086,7 +1086,7 @@ static void ifParen(FICL_VM *pVM) } else { /* take branch (to else/endif/begin) */ - vmBranchRelative(pVM, (int)(*pVM->ip)); + vmBranchRelative(pVM, *(int*)(pVM->ip)); } return; -- cgit v1.1