cleanup
This commit is contained in:
parent
9e85439006
commit
7d7f18b585
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: cpu.h,v 1.634 2009-12-28 09:26:22 sshwarts Exp $
|
||||
// $Id: cpu.h,v 1.635 2010-01-19 14:43:46 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001-2009 The Bochs Project
|
||||
@ -3186,7 +3186,6 @@ public: // for now...
|
||||
Bit32u *dword1, Bit32u *dword2, Bit32u *dword3, unsigned exception_no);
|
||||
BX_SMF bx_bool fetch_raw_descriptor2_64(const bx_selector_t *selector,
|
||||
Bit32u *dword1, Bit32u *dword2, Bit32u *dword3);
|
||||
BX_SMF void loadSRegLMNominal(unsigned seg, unsigned selector, unsigned dpl);
|
||||
#endif
|
||||
BX_SMF void push_16(Bit16u value16) BX_CPP_AttrRegparmN(1);
|
||||
BX_SMF void push_32(Bit32u value32) BX_CPP_AttrRegparmN(1);
|
||||
|
@ -1,5 +1,5 @@
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// $Id: ctrl_xfer_pro.cc,v 1.80 2009-12-17 11:11:58 sshwarts Exp $
|
||||
// $Id: ctrl_xfer_pro.cc,v 1.81 2010-01-19 14:43:47 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001-2009 The Bochs Project
|
||||
@ -106,9 +106,6 @@ BX_CPU_C::load_cs(bx_selector_t *selector, bx_descriptor_t *descriptor, Bit8u cp
|
||||
|
||||
#if BX_SUPPORT_X86_64
|
||||
if (long_mode()) {
|
||||
if (descriptor->u.segment.l) {
|
||||
loadSRegLMNominal(BX_SEG_REG_CS, selector->value, cpl);
|
||||
}
|
||||
handleCpuModeChange();
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// $Id: iret.cc,v 1.46 2009-10-14 20:45:29 sshwarts Exp $
|
||||
// $Id: iret.cc,v 1.47 2010-01-19 14:43:47 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) 2005-2009 Stanislav Shwartsman
|
||||
@ -542,7 +542,7 @@ BX_CPU_C::long_iret(bxInstruction_c *i)
|
||||
else {
|
||||
// we are in 64-bit mode !
|
||||
load_null_selector(&BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS], raw_ss_selector);
|
||||
loadSRegLMNominal(BX_SEG_REG_SS, raw_ss_selector, cs_selector.rpl);
|
||||
// loadSRegLMNominal(BX_SEG_REG_SS, raw_ss_selector, cs_selector.rpl);
|
||||
}
|
||||
|
||||
if (StackAddrSize64()) RSP = new_rsp;
|
||||
|
@ -1,5 +1,5 @@
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// $Id: ret_far.cc,v 1.23 2009-11-19 20:00:35 sshwarts Exp $
|
||||
// $Id: ret_far.cc,v 1.24 2010-01-19 14:43:47 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) 2005-2009 Stanislav Shwartsman
|
||||
@ -216,7 +216,7 @@ BX_CPU_C::return_protected(bxInstruction_c *i, Bit16u pop_bytes)
|
||||
else {
|
||||
// we are in 64-bit mode !
|
||||
load_null_selector(&BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS], raw_ss_selector);
|
||||
loadSRegLMNominal(BX_SEG_REG_SS, raw_ss_selector, cs_selector.rpl);
|
||||
// loadSRegLMNominal(BX_SEG_REG_SS, raw_ss_selector, cs_selector.rpl);
|
||||
}
|
||||
|
||||
if (StackAddrSize64())
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: segment_ctrl_pro.cc,v 1.126 2009-12-28 09:26:22 sshwarts Exp $
|
||||
// $Id: segment_ctrl_pro.cc,v 1.127 2010-01-19 14:43:47 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001-2009 The Bochs Project
|
||||
@ -233,21 +233,6 @@ BX_CPU_C::load_null_selector(bx_segment_reg_t *seg, unsigned value)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if BX_SUPPORT_X86_64
|
||||
void BX_CPU_C::loadSRegLMNominal(unsigned segI, unsigned selector, unsigned dpl)
|
||||
{
|
||||
bx_segment_reg_t *seg = & BX_CPU_THIS_PTR sregs[segI];
|
||||
|
||||
// Load a segment register in long-mode with nominal values,
|
||||
// so descriptor cache values are compatible with existing checks.
|
||||
seg->cache.u.segment.base = 0;
|
||||
seg->cache.valid = 1;
|
||||
seg->cache.dpl = dpl;
|
||||
|
||||
seg->selector.value = selector;
|
||||
}
|
||||
#endif
|
||||
|
||||
BX_CPP_INLINE void BX_CPU_C::validate_seg_reg(unsigned seg)
|
||||
{
|
||||
/*
|
||||
@ -546,18 +531,7 @@ BX_CPU_C::load_ss(bx_selector_t *selector, bx_descriptor_t *descriptor, Bit8u cp
|
||||
BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].selector = *selector;
|
||||
BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].cache = *descriptor;
|
||||
BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].selector.rpl = cpl;
|
||||
|
||||
#if BX_SUPPORT_X86_64
|
||||
if (BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) {
|
||||
loadSRegLMNominal(BX_SEG_REG_SS, selector->value, cpl);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if ((BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].selector.value & 0xfffc) == 0)
|
||||
BX_PANIC(("load_ss(): null selector passed"));
|
||||
|
||||
if (!BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].cache.valid)
|
||||
BX_PANIC(("load_ss(): invalid selector/descriptor passed."));
|
||||
BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].cache.valid = 1;
|
||||
}
|
||||
|
||||
void BX_CPU_C::fetch_raw_descriptor(const bx_selector_t *selector,
|
||||
|
Loading…
Reference in New Issue
Block a user