@@ -37,42 +37,14 @@ void AddressableBits::SetProcessMasks(Process &process) {
3737 if (m_low_memory_addr_bits == 0 && m_high_memory_addr_bits == 0 )
3838 return ;
3939
40- // If we don't have an addressable bits value for low memory,
41- // see if we have a Code/Data mask already, and use that.
42- // Or use the high memory addressable bits value as a last
43- // resort.
44- addr_t low_addr_mask;
45- if (m_low_memory_addr_bits == 0 ) {
46- if (process.GetCodeAddressMask () != UINT64_MAX)
47- low_addr_mask = process.GetCodeAddressMask ();
48- else if (process.GetDataAddressMask () != UINT64_MAX)
49- low_addr_mask = process.GetDataAddressMask ();
50- else
51- low_addr_mask = ~((1ULL << m_high_memory_addr_bits) - 1 );
52- } else {
53- low_addr_mask = ~((1ULL << m_low_memory_addr_bits) - 1 );
40+ if (m_low_memory_addr_bits != 0 ) {
41+ addr_t low_addr_mask = ~((1ULL << m_low_memory_addr_bits) - 1 );
42+ process.SetCodeAddressMask (low_addr_mask);
43+ process.SetDataAddressMask (low_addr_mask);
5444 }
5545
56- // If we don't have an addressable bits value for high memory,
57- // see if we have a Code/Data mask already, and use that.
58- // Or use the low memory addressable bits value as a last
59- // resort.
60- addr_t hi_addr_mask;
61- if (m_high_memory_addr_bits == 0 ) {
62- if (process.GetHighmemCodeAddressMask () != UINT64_MAX)
63- hi_addr_mask = process.GetHighmemCodeAddressMask ();
64- else if (process.GetHighmemDataAddressMask () != UINT64_MAX)
65- hi_addr_mask = process.GetHighmemDataAddressMask ();
66- else
67- hi_addr_mask = ~((1ULL << m_low_memory_addr_bits) - 1 );
68- } else {
69- hi_addr_mask = ~((1ULL << m_high_memory_addr_bits) - 1 );
70- }
71-
72- process.SetCodeAddressMask (low_addr_mask);
73- process.SetDataAddressMask (low_addr_mask);
74-
75- if (low_addr_mask != hi_addr_mask) {
46+ if (m_high_memory_addr_bits != 0 ) {
47+ addr_t hi_addr_mask = ~((1ULL << m_high_memory_addr_bits) - 1 );
7648 process.SetHighmemCodeAddressMask (hi_addr_mask);
7749 process.SetHighmemDataAddressMask (hi_addr_mask);
7850 }
0 commit comments