aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-01 02:10:17 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-01 02:10:17 +0000
commit1cb0661e009267a5d060c4686f0857784a8da228 (patch)
treec5049d98ae788761b67453d2ae1c6ed45a7422bf /exec.c
parent3233f0d463d299be89e2672928fc215dc99c2c71 (diff)
downloadqemu-1cb0661e009267a5d060c4686f0857784a8da228.zip
qemu-1cb0661e009267a5d060c4686f0857784a8da228.tar.gz
qemu-1cb0661e009267a5d060c4686f0857784a8da228.tar.bz2
arm: Reserve code buffer in memory range reachable for pc-relative branch.
Unfortunately this range is so narrow that I'm not sure if it makes more sense to always use memory load to pc kind of branch instead. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5844 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/exec.c b/exec.c
index 3523c95..1aa6432 100644
--- a/exec.c
+++ b/exec.c
@@ -436,6 +436,12 @@ static void code_gen_alloc(unsigned long tb_size)
start = (void *) 0x60000000UL;
if (code_gen_buffer_size > (512 * 1024 * 1024))
code_gen_buffer_size = (512 * 1024 * 1024);
+#elif defined(__arm__)
+ /* Map the buffer below 64M, so we can use direct calls and branches */
+ flags |= MAP_FIXED;
+ start = (void *) 0x01000000UL;
+ if (code_gen_buffer_size > 16 * 1024 * 1024)
+ code_gen_buffer_size = 16 * 1024 * 1024;
#endif
code_gen_buffer = mmap(start, code_gen_buffer_size,
PROT_WRITE | PROT_READ | PROT_EXEC,