x86emu.c (10b3b54548f2290bbe8d8f88c59c28d12b7a635d) | x86emu.c (205d67b00d81bcc0c8e84f20f95b26ed94acb923) |
---|---|
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$ */ 4 5/* 6 * 7 * Realmode X86 Emulator Library 8 * --- 19 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 | 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$ */ 4 5/* 6 * 7 * Realmode X86 Emulator Library 8 * --- 19 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); | |