From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: Andrzej Zaborowski <balrog@zabor.org>,
Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH 06/18] tcg/arm: add defines for the allowed instructions set
Date: Thu, 8 Apr 2010 14:46:31 +0100 [thread overview]
Message-ID: <201004081446.32846.paul@codesourcery.com> (raw)
In-Reply-To: <1270662685-7379-7-git-send-email-aurelien@aurel32.net>
> Use a set of #define to define the allowed ARM instructions, depending
> on the __ARM_ARCH_*__ GCC defines.
>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> tcg/arm/tcg-target.c | 27 ++++++++++++++++++++++++---
> 1 files changed, 24 insertions(+), 3 deletions(-)
>
> diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c
> index ee5f723..cae6385 100644
> --- a/tcg/arm/tcg-target.c
> +++ b/tcg/arm/tcg-target.c
> @@ -22,6 +22,27 @@
> * THE SOFTWARE.
> */
>
> +#if defined(__ARM_ARCH_5T__) || \
> + defined(__ARM_ARCH_5TE__) || \
> + defined(__ARM_ARCH_5TEJ__) || \
> + defined(__ARM_ARCH_6__) || \
> + defined(__ARM_ARCH_7A__) || \
> + defined(__ARM_ARCH_7__)
> +# define USE_ARMV5_INSTRUCTIONS 1
> +#endif
Would be better to avoid redundancy by reordering a bit and doing:
#if defined(__ARM_ARCH_5T__) || \
defined(__ARM_ARCH_5TE__) || \
defined(__ARM_ARCH_5TEJ__) || \
defined(USE_ARMV6_INSTRUCTIONS)
> +#if defined(__ARM_ARCH_6__) || \
> + defined(__ARM_ARCH_7A__) || \
> + defined(__ARM_ARCH_7__)
> +# define USE_ARMV6_INSTRUCTIONS 1
> +#endif
Likewise.
> +#if defined(__ARM_ARCH_7A__) || \
> + defined(__ARM_ARCH_7__)
> +# define USE_ARMV7_INSTRUCTIONS 1
> +#endif
Missing check for __ARM_ARCH_7R__. Should probably also check 7M and 7EM, even
though we don't currently generate Thumb code.
Paul
next prev parent reply other threads:[~2010-04-08 13:46 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-07 17:51 [Qemu-devel] [PATCH 0/18] tcg/arm: cleanup and improvements Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 01/18] tcg/arm: remove SAVE_LR code Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 02/18] tcg/arm: explicitely list clobbered/reserved regs Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 03/18] tcg/arm: remove store signed functions Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 04/18] tcg/arm: replace integer values by registers enum Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 05/18] tcg/arm: align 64-bit arguments in function calls Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 06/18] tcg/arm: add defines for the allowed instructions set Aurelien Jarno
2010-04-08 13:46 ` Paul Brook [this message]
2010-04-08 16:46 ` Richard Henderson
2010-04-07 17:51 ` [Qemu-devel] [PATCH 07/18] tcg/arm: sxtb and sxth are available starting with ARMv6 Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 08/18] tcg/arm: use the blx instruction when possible Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 09/18] tcg/arm: add rotation ops Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 10/18] tcg/arm: add ext16u op Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 11/18] tcg/arm: add bswap ops Aurelien Jarno
2010-04-08 23:32 ` Paul Brook
2010-04-09 17:11 ` Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 12/18] tcg/arm: remove conditional argument for qemu_ld/st Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 13/18] tcg/arm: use ext* ops in qemu_ld Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 14/18] tcg/arm: bswap arguments in qemu_ld/st if needed Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 15/18] tcg/arm: remove useless register tests in qemu_ld/st Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 16/18] tcg/arm: fix argument alignment in qemu_st64 Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 17/18] tcg/arm: optimize register allocation order Aurelien Jarno
2010-04-07 17:51 ` [Qemu-devel] [PATCH 18/18] tcg/arm: don't try to load constants using pc Aurelien Jarno
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=201004081446.32846.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=aurelien@aurel32.net \
--cc=balrog@zabor.org \
--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).