qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [5844] arm: Reserve code buffer in memory range reachable for pc-relative branch.
@ 2008-12-01  2:10 Andrzej Zaborowski
  0 siblings, 0 replies; only message in thread
From: Andrzej Zaborowski @ 2008-12-01  2:10 UTC (permalink / raw)
  To: qemu-devel

Revision: 5844
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5844
Author:   balrog
Date:     2008-12-01 02:10:17 +0000 (Mon, 01 Dec 2008)

Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/exec.c

Modified: trunk/exec.c
===================================================================
--- trunk/exec.c	2008-12-01 02:02:37 UTC (rev 5843)
+++ trunk/exec.c	2008-12-01 02:10:17 UTC (rev 5844)
@@ -436,6 +436,12 @@
         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,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-12-01  2:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-01  2:10 [Qemu-devel] [5844] arm: Reserve code buffer in memory range reachable for pc-relative branch Andrzej Zaborowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).