LinuxPPC-Dev Archive on lore.kernel.org
 help / color / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH v3] selftests/powerpc: Fixup clobbers for TM tests
Date: Thu,  7 Nov 2019 14:45:34 +1100 (AEDT)
Message-ID: <477q722xpkz9sR1@ozlabs.org> (raw)
In-Reply-To: <20191029095324.14669-1-mpe@ellerman.id.au>

On Tue, 2019-10-29 at 09:53:24 UTC, Michael Ellerman wrote:
> Some of our TM (Transactional Memory) tests, list "r1" (the stack
> pointer) as a clobbered register.
>
> GCC >= 9 doesn't accept this, and the build breaks:
>
>   ptrace-tm-spd-tar.c: In function 'tm_spd_tar':
>   ptrace-tm-spd-tar.c:31:2: error: listing the stack pointer register 'r1' in a clobber list is deprecated [-Werror=deprecated]
>      31 |  asm __volatile__(
>         |  ^~~
>   ptrace-tm-spd-tar.c:31:2: note: the value of the stack pointer after an 'asm' statement must be the same as it was before the statement
>
> We do have some fairly large inline asm blocks in these tests, and
> some of them do change the value of r1. However they should all return
> to C with the value in r1 restored, so I think it's legitimate to say
> r1 is not clobbered.
>
> As Segher points out, the r1 clobbers may have been added because of
> the use of `or 1,1,1`, however that doesn't actually clobber r1.
>
> Segher also points out that some of these tests do clobber LR, because
> they call functions, and that is not listed in the clobbers, so add
> that where appropriate.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> Link: https://lore.kernel.org/r/20191014023043.2969-1-mpe@ellerman.id.au

Applied to powerpc next.

https://git.kernel.org/powerpc/c/a02cbc7ffe529ed58b6bbe54652104fc2c88bd77

cheers

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29  9:53 Michael Ellerman
2019-11-07  3:45 ` Michael Ellerman [this message]

Reply instructions:

You may reply publically 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=477q722xpkz9sR1@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /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

LinuxPPC-Dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linuxppc-dev/0 linuxppc-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linuxppc-dev linuxppc-dev/ https://lore.kernel.org/linuxppc-dev \
		linuxppc-dev@lists.ozlabs.org linuxppc-dev@ozlabs.org
	public-inbox-index linuxppc-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.linuxppc-dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git