summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authordcs <dcs@FreeBSD.org>1999-11-23 11:17:37 +0000
committerdcs <dcs@FreeBSD.org>1999-11-23 11:17:37 +0000
commit53dc8c1815c31957069f05dca2c96c84466398b4 (patch)
tree91ecc484a943a67caa8e856d75e378b23aa4b0c4 /sys/boot
parenta96d7080dc5f043e9173190479e0fa296d44d498 (diff)
downloadFreeBSD-src-53dc8c1815c31957069f05dca2c96c84466398b4.zip
FreeBSD-src-53dc8c1815c31957069f05dca2c96c84466398b4.tar.gz
(Hopefully) make all necessary changes for ficl to support alpha.
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/ficl/alpha/sysdep.h4
-rw-r--r--sys/boot/ficl/i386/sysdep.h4
-rw-r--r--sys/boot/ficl/sysdep.h4
-rw-r--r--sys/boot/ficl/testmain.c10
-rw-r--r--sys/boot/ficl/words.c2
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;
OpenPOWER on IntegriCloud