From: Thiemo Seufer <ths@networkno.de>
To: Alexander Graf <alex@csgraf.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/5] Add a PowerPC branch detector
Date: Thu, 17 Jan 2008 13:22:53 +0000 [thread overview]
Message-ID: <20080117132253.GE9767@networkno.de> (raw)
In-Reply-To: <478EF8E3.2050503@csgraf.de>
Alexander Graf wrote:
> PowerPCs have static instruction lengths, so writing an "in-between" brl
> detection is quite simple on this architecture. You are welcome to write
> something like this for any other platform, but if a compile doesn't
> trigger build errors on PowerPC, it shouldn't on other platforms either,
> as PowerPC has quite advanced branch instructions.
>
> This patch is not mandatory, makes debugging a lot easier though.
> Index: qemu-snapshot-2008-01-15_05/dyngen.c
> ===================================================================
> --- qemu-snapshot-2008-01-15_05.orig/dyngen.c
> +++ qemu-snapshot-2008-01-15_05/dyngen.c
> @@ -1488,6 +1488,16 @@ void gen_code(const char *name, host_ulo
> if (get32((uint32_t *)p) != 0x4e800020)
> error("blr expected at the end of %s", name);
> copy_size = p - p_start;
> +
> +/* blr check for inline returns */
> +
> + if(strstart(name, "op_", NULL) && !strstart(name, "op_exit", NULL)) {
> + for(p=p_start; p < p_end - 4; p+=4) {
> + if ((get32((uint32_t *)p) & 0xfc00fff0) == 0x4c000020) {
> + error("Inline blr detected in %s. Please append FORCE_RET to the function.", name);
> + }
> + }
> + }
Is check_ops.sh not enough for debugging micro-ops?
Thiemo
next prev parent reply other threads:[~2008-01-17 13:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-17 6:42 [Qemu-devel] [PATCH 2/5] Add a PowerPC branch detector Alexander Graf
2008-01-17 13:22 ` Thiemo Seufer [this message]
2008-01-17 9:48 ` Alexander Graf
2008-01-17 14:07 ` Thiemo Seufer
2008-01-17 14:16 ` Johannes Schindelin
2008-01-17 14:38 ` Thiemo Seufer
2008-01-17 14:40 ` Alexander Graf
2008-01-17 14:56 ` Andreas Färber
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=20080117132253.GE9767@networkno.de \
--to=ths@networkno.de \
--cc=alex@csgraf.de \
--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 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).