105b261ecSmrg/* 205b261ecSmrg * Copyright (c) 2000-2001 by The XFree86 Project, Inc. 305b261ecSmrg * 405b261ecSmrg * Permission is hereby granted, free of charge, to any person obtaining a 505b261ecSmrg * copy of this software and associated documentation files (the "Software"), 605b261ecSmrg * to deal in the Software without restriction, including without limitation 705b261ecSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 805b261ecSmrg * and/or sell copies of the Software, and to permit persons to whom the 905b261ecSmrg * Software is furnished to do so, subject to the following conditions: 1005b261ecSmrg * 1105b261ecSmrg * The above copyright notice and this permission notice shall be included in 1205b261ecSmrg * all copies or substantial portions of the Software. 1305b261ecSmrg * 1405b261ecSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1505b261ecSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1605b261ecSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1705b261ecSmrg * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 1805b261ecSmrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1905b261ecSmrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2005b261ecSmrg * OTHER DEALINGS IN THE SOFTWARE. 2105b261ecSmrg * 2205b261ecSmrg * Except as contained in this notice, the name of the copyright holder(s) 2305b261ecSmrg * and author(s) shall not be used in advertising or otherwise to promote 2405b261ecSmrg * the sale, use or other dealings in this Software without prior written 2505b261ecSmrg * authorization from the copyright holder(s) and author(s). 2605b261ecSmrg */ 2705b261ecSmrg 2805b261ecSmrg#ifdef HAVE_XORG_CONFIG_H 2905b261ecSmrg#include <xorg-config.h> 3005b261ecSmrg#endif 3105b261ecSmrg 3205b261ecSmrg#ifndef _INT10DEFINES_H_ 3305b261ecSmrg#define _INT10DEFINES_H_ 1 3405b261ecSmrg 3505b261ecSmrg#ifdef _VM86_LINUX 3605b261ecSmrg 3705b261ecSmrg#include <asm/vm86.h> 3805b261ecSmrg 3905b261ecSmrg#define CPU_R(type,name,num) \ 4005b261ecSmrg (((type *)&(((struct vm86_struct *)REG->cpuRegs)->regs.name))[num]) 4105b261ecSmrg#define CPU_RD(name,num) CPU_R(CARD32,name,num) 4205b261ecSmrg#define CPU_RW(name,num) CPU_R(CARD16,name,num) 4305b261ecSmrg#define CPU_RB(name,num) CPU_R(CARD8,name,num) 4405b261ecSmrg 4505b261ecSmrg#define X86_EAX CPU_RD(eax,0) 4605b261ecSmrg#define X86_EBX CPU_RD(ebx,0) 4705b261ecSmrg#define X86_ECX CPU_RD(ecx,0) 4805b261ecSmrg#define X86_EDX CPU_RD(edx,0) 4905b261ecSmrg#define X86_ESI CPU_RD(esi,0) 5005b261ecSmrg#define X86_EDI CPU_RD(edi,0) 5105b261ecSmrg#define X86_EBP CPU_RD(ebp,0) 5205b261ecSmrg#define X86_EIP CPU_RD(eip,0) 5305b261ecSmrg#define X86_ESP CPU_RD(esp,0) 5405b261ecSmrg#define X86_EFLAGS CPU_RD(eflags,0) 5505b261ecSmrg 5605b261ecSmrg#define X86_FLAGS CPU_RW(eflags,0) 5705b261ecSmrg#define X86_AX CPU_RW(eax,0) 5805b261ecSmrg#define X86_BX CPU_RW(ebx,0) 5905b261ecSmrg#define X86_CX CPU_RW(ecx,0) 6005b261ecSmrg#define X86_DX CPU_RW(edx,0) 6105b261ecSmrg#define X86_SI CPU_RW(esi,0) 6205b261ecSmrg#define X86_DI CPU_RW(edi,0) 6305b261ecSmrg#define X86_BP CPU_RW(ebp,0) 6405b261ecSmrg#define X86_IP CPU_RW(eip,0) 6505b261ecSmrg#define X86_SP CPU_RW(esp,0) 6605b261ecSmrg#define X86_CS CPU_RW(cs,0) 6705b261ecSmrg#define X86_DS CPU_RW(ds,0) 6805b261ecSmrg#define X86_ES CPU_RW(es,0) 6905b261ecSmrg#define X86_SS CPU_RW(ss,0) 7005b261ecSmrg#define X86_FS CPU_RW(fs,0) 7105b261ecSmrg#define X86_GS CPU_RW(gs,0) 7205b261ecSmrg 7305b261ecSmrg#define X86_AL CPU_RB(eax,0) 7405b261ecSmrg#define X86_BL CPU_RB(ebx,0) 7505b261ecSmrg#define X86_CL CPU_RB(ecx,0) 7605b261ecSmrg#define X86_DL CPU_RB(edx,0) 7705b261ecSmrg 7805b261ecSmrg#define X86_AH CPU_RB(eax,1) 7905b261ecSmrg#define X86_BH CPU_RB(ebx,1) 8005b261ecSmrg#define X86_CH CPU_RB(ecx,1) 8105b261ecSmrg#define X86_DH CPU_RB(edx,1) 8205b261ecSmrg 8305b261ecSmrg#elif defined(_X86EMU) 8405b261ecSmrg 8505b261ecSmrg#include "xf86x86emu.h" 8605b261ecSmrg 8705b261ecSmrg#endif 8805b261ecSmrg 8905b261ecSmrg#endif 90