mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
replace a left shift from -1 by left shift of ~0
because a left shift of -1 isn't defined in the C standard
This commit is contained in:
parent
317d3300b4
commit
f3f1af3526
2 changed files with 4 additions and 4 deletions
|
@ -46,9 +46,9 @@
|
|||
#define PAGE_SIZE ( 1L << PAGE_BITS)
|
||||
/// Mask the page address without page map flags and XD flag
|
||||
#if 0
|
||||
#define PAGE_MASK (-1L << PAGE_BITS)
|
||||
#define PAGE_MASK ((~0L) << PAGE_BITS)
|
||||
#else
|
||||
#define PAGE_MASK ((-1L << PAGE_BITS) & ~PG_XD)
|
||||
#define PAGE_MASK (((~0L) << PAGE_BITS) & ~PG_XD)
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
extern const void kernel_start;
|
||||
extern const void kernel_end;
|
||||
|
||||
#define PAGE_2M_FLOOR(addr) (((addr) + (1L << 21) - 1) & (-1L << 21))
|
||||
#define PAGE_2M_CEIL(addr) ( (addr) & (-1L << 21))
|
||||
#define PAGE_2M_FLOOR(addr) (((addr) + (1L << 21) - 1) & ((~0L) << 21))
|
||||
#define PAGE_2M_CEIL(addr) ( (addr) & ((~0L) << 21))
|
||||
|
||||
/*
|
||||
* Kernel space VMA list and lock
|
||||
|
|
Loading…
Add table
Reference in a new issue