From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4706] R_PPC_REL24 safety net
Date: Mon, 09 Jun 2008 06:06:28 +0000 [thread overview]
Message-ID: <E1K5aWS-0003Lv-Rm@cvs.savannah.gnu.org> (raw)
Revision: 4706
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4706
Author: malc
Date: 2008-06-09 06:06:28 +0000 (Mon, 09 Jun 2008)
Log Message:
-----------
R_PPC_REL24 safety net
Modified Paths:
--------------
trunk/dyngen.c
Modified: trunk/dyngen.c
===================================================================
--- trunk/dyngen.c 2008-06-09 06:06:25 UTC (rev 4705)
+++ trunk/dyngen.c 2008-06-09 06:06:28 UTC (rev 4706)
@@ -1963,6 +1963,14 @@
break;
case R_PPC_REL24:
/* warning: must be at 32 MB distancy */
+ fprintf(outfile, "{\n"
+ " long disp = (%s - (long)(gen_code_ptr + %d) + %d);\n"
+ " if ((disp << 6) >> 6 != disp) {;\n"
+ " fprintf(stderr, \"Branch target is too far away\\n\");"
+ " abort();\n"
+ " }\n"
+ "}\n",
+ relname, reloc_offset, addend);
fprintf(outfile, " *(uint32_t *)(gen_code_ptr + %d) = (*(uint32_t *)(gen_code_ptr + %d) & ~0x03fffffc) | ((%s - (long)(gen_code_ptr + %d) + %d) & 0x03fffffc);\n",
reloc_offset, reloc_offset, relname, reloc_offset, addend);
break;
reply other threads:[~2008-06-09 6:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E1K5aWS-0003Lv-Rm@cvs.savannah.gnu.org \
--to=av1474@comtv.ru \
--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.