linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] ARM: add jump label support
Date: Wed, 23 Nov 2011 17:53:21 +0000	[thread overview]
Message-ID: <20111123175321.GI9581@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20111123145509.GA4973@debian>

On Wed, Nov 23, 2011 at 08:25:09PM +0530, Rabin Vincent wrote:
> Here's a patch.  Atleast on MIPS %c means something else so I had to
> ifdef it for ARM:
> 
> 8<----------------------------
> >From ea211ce77e0ea9c5b8cd32b99bfb24e0140f0068 Mon Sep 17 00:00:00 2001
> From: Rabin Vincent <rabin@rab.in>
> Date: Wed, 23 Nov 2011 20:05:09 +0530
> Subject: [PATCH] jump label: detect %c support for ARM
> 
> Some versions of ARM GCC don't support the %c specifier fully, but do
> support asm goto.  Since we need the %c to support jump labels on ARM,
> detect that too in the asm goto detection script to avoid build errors
> with these versions.
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48637
> 
> Signed-off-by: Rabin Vincent <rabin@rab.in>
> ---
>  scripts/gcc-goto.sh |   18 +++++++++++++++++-
>  1 files changed, 17 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh
> index 98cffcb..9b744de 100644
> --- a/scripts/gcc-goto.sh
> +++ b/scripts/gcc-goto.sh
> @@ -2,4 +2,20 @@
>  # Test for gcc 'asm goto' support
>  # Copyright (C) 2010, Jason Baron <jbaron@redhat.com>
>  
> -echo "int main(void) { entry: asm goto (\"\"::::entry); return 0; }" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y"
> +cat << "END" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y"
> +int main(void)
> +{
> +#ifdef __arm__
> +	/*
> +	 * Not related to asm goto, but used by jump label
> +	 * and broken on some ARM GCC versions (see GCC Bug 48637).
> +	 */
> +	static struct { int dummy; int state; } tp;
> +	asm ("@ %c0" :: "i" (&tp.state));
> +#endif
> +
> +entry:
> +	asm goto ("" :::: entry);
> +	return 0;
> +}
> +END

Is the presence of asm goto and %c something we want to test together or
separately?  I suspect it's something we want to do separately.

  reply	other threads:[~2011-11-23 17:53 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-21 15:13 [PATCH 1/4] ARM: ftrace: use canonical Thumb-2 wide instruction format Rabin Vincent
2011-11-21 15:13 ` [PATCH 2/4] ARM: extract out insn generation code from ftrace Rabin Vincent
2011-11-22 12:02   ` Dave Martin
2011-11-22 13:32     ` Rabin Vincent
2011-11-22 13:56       ` Dave Martin
2011-11-22 18:25         ` Rabin Vincent
2011-11-23 11:50           ` Dave Martin
2011-11-24 16:10             ` Rabin Vincent
2011-11-21 15:13 ` [PATCH 3/4] ARM: extract out code patch function from kprobes Rabin Vincent
2011-11-22  8:48   ` Tixy
2011-11-22 18:03     ` Rabin Vincent
2011-11-21 15:13 ` [PATCH 4/4] ARM: add jump label support Rabin Vincent
2011-11-22 19:42   ` Russell King - ARM Linux
2011-11-22 23:02     ` Stephen Boyd
2011-11-22 23:39       ` Jason Baron
2011-11-22 23:50         ` Jason Baron
2011-11-23 14:55           ` Rabin Vincent
2011-11-23 17:53             ` Russell King - ARM Linux [this message]
2011-11-28 17:04               ` Rabin Vincent
2012-01-24 15:43     ` Rabin Vincent
2012-01-24 16:05       ` Russell King - ARM Linux
2012-01-24 16:57         ` Rabin Vincent
2011-11-22 12:02 ` [PATCH 1/4] ARM: ftrace: use canonical Thumb-2 wide instruction format Dave Martin
2011-11-22 18:00   ` Rabin Vincent
2011-11-23 14:42     ` Dave Martin
2011-11-24  7:22       ` Bi Junxiao
2011-11-25 10:10         ` Dave Martin

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=20111123175321.GI9581@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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).