From: Stefan Weil <sw@weilnetz.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-trivial <qemu-trivial@nongnu.org>
Subject: Re: [Qemu-trivial] [PATCH 1/3] Add support for target helper functions which don't return
Date: Sun, 18 Mar 2012 23:17:59 +0100 [thread overview]
Message-ID: <4F665F17.1060505@weilnetz.de> (raw)
In-Reply-To: <1332108898-6377-1-git-send-email-sw@weilnetz.de>
Am 18.03.2012 23:14, schrieb Stefan Weil:
> Most functions which handle exceptions don't return.
>
> With a compiler attribute (added by QEMU_NORETURN),
> gcc can optimize the code.
>
> Signed-off-by: Stefan Weil<sw@weilnetz.de>
> ---
> def-helper.h | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/def-helper.h b/def-helper.h
> index 0e70c31..b98ff69 100644
> --- a/def-helper.h
> +++ b/def-helper.h
> @@ -39,6 +39,7 @@
> #endif
> #define dh_alias_ptr ptr
> #define dh_alias_void void
> +#define dh_alias_noreturn noreturn
> #define dh_alias_env ptr
> #define dh_alias(t) glue(dh_alias_, t)
>
> @@ -52,36 +53,42 @@
> #define dh_ctype_tl target_ulong
> #define dh_ctype_ptr void *
> #define dh_ctype_void void
> +#define dh_ctype_noreturn void QEMU_NORETURN
> #define dh_ctype_env CPUArchState *
> #define dh_ctype(t) dh_ctype_##t
>
> /* We can't use glue() here because it falls foul of C preprocessor
> recursive expansion rules. */
> #define dh_retvar_decl0_void void
> +#define dh_retvar_decl0_noreturn void
> #define dh_retvar_decl0_i32 TCGv_i32 retval
> #define dh_retvar_decl0_i64 TCGv_i64 retval
> #define dh_retvar_decl0_ptr TCGv_ptr retval
> #define dh_retvar_decl0(t) glue(dh_retvar_decl0_, dh_alias(t))
>
> #define dh_retvar_decl_void
> +#define dh_retvar_decl_noreturn
> #define dh_retvar_decl_i32 TCGv_i32 retval,
> #define dh_retvar_decl_i64 TCGv_i64 retval,
> #define dh_retvar_decl_ptr TCGv_ptr retval,
> #define dh_retvar_decl(t) glue(dh_retvar_decl_, dh_alias(t))
>
> #define dh_retvar_void TCG_CALL_DUMMY_ARG
> +#define dh_retvar_noreturn TCG_CALL_DUMMY_ARG
> #define dh_retvar_i32 GET_TCGV_i32(retval)
> #define dh_retvar_i64 GET_TCGV_i64(retval)
> #define dh_retvar_ptr GET_TCGV_ptr(retval)
> #define dh_retvar(t) glue(dh_retvar_, dh_alias(t))
>
> #define dh_is_64bit_void 0
> +#define dh_is_64bit_noreturn 0
> #define dh_is_64bit_i32 0
> #define dh_is_64bit_i64 1
> #define dh_is_64bit_ptr (TCG_TARGET_REG_BITS == 64)
> #define dh_is_64bit(t) glue(dh_is_64bit_, dh_alias(t))
>
> #define dh_is_signed_void 0
> +#define dh_is_signed_noreturn 0
> #define dh_is_signed_i32 0
> #define dh_is_signed_s32 1
> #define dh_is_signed_i64 0
>
I'm sorry, these three patches should have been sent to qemu-devel,
not qemu-trivial. Please ignore them for qemu-trivial.
Best regards,
Stefan W.
next prev parent reply other threads:[~2012-03-18 22:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-18 22:14 [Qemu-trivial] [PATCH 1/3] Add support for target helper functions which don't return Stefan Weil
2012-03-18 22:14 ` [Qemu-trivial] [PATCH 2/3] target-mips: Add compiler attribute to some " Stefan Weil
2012-03-18 22:14 ` [Qemu-trivial] [PATCH 3/3] target-sparc: " Stefan Weil
2012-03-18 22:17 ` Stefan Weil [this message]
2012-03-24 16:11 ` [Qemu-trivial] [PATCH 1/3] Add support for target helper " Blue Swirl
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=4F665F17.1060505@weilnetz.de \
--to=sw@weilnetz.de \
--cc=blauwirbel@gmail.com \
--cc=qemu-trivial@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).