--- np2/i386c/ia32/instructions/seg_reg.c 2004/02/20 16:09:05 1.4 +++ np2/i386c/ia32/instructions/seg_reg.c 2011/01/15 17:17:23 1.7 @@ -1,5 +1,3 @@ -/* $Id: seg_reg.c,v 1.4 2004/02/20 16:09:05 monaka Exp $ */ - /* * Copyright (c) 2003 NONAKA Kimihiro * All rights reserved. @@ -12,8 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -47,7 +43,7 @@ LES_GwMp(void) madr = calc_ea_dst(op); dst = cpu_vmemoryread_w(CPU_INST_SEGREG_INDEX, madr); sreg = cpu_vmemoryread_w(CPU_INST_SEGREG_INDEX, madr + 2); - CPU_SET_SEGREG(CPU_ES_INDEX, sreg); + LOAD_SEGREG(CPU_ES_INDEX, sreg); *out = (UINT16)dst; return; } @@ -67,7 +63,7 @@ LES_GdMp(void) madr = calc_ea_dst(op); dst = cpu_vmemoryread_d(CPU_INST_SEGREG_INDEX, madr); sreg = cpu_vmemoryread_w(CPU_INST_SEGREG_INDEX, madr + 4); - CPU_SET_SEGREG(CPU_ES_INDEX, sreg); + LOAD_SEGREG(CPU_ES_INDEX, sreg); *out = dst; return; } @@ -87,7 +83,7 @@ LSS_GwMp(void) madr = calc_ea_dst(op); dst = cpu_vmemoryread_w(CPU_INST_SEGREG_INDEX, madr); sreg = cpu_vmemoryread_w(CPU_INST_SEGREG_INDEX, madr + 2); - CPU_SET_SEGREG(CPU_SS_INDEX, sreg); + LOAD_SEGREG(CPU_SS_INDEX, sreg); *out = (UINT16)dst; return; } @@ -107,7 +103,7 @@ LSS_GdMp(void) madr = calc_ea_dst(op); dst = cpu_vmemoryread_d(CPU_INST_SEGREG_INDEX, madr); sreg = cpu_vmemoryread_w(CPU_INST_SEGREG_INDEX, madr + 4); - CPU_SET_SEGREG(CPU_SS_INDEX, sreg); + LOAD_SEGREG(CPU_SS_INDEX, sreg); *out = dst; return; } @@ -127,7 +123,7 @@ LDS_GwMp(void) madr = calc_ea_dst(op); dst = cpu_vmemoryread_w(CPU_INST_SEGREG_INDEX, madr); sreg = cpu_vmemoryread_w(CPU_INST_SEGREG_INDEX, madr + 2); - CPU_SET_SEGREG(CPU_DS_INDEX, sreg); + LOAD_SEGREG(CPU_DS_INDEX, sreg); *out = (UINT16)dst; return; } @@ -147,7 +143,7 @@ LDS_GdMp(void) madr = calc_ea_dst(op); dst = cpu_vmemoryread_d(CPU_INST_SEGREG_INDEX, madr); sreg = cpu_vmemoryread_w(CPU_INST_SEGREG_INDEX, madr + 4); - CPU_SET_SEGREG(CPU_DS_INDEX, sreg); + LOAD_SEGREG(CPU_DS_INDEX, sreg); *out = dst; return; } @@ -167,7 +163,7 @@ LFS_GwMp(void) madr = calc_ea_dst(op); dst = cpu_vmemoryread_w(CPU_INST_SEGREG_INDEX, madr); sreg = cpu_vmemoryread_w(CPU_INST_SEGREG_INDEX, madr + 2); - CPU_SET_SEGREG(CPU_FS_INDEX, sreg); + LOAD_SEGREG(CPU_FS_INDEX, sreg); *out = (UINT16)dst; return; } @@ -187,7 +183,7 @@ LFS_GdMp(void) madr = calc_ea_dst(op); dst = cpu_vmemoryread_d(CPU_INST_SEGREG_INDEX, madr); sreg = cpu_vmemoryread_w(CPU_INST_SEGREG_INDEX, madr + 4); - CPU_SET_SEGREG(CPU_FS_INDEX, sreg); + LOAD_SEGREG(CPU_FS_INDEX, sreg); *out = dst; return; } @@ -207,7 +203,7 @@ LGS_GwMp(void) madr = calc_ea_dst(op); dst = cpu_vmemoryread_w(CPU_INST_SEGREG_INDEX, madr); sreg = cpu_vmemoryread_w(CPU_INST_SEGREG_INDEX, madr + 2); - CPU_SET_SEGREG(CPU_GS_INDEX, sreg); + LOAD_SEGREG(CPU_GS_INDEX, sreg); *out = (UINT16)dst; return; } @@ -227,7 +223,7 @@ LGS_GdMp(void) madr = calc_ea_dst(op); dst = cpu_vmemoryread_d(CPU_INST_SEGREG_INDEX, madr); sreg = cpu_vmemoryread_w(CPU_INST_SEGREG_INDEX, madr + 4); - CPU_SET_SEGREG(CPU_GS_INDEX, sreg); + LOAD_SEGREG(CPU_GS_INDEX, sreg); *out = dst; return; }