aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2012-09-21 10:40:48 -0700
committerRichard Henderson <rth@twiddle.net>2012-09-21 22:02:16 +0200
commitd5dd696fe3049657c08eb14f40cb74b6e94e79cc (patch)
tree02e02abb7418e3674c45c22da8a8cff95173c3c1 /exec.c
parenta221ae3fcc55fcc3911587bc572af88eed3342dd (diff)
downloadqemu-d5dd696fe3049657c08eb14f40cb74b6e94e79cc.zip
qemu-d5dd696fe3049657c08eb14f40cb74b6e94e79cc.tar.gz
qemu-d5dd696fe3049657c08eb14f40cb74b6e94e79cc.tar.bz2
tcg-sparc: Don't MAP_FIXED on top of the program
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 <rth@twiddle.net>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c6
1 files 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);
}