diff options
author | scottl <scottl@FreeBSD.org> | 2002-08-31 01:04:53 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2002-08-31 01:04:53 +0000 |
commit | 2fec81a60fa27b997736f46fe7e041d0d75a4b4e (patch) | |
tree | be96c9905e45fd8534ae75c0345d8c4d8080e714 /sys/boot/ficl | |
parent | 7817fdfb01f70714560eebd62ad9cf0e649affd6 (diff) | |
download | FreeBSD-src-2fec81a60fa27b997736f46fe7e041d0d75a4b4e.zip FreeBSD-src-2fec81a60fa27b997736f46fe7e041d0d75a4b4e.tar.gz |
Make ficl work on sparc64. The assumption that int == long == void * is
very pervasive in this code. This fixes a few of those assumptions and
band-aids over some others.
Tested on: ia32 alpha sparc64
Reviewed by: peter jake (in concept)
Diffstat (limited to 'sys/boot/ficl')
-rw-r--r-- | sys/boot/ficl/prefix.c | 2 | ||||
-rw-r--r-- | sys/boot/ficl/words.c | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/boot/ficl/prefix.c b/sys/boot/ficl/prefix.c index 447f740..a34fc6c 100644 --- a/sys/boot/ficl/prefix.c +++ b/sys/boot/ficl/prefix.c @@ -104,7 +104,7 @@ int ficlParsePrefix(FICL_VM *pVM, STRINGINFO si) vmSetTibIndex(pVM, si.cp + n - pVM->tib.cp ); vmExecute(pVM, pFW); - return FICL_TRUE; + return (int)FICL_TRUE; } pFW = pFW->link; } diff --git a/sys/boot/ficl/words.c b/sys/boot/ficl/words.c index 2f50100..9ede537 100644 --- a/sys/boot/ficl/words.c +++ b/sys/boot/ficl/words.c @@ -732,7 +732,7 @@ static void ficlSprintf(FICL_VM *pVM) /* */ int base = 10; int unsignedInteger = FALSE; - int append = FICL_TRUE; + FICL_INT append = FICL_TRUE; while (format < formatStop) { @@ -816,7 +816,7 @@ static void ficlSprintf(FICL_VM *pVM) /* */ } } - if (append == FICL_TRUE) + if (append != FICL_FALSE) { if (!desiredLength) desiredLength = actualLength; @@ -1262,7 +1262,7 @@ static void ifParen(FICL_VM *pVM) } else { /* take branch (to else/endif/begin) */ - vmBranchRelative(pVM, *(int *)(pVM->ip)); + vmBranchRelative(pVM, (uintptr_t)*(pVM->ip)); } return; @@ -1311,7 +1311,7 @@ static void elseCoIm(FICL_VM *pVM) static void branchParen(FICL_VM *pVM) { - vmBranchRelative(pVM, *(int *)(pVM->ip)); + vmBranchRelative(pVM, (uintptr_t)*(pVM->ip)); return; } @@ -1473,7 +1473,7 @@ static int ficlParseWord(FICL_VM *pVM, STRINGINFO si) } vmExecute(pVM, tempFW); - return FICL_TRUE; + return (int)FICL_TRUE; } } @@ -1489,7 +1489,7 @@ static int ficlParseWord(FICL_VM *pVM, STRINGINFO si) { dictAppendCell(dp, LVALUEtoCELL(tempFW)); } - return FICL_TRUE; + return (int)FICL_TRUE; } } @@ -1922,7 +1922,7 @@ static void loopParen(FICL_VM *pVM) else { /* update index, branch to loop head */ stackSetTop(pVM->rStack, LVALUEtoCELL(index)); - vmBranchRelative(pVM, *(int *)(pVM->ip)); + vmBranchRelative(pVM, (uintptr_t)*(pVM->ip)); } return; @@ -1957,7 +1957,7 @@ static void plusLoopParen(FICL_VM *pVM) else { /* update index, branch to loop head */ stackSetTop(pVM->rStack, LVALUEtoCELL(index)); - vmBranchRelative(pVM, *(int *)(pVM->ip)); + vmBranchRelative(pVM, (uintptr_t)*(pVM->ip)); } return; |