|
|
| version 1.11, 2008/03/22 04:03:08 | version 1.16, 2012/02/05 06:31:44 |
|---|---|
| Line 1 | Line 1 |
| /* $Id$ */ | |
| /* | /* |
| * Copyright (c) 2003 NONAKA Kimihiro | * Copyright (c) 2003 NONAKA Kimihiro |
| * All rights reserved. | * All rights reserved. |
| Line 39 typedef struct { | Line 37 typedef struct { |
| union { | union { |
| struct { | struct { |
| UINT32 segbase; | UINT32 segbase; |
| UINT32 segend; /* unused */ | UINT32 d_pad; |
| UINT32 limit; | UINT32 limit; |
| UINT8 c; /* 0 = data, 1 = code */ | UINT8 c; /* 0 = data, 1 = code */ |
| Line 151 typedef struct { | Line 149 typedef struct { |
| #define CPU_SYSDESC_TYPE_TSS_BUSY_IND 0x02 | #define CPU_SYSDESC_TYPE_TSS_BUSY_IND 0x02 |
| static INLINE void | void CPUCALL segdesc_init(int idx, UINT16 sreg, descriptor_t *sdp); |
| segdesc_clear(descriptor_t *sdp) | void CPUCALL load_descriptor(descriptor_t *sdp, UINT32 addr); |
| { | |
| memset((sdp), 0, sizeof(*sdp)); | |
| } | |
| void segdesc_init(int idx, UINT16 sreg, descriptor_t *sdp); | |
| void segdesc_set_default(int idx, UINT16 selector, descriptor_t *sdp); | |
| void load_descriptor(descriptor_t *sdp, UINT32 addr); | |
| void load_segreg(int idx, UINT16 selector, UINT16 *sregp, descriptor_t *sdp, int exc); | void CPUCALL load_segreg(int idx, UINT16 selector, UINT16 *sregp, descriptor_t *sdp, int exc); |
| #define LOAD_SEGREG1(idx, selector, e) \ | #define LOAD_SEGREG1(idx, selector, e) \ |
| load_segreg(idx, selector, &CPU_REGS_SREG(idx), &CPU_STAT_SREG(idx), e) | load_segreg(idx, selector, &CPU_REGS_SREG(idx), &CPU_STAT_SREG(idx), e) |
| #define LOAD_SEGREG(idx, selector) \ | #define LOAD_SEGREG(idx, selector) \ |
| LOAD_SEGREG1((idx), (selector), GP_EXCEPTION) | LOAD_SEGREG1((idx), (selector), GP_EXCEPTION) |
| void load_ss(UINT16 selector, const descriptor_t *sdp, int cpl); | void CPUCALL load_ss(UINT16 selector, const descriptor_t *sdp, int cpl); |
| void load_cs(UINT16 selector, const descriptor_t *sdp, int cpl); | void CPUCALL load_cs(UINT16 selector, const descriptor_t *sdp, int cpl); |
| void load_ldtr(UINT16 selector, int exc); | void CPUCALL load_ldtr(UINT16 selector, int exc); |
| /* | /* |
| Line 191 typedef struct { | Line 181 typedef struct { |
| descriptor_t desc; | descriptor_t desc; |
| } selector_t; | } selector_t; |
| int parse_selector(selector_t *ssp, UINT16 selector); | int CPUCALL parse_selector(selector_t *ssp, UINT16 selector); |
| int selector_is_not_present(const selector_t *ssp); | int CPUCALL selector_is_not_present(const selector_t *ssp); |
| #ifdef __cplusplus | #ifdef __cplusplus |
| } | } |