Message ID | 20170531220129.27724-20-aurelien@aurel32.net |
---|---|
State | New |
Headers | show |
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index aaa347c121..6dfa087ff1 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/mem_helper.c @@ -61,7 +61,7 @@ static inline uint32_t adj_len_to_page(uint32_t len, uint64_t addr) { #ifndef CONFIG_USER_ONLY if ((addr & ~TARGET_PAGE_MASK) + len - 1 >= TARGET_PAGE_SIZE) { - return -addr & ~TARGET_PAGE_MASK; + return -(addr | TARGET_PAGE_MASK); } #endif return len;