[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/39] translate-all: Adjust 256mb testing for mips64
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PULL 15/39] translate-all: Adjust 256mb testing for mips64 |
Date: |
Thu, 12 May 2016 14:13:16 -1000 |
Make sure we preserve the high 32-bits when masking for mips64.
Signed-off-by: Richard Henderson <address@hidden>
---
translate-all.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/translate-all.c b/translate-all.c
index 93b91ba..79a515d 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -515,7 +515,7 @@ static inline size_t size_code_gen_buffer(size_t tb_size)
that the buffer not cross a 256MB boundary. */
static inline bool cross_256mb(void *addr, size_t size)
{
- return ((uintptr_t)addr ^ ((uintptr_t)addr + size)) & 0xf0000000;
+ return ((uintptr_t)addr ^ ((uintptr_t)addr + size)) & ~0x0ffffffful;
}
/* We weren't able to allocate a buffer without crossing that boundary,
@@ -523,7 +523,7 @@ static inline bool cross_256mb(void *addr, size_t size)
Returns the new base of the buffer, and adjusts code_gen_buffer_size. */
static inline void *split_cross_256mb(void *buf1, size_t size1)
{
- void *buf2 = (void *)(((uintptr_t)buf1 + size1) & 0xf0000000);
+ void *buf2 = (void *)(((uintptr_t)buf1 + size1) & ~0x0ffffffful);
size_t size2 = buf1 + size1 - buf2;
size1 = buf2 - buf1;
--
2.5.5
- [Qemu-devel] [PULL 04/39] tci: Make direct jump patching thread-safe, (continued)
- [Qemu-devel] [PULL 04/39] tci: Make direct jump patching thread-safe, Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 06/39] tcg/i386: Make direct jump patching thread-safe, Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 08/39] tcg/arm: Make direct jump patching thread-safe, Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 10/39] tcg/sparc: Make direct jump patching thread-safe, Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 05/39] tcg/ppc: Make direct jump patching thread-safe, Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 07/39] tcg/s390: Make direct jump patching thread-safe, Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 09/39] tcg/aarch64: Make direct jump patching thread-safe, Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 11/39] tcg/mips: Make direct jump patching thread-safe, Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 12/39] tcg: Note requirement on atomic direct jump patching, Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 13/39] translate-all: remove redundant setting of tcg_ctx.code_gen_buffer_size, Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 15/39] translate-all: Adjust 256mb testing for mips64,
Richard Henderson <=
- [Qemu-devel] [PULL 14/39] translate-all: add missing munmap of the code_gen guard page for MIPS, Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 16/39] tcg: Clean up direct block chaining data fields, Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 17/39] tcg: Use uintptr_t type for jmp_list_{next|first} fields of TB, Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 18/39] tcg: Rearrange tb_link_page() to avoid forward declaration, Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 19/39] tcg: Init TB's direct jumps before making it visible, Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 21/39] tcg: Rename tb_jmp_remove() to tb_remove_from_jmp_list(), Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 20/39] tcg: Clarify thread safety check in tb_add_jump(), Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 23/39] tcg: Clean up tb_jmp_unlink(), Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 22/39] tcg: Extract removing of jumps to TB from tb_phys_invalidate(), Richard Henderson, 2016/05/12
- [Qemu-devel] [PULL 24/39] tcg: Clean up direct block chaining safety checks, Richard Henderson, 2016/05/12