[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/14] tcg-sparc: Don't MAP_FIXED on top of the prog
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 04/14] tcg-sparc: Don't MAP_FIXED on top of the program |
Date: |
Fri, 21 Sep 2012 19:04:57 -0700 |
The address we pick in sparc64.ld is also 0x60000000, so doing a fixed map
on top of that is guaranteed to blow up. Choosing 0x40000000 is exactly
right for the max of code_gen_buffer_size set below.
No need to ever use MAP_FIXED. While getting our desired address helps
optimize the generated code, we won't fail if we don't get it.
Signed-off-by: Richard Henderson <address@hidden>
---
exec.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/exec.c b/exec.c
index f22e9e6..4510985 100644
--- a/exec.c
+++ b/exec.c
@@ -543,8 +543,7 @@ static void code_gen_alloc(unsigned long tb_size)
code_gen_buffer_size = (800 * 1024 * 1024);
#elif defined(__sparc_v9__)
// Map the buffer below 2G, so we can use direct calls and branches
- flags |= MAP_FIXED;
- start = (void *) 0x60000000UL;
+ start = (void *) 0x40000000UL;
if (code_gen_buffer_size > (512 * 1024 * 1024))
code_gen_buffer_size = (512 * 1024 * 1024);
#elif defined(__arm__)
@@ -584,8 +583,7 @@ static void code_gen_alloc(unsigned long tb_size)
code_gen_buffer_size = (800 * 1024 * 1024);
#elif defined(__sparc_v9__)
// Map the buffer below 2G, so we can use direct calls and branches
- flags |= MAP_FIXED;
- addr = (void *) 0x60000000UL;
+ addr = (void *) 0x40000000UL;
if (code_gen_buffer_size > (512 * 1024 * 1024)) {
code_gen_buffer_size = (512 * 1024 * 1024);
}
--
1.7.11.4
- [Qemu-devel] [PATCH v3 00/14] Sparc TCG cleanup, Richard Henderson, 2012/09/21
- [Qemu-devel] [PATCH 03/14] tcg-sparc: Fix ADDX opcode., Richard Henderson, 2012/09/21
- [Qemu-devel] [PATCH 04/14] tcg-sparc: Don't MAP_FIXED on top of the program,
Richard Henderson <=
- [Qemu-devel] [PATCH 01/14] linux-user: Use memcpy in get_user/put_user., Richard Henderson, 2012/09/21
- [Qemu-devel] [PATCH 02/14] tcg-sparc: Hack in qemu_ld/st64 for 32-bit., Richard Henderson, 2012/09/21
- [Qemu-devel] [PATCH 05/14] tcg-sparc: Assume v9 cpu always, i.e. force v8plus in 32-bit mode., Richard Henderson, 2012/09/21
- [Qemu-devel] [PATCH 08/14] tcg-sparc: Change AREG0 in generated code to %i0., Richard Henderson, 2012/09/21
- [Qemu-devel] [PATCH 07/14] tcg-sparc: Support GUEST_BASE., Richard Henderson, 2012/09/21
- [Qemu-devel] [PATCH 09/14] tcg-sparc: Clean up cruft stemming from attempts to use global registers., Richard Henderson, 2012/09/21
- [Qemu-devel] [PATCH 06/14] tcg-sparc: Fix qemu_ld/st to handle 32-bit host., Richard Henderson, 2012/09/21
- [Qemu-devel] [PATCH 10/14] tcg-sparc: Mask shift immediates to avoid illegal insns., Richard Henderson, 2012/09/21
- [Qemu-devel] [PATCH 12/14] tcg-sparc: Add %g/%o registers to alloc_order, Richard Henderson, 2012/09/21
- [Qemu-devel] [PATCH 13/14] tcg-sparc: Fix and enable direct TB chaining., Richard Henderson, 2012/09/21