qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix dyngen failure on PPC.
@ 2005-04-30 11:10 David Woodhouse
  2005-05-01 17:04 ` Paul Brook
  0 siblings, 1 reply; 6+ messages in thread
From: David Woodhouse @ 2005-04-30 11:10 UTC (permalink / raw)
  To: Fabrice Bellard; +Cc: qemu-devel

GCC 4 occasionally generates functions with the 'blr' somewhere in the
middle and a branch at the end.

--- qemu-0.7.0/dyngen.c.orig	2005-04-30 11:59:05.000000000 +0100
+++ qemu-0.7.0/dyngen.c	2005-04-30 12:00:11.000000000 +0100
@@ -1396,11 +1395,13 @@ void gen_code(const char *name, host_ulo
 #elif defined(HOST_PPC)
     {
         uint8_t *p;
+        uint32_t insn;
         p = (void *)(p_end - 4);
         if (p == p_start)
             error("empty code for %s", name);
-        if (get32((uint32_t *)p) != 0x4e800020)
-            error("blr expected at the end of %s", name);
+        insn = get32((uint32_t *)p);
+        if (insn != 0x4e800020 && (insn & 0xfc000002) != 0x48000000)
+            error("blr or b expected at the end of %s", name);
         copy_size = p - p_start;
     }
 #elif defined(HOST_S390)

-- 
dwmw2

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-05-01 21:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-30 11:10 [Qemu-devel] [PATCH] Fix dyngen failure on PPC David Woodhouse
2005-05-01 17:04 ` Paul Brook
2005-05-01 20:15   ` Flavio Visentin
2005-05-01 20:35     ` Paul Brook
2005-05-01 20:29   ` Jonas Maebe
2005-05-01 20:49     ` Paul Brook

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).