coding style changes, tab2space, macro2function or macro2const

This commit is contained in:
Stanislav Shwartsman 2019-10-17 19:23:27 +00:00
parent eec720c62b
commit 72b9d26717
4 changed files with 58 additions and 56 deletions

View File

@ -141,8 +141,7 @@ struct bx_cr4_t {
BX_CPP_INLINE void set32(Bit32u val) { val32 = val; }
};
#define BX_CR4_FLUSH_TLB_MASK \
(BX_CR4_PSE_MASK | BX_CR4_PAE_MASK | BX_CR4_PGE_MASK | BX_CR4_PCIDE_MASK | BX_CR4_SMEP_MASK | BX_CR4_SMAP_MASK | BX_CR4_PKE_MASK)
const Bit32u BX_CR4_FLUSH_TLB_MASK = (BX_CR4_PSE_MASK | BX_CR4_PAE_MASK | BX_CR4_PGE_MASK | BX_CR4_PCIDE_MASK | BX_CR4_SMEP_MASK | BX_CR4_SMAP_MASK | BX_CR4_PKE_MASK);
#endif // #if BX_CPU_LEVEL >= 5

View File

@ -35,7 +35,10 @@
const Bit32u BX_TLB_SIZE = 1024;
const Bit32u BX_TLB_MASK = ((BX_TLB_SIZE-1) << 12);
#define BX_TLB_INDEX_OF(lpf, len) ((((unsigned)(lpf) + (len)) & BX_TLB_MASK) >> 12)
BX_CPP_INLINE unsigned BX_TLB_INDEX_OF(bx_address lpf, unsigned len)
{
return (((unsigned(lpf) + len) & BX_TLB_MASK) >> 12);
}
typedef bx_ptr_equiv_t bx_hostpageaddr_t;