From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: aurelien@aurel32.net
Subject: [Qemu-devel] [PATCH v2 3/4] tcg-i386: Use QEMU_BUILD_BUG_ON instead of assert for frame size
Date: Wed, 5 Jun 2013 10:29:27 -0700 [thread overview]
Message-ID: <1370453368-21214-4-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1370453368-21214-1-git-send-email-rth@twiddle.net>
We can check the condition at compile time, rather than run time.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
tcg/i386/tcg-target.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
index 7d946eb..991f484 100644
--- a/tcg/i386/tcg-target.c
+++ b/tcg/i386/tcg-target.c
@@ -2324,6 +2324,9 @@ typedef struct {
uint8_t fde_reg_ofs[14];
} DebugFrame;
+/* We're expecting a 2 byte uleb128 encoded value. */
+QEMU_BUILD_BUG_ON(FRAME_SIZE >= (1 << 14));
+
#if !defined(__ELF__)
/* Host machine without ELF. */
#elif TCG_TARGET_REG_BITS == 64
@@ -2387,9 +2390,6 @@ static DebugFrame debug_frame = {
#if defined(ELF_HOST_MACHINE)
void tcg_register_jit(void *buf, size_t buf_size)
{
- /* We're expecting a 2 byte uleb128 encoded value. */
- assert(FRAME_SIZE >> 14 == 0);
-
debug_frame.fde.func_start = (tcg_target_long) buf;
debug_frame.fde.func_len = buf_size;
--
1.8.1.4
next prev parent reply other threads:[~2013-06-05 17:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-05 17:29 [Qemu-devel] [PATCH v2 0/4] tcg-arm: Implement tcg_register_jit Richard Henderson
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 1/4] tcg: Fix high_pc fields in .debug_info Richard Henderson
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 2/4] tcg: Move the CIE and FDE header definitions to common code Richard Henderson
2013-06-05 17:29 ` Richard Henderson [this message]
2013-06-17 22:08 ` [Qemu-devel] [PATCH v2 3/4] tcg-i386: Use QEMU_BUILD_BUG_ON instead of assert for frame size Andreas Färber
2013-06-05 17:29 ` [Qemu-devel] [PATCH v2 4/4] tcg-arm: Implement tcg_register_jit Richard Henderson
2013-06-17 22:12 ` Andreas Färber
2013-06-17 22:16 ` Peter Maydell
2013-06-17 22:30 ` Andreas Färber
2013-06-10 18:41 ` [Qemu-devel] [PATCH v2 0/4] " Richard Henderson
2013-06-17 15:54 ` Richard Henderson
2013-06-25 3:44 ` Richard Henderson
2013-07-02 15:14 ` Richard Henderson
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=1370453368-21214-4-git-send-email-rth@twiddle.net \
--to=rth@twiddle.net \
--cc=aurelien@aurel32.net \
--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).