PCem

view src/x86_ops_prefix.h @ 142:bd46c39a78e8

Implemented selector limits on some instructions - fixes LBA2. GPFs in real mode now work. Selectors correctly zeroed on far return to lower privilege.
author TomW
date Wed Aug 13 20:33:56 2014 +0100
parents 9c201151bb4b
children
line source
1 static int op_CS(uint32_t fetchdat)
2 {
3 ea_seg = &_cs;
4 ssegs = 1;
5 cycles -= 4;
6 return 1;
7 }
8 static int op_DS(uint32_t fetchdat)
9 {
10 ea_seg = &_ds;
11 ssegs = 1;
12 cycles -= 4;
13 return 1;
14 }
15 static int op_ES(uint32_t fetchdat)
16 {
17 ea_seg = &_es;
18 ssegs = 1;
19 cycles -= 4;
20 return 1;
21 }
22 static int op_FS(uint32_t fetchdat)
23 {
24 ea_seg = &_fs;
25 ssegs = 1;
26 cycles -= 4;
27 return 1;
28 }
29 static int op_GS(uint32_t fetchdat)
30 {
31 ea_seg = &_gs;
32 ssegs = 1;
33 cycles -= 4;
34 return 1;
35 }
36 static int op_SS(uint32_t fetchdat)
37 {
38 ea_seg = &_ss;
39 ssegs = 1;
40 cycles -= 4;
41 return 1;
42 }
45 static int op_66(uint32_t fetchdat) /*Data size select*/
46 {
47 op32 = ((use32 & 0x100) ^ 0x100) | (op32 & 0x200);
48 cycles -= 2;
49 return 1;
50 }
51 static int op_67(uint32_t fetchdat) /*Address size select*/
52 {
53 op32 = ((use32 & 0x200) ^ 0x200) | (op32 & 0x100);
54 cycles -= 2;
55 return 1;
56 }