Browse Source

fix evil gcc

pull/4219/head
Exverge 7 days ago
parent
commit
54a2182a97
No known key found for this signature in database GPG Key ID: DAD399BCC5FB77E4
  1. 5
      src/common/page_table.h

5
src/common/page_table.h

@ -56,7 +56,10 @@ struct PageTable {
public: public:
struct Data { struct Data {
Data(bool marked_, PageType type_, u16 block_, u64 page_) Data(bool marked_, PageType type_, u16 block_, u64 page_)
: marked(marked_), type(static_cast<u64>(type_)), block(block_), page(page_ >> ATTRIBUTE_BITS) {}
: marked(static_cast<u64>(marked_) & 0b1)
, type(static_cast<u64>(type_) & ((1ULL << 2) - 1))
, block(static_cast<u64>(block_) & ((1ULL << 9) - 1))
, page((page_ >> ATTRIBUTE_BITS) & ((1ULL << 52) - 1)) {}
u64 marked : 1; u64 marked : 1;
u64 type : 2; u64 type : 2;
u64 block : 9; // TODO: is 9 bits to little? we can use the upper 8 bits if needed u64 block : 9; // TODO: is 9 bits to little? we can use the upper 8 bits if needed

Loading…
Cancel
Save