All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Fabrice Bellard <fabrice@bellard.org>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Fix dyngen failure on PPC.
Date: Sat, 30 Apr 2005 12:10:16 +0100	[thread overview]
Message-ID: <1114859417.24014.59.camel@localhost.localdomain> (raw)

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

             reply	other threads:[~2005-05-01 16:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-30 11:10 David Woodhouse [this message]
2005-05-01 17:04 ` [Qemu-devel] [PATCH] Fix dyngen failure on PPC 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1114859417.24014.59.camel@localhost.localdomain \
    --to=dwmw2@infradead.org \
    --cc=fabrice@bellard.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.