diff options
author | Daniel C. Sobral <dcs@FreeBSD.org> | 1999-11-23 11:17:37 +0000 |
---|---|---|
committer | Daniel C. Sobral <dcs@FreeBSD.org> | 1999-11-23 11:17:37 +0000 |
commit | 99915e5b917f346cf7d7616482f73fae55ebe85c (patch) | |
tree | 91ecc484a943a67caa8e856d75e378b23aa4b0c4 /sys/boot | |
parent | 494b6f4cba34c948d90a90a0f895e1cdf6161f4c (diff) | |
download | src-99915e5b917f346cf7d7616482f73fae55ebe85c.tar.gz src-99915e5b917f346cf7d7616482f73fae55ebe85c.zip |
(Hopefully) make all necessary changes for ficl to support alpha.
Notes
Notes:
svn path=/head/; revision=53633
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/ficl/alpha/sysdep.h | 4 | ||||
-rw-r--r-- | sys/boot/ficl/i386/sysdep.h | 4 | ||||
-rw-r--r-- | sys/boot/ficl/sysdep.h | 4 | ||||
-rw-r--r-- | sys/boot/ficl/testmain.c | 10 | ||||
-rw-r--r-- | 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 99ccd5881c01..94159ea1a494 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 99ccd5881c01..94159ea1a494 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 99ccd5881c01..94159ea1a494 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 657d609c0a85..8871ca90819b 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 a24e9edd4c4b..8ca612a216fb 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; |