[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/5] Add a PowerPC branch detector
From: |
Thiemo Seufer |
Subject: |
Re: [Qemu-devel] [PATCH 2/5] Add a PowerPC branch detector |
Date: |
Thu, 17 Jan 2008 13:22:53 +0000 |
User-agent: |
Mutt/1.5.17 (2007-12-11) |
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
- [Qemu-devel] [PATCH 2/5] Add a PowerPC branch detector, Alexander Graf, 2008/01/17
- Re: [Qemu-devel] [PATCH 2/5] Add a PowerPC branch detector,
Thiemo Seufer <=
- Re: [Qemu-devel] [PATCH 2/5] Add a PowerPC branch detector, Alexander Graf, 2008/01/17
- Re: [Qemu-devel] [PATCH 2/5] Add a PowerPC branch detector, Thiemo Seufer, 2008/01/17
- Re: [Qemu-devel] [PATCH 2/5] Add a PowerPC branch detector, Johannes Schindelin, 2008/01/17
- Re: [Qemu-devel] [PATCH 2/5] Add a PowerPC branch detector, Thiemo Seufer, 2008/01/17
- Re: [Qemu-devel] [PATCH 2/5] Add a PowerPC branch detector, Alexander Graf, 2008/01/17
- Re: [Qemu-devel] [PATCH 2/5] Add a PowerPC branch detector, Andreas Färber, 2008/01/17