Deleted Added
full compact
x86emu.c (197019) x86emu.c (197383)
1/* $OpenBSD: x86emu.c,v 1.4 2009/06/18 14:19:21 pirofti Exp $ */
2/* $NetBSD: x86emu.c,v 1.7 2009/02/03 19:26:29 joerg Exp $ */
1/* $OpenBSD: x86emu.c,v 1.4 2009/06/18 14:19:21 pirofti Exp $ */
2/* $NetBSD: x86emu.c,v 1.7 2009/02/03 19:26:29 joerg Exp $ */
3/* $FreeBSD: head/sys/contrib/x86emu/x86emu.c 197019 2009-09-09 05:53:26Z delphij $ */
3/* $FreeBSD: head/sys/contrib/x86emu/x86emu.c 197383 2009-09-21 08:17:57Z delphij $ */
4
5/*
6 *
7 * Realmode X86 Emulator Library
8 *
9 * Copyright (C) 1996-1999 SciTech Software, Inc.
10 * Copyright (C) David Mosberger-Tang
11 * Copyright (C) 1999 Egbert Eich

--- 16 unchanged lines hidden (view full) ---

28 * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
29 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
30 * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
31 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
32 * PERFORMANCE OF THIS SOFTWARE.
33 *
34 */
35
4
5/*
6 *
7 * Realmode X86 Emulator Library
8 *
9 * Copyright (C) 1996-1999 SciTech Software, Inc.
10 * Copyright (C) David Mosberger-Tang
11 * Copyright (C) 1999 Egbert Eich

--- 16 unchanged lines hidden (view full) ---

28 * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
29 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
30 * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
31 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
32 * PERFORMANCE OF THIS SOFTWARE.
33 *
34 */
35
36#include <sys/param.h>
37#include <sys/kernel.h>
38#include <sys/module.h>
39
40#include <contrib/x86emu/x86emu.h>
41#include <contrib/x86emu/x86emu_regs.h>
42
43static void x86emu_intr_raise (struct x86emu *, uint8_t type);
44
45static void x86emu_exec_one_byte(struct x86emu *);
46static void x86emu_exec_two_byte(struct x86emu *);
47

--- 8282 unchanged lines hidden (view full) ---

8330pop_long(struct x86emu *emu)
8331{
8332 uint32_t res;
8333
8334 res = fetch_long(emu, emu->x86.R_SS, emu->x86.R_SP);
8335 emu->x86.R_SP += 4;
8336 return res;
8337}
36#include <contrib/x86emu/x86emu.h>
37#include <contrib/x86emu/x86emu_regs.h>
38
39static void x86emu_intr_raise (struct x86emu *, uint8_t type);
40
41static void x86emu_exec_one_byte(struct x86emu *);
42static void x86emu_exec_two_byte(struct x86emu *);
43

--- 8282 unchanged lines hidden (view full) ---

8326pop_long(struct x86emu *emu)
8327{
8328 uint32_t res;
8329
8330 res = fetch_long(emu, emu->x86.R_SS, emu->x86.R_SP);
8331 emu->x86.R_SP += 4;
8332 return res;
8333}
8338
8339static int
8340x86emu_modevent(module_t mod __unused, int type, void *data __unused)
8341{
8342 int err = 0;
8343
8344 switch (type) {
8345 case MOD_LOAD:
8346 break;
8347
8348 case MOD_UNLOAD:
8349 break;
8350
8351 default:
8352 err = ENOTSUP;
8353 break;
8354
8355 }
8356 return (err);
8357}
8358
8359static moduledata_t x86emu_mod = {
8360 "x86emu",
8361 x86emu_modevent,
8362 NULL,
8363};
8364
8365DECLARE_MODULE(x86emu, x86emu_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
8366MODULE_VERSION(x86emu, 1);