View | Details | Raw Unified | Return to bug 208050
Collapse All | Expand All

(-)b/boot/ficl/amd64/sysdep.c (+36 lines)
Lines 14-19 Link Here
14
#include <stdlib.h>
14
#include <stdlib.h>
15
#else
15
#else
16
#include <stand.h>
16
#include <stand.h>
17
#if defined(__i386__) || defined(__x86_64__)
18
#include <machine/cpufunc.h>
19
#endif
17
#endif
20
#endif
18
#include "ficl.h"
21
#include "ficl.h"
19
22
Lines 77-82 void ficlFree (void *p) Link Here
77
    free(p);
80
    free(p);
78
}
81
}
79
82
83
#ifndef TESTMAIN
84
#if defined(__i386__) || defined(__x86_64__)
85
/* 
86
 * outb ( port# c -- )
87
 * Store a byte to I/O port number port#
88
 */
89
void
90
ficlOutb(FICL_VM *pVM)
91
{
92
	u_char c;
93
	u_int32_t port;
94
95
	port=stackPopUNS(pVM->pStack);
96
	c=(u_char)stackPopINT(pVM->pStack);
97
	outb(port,c);
98
}
99
100
/*
101
 * inb ( port# -- c )
102
 * Fetch a byte from I/O port number port#
103
 */
104
void
105
ficlInb(FICL_VM *pVM)
106
{
107
	u_char c;
108
	u_int32_t port;
109
110
	port=stackPopUNS(pVM->pStack);
111
	c=inb(port);
112
	stackPushINT(pVM->pStack,c);
113
}
114
#endif
115
#endif
80
116
81
/*
117
/*
82
** Stub function for dictionary access control - does nothing
118
** Stub function for dictionary access control - does nothing
(-)b/boot/ficl/ficl.h (-1 / +1 lines)
Lines 1113-1119 extern CELL dictIncrease; Link Here
1113
** Various FreeBSD goodies
1113
** Various FreeBSD goodies
1114
*/
1114
*/
1115
1115
1116
#if defined(__i386__) && !defined(TESTMAIN)
1116
#if (defined(__i386__) || defined(__x86_64__)) && !defined(TESTMAIN)
1117
extern void ficlOutb(FICL_VM *pVM);
1117
extern void ficlOutb(FICL_VM *pVM);
1118
extern void ficlInb(FICL_VM *pVM);
1118
extern void ficlInb(FICL_VM *pVM);
1119
#endif
1119
#endif
(-)b/boot/ficl/i386/sysdep.c (-2 / +2 lines)
Lines 14-20 Link Here
14
#include <stdlib.h>
14
#include <stdlib.h>
15
#else
15
#else
16
#include <stand.h>
16
#include <stand.h>
17
#ifdef __i386__
17
#if defined(__i386__) || defined(__x86_64__)
18
#include <machine/cpufunc.h>
18
#include <machine/cpufunc.h>
19
#endif
19
#endif
20
#endif
20
#endif
Lines 81-87 void ficlFree (void *p) Link Here
81
}
81
}
82
82
83
#ifndef TESTMAIN
83
#ifndef TESTMAIN
84
#ifdef __i386__
84
#if defined(__i386__) || defined(__x86_64__)
85
/* 
85
/* 
86
 * outb ( port# c -- )
86
 * outb ( port# c -- )
87
 * Store a byte to I/O port number port#
87
 * Store a byte to I/O port number port#
(-)b/boot/ficl/loader.c (-1 / +1 lines)
Lines 921-927 void ficlCompilePlatform(FICL_SYSTEM *pSys) Link Here
921
    dictAppendWord(dp, "findfile",  ficlFindfile,   FW_DEFAULT);
921
    dictAppendWord(dp, "findfile",  ficlFindfile,   FW_DEFAULT);
922
    dictAppendWord(dp, "ccall",	    ficlCcall,	    FW_DEFAULT);
922
    dictAppendWord(dp, "ccall",	    ficlCcall,	    FW_DEFAULT);
923
#ifndef TESTMAIN
923
#ifndef TESTMAIN
924
#ifdef __i386__
924
#if defined(__i386__) || defined(__x86_64__)
925
    dictAppendWord(dp, "outb",      ficlOutb,       FW_DEFAULT);
925
    dictAppendWord(dp, "outb",      ficlOutb,       FW_DEFAULT);
926
    dictAppendWord(dp, "inb",       ficlInb,        FW_DEFAULT);
926
    dictAppendWord(dp, "inb",       ficlInb,        FW_DEFAULT);
927
#endif
927
#endif

Return to bug 208050