]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390: add assembler macros for CPU alternatives
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 23 May 2018 16:21:28 +0000 (18:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 May 2018 06:48:58 +0000 (08:48 +0200)
commit2685d33c6ff9f7ca700e7f0c9ad218cd515dcc5a
tree063570950d389b5aced8e1f882a5034479d0adbe
parent3cd868dc9b68709d7274120f7ef1c6063948910d
s390: add assembler macros for CPU alternatives

[ Upstream commit fba9eb7946251d6e420df3bdf7bc45195be7be9a ]

Add a header with macros usable in assembler files to emit alternative
code sequences. It works analog to the alternatives for inline assmeblies
in C files, with the same restrictions and capabilities.
The syntax is

     ALTERNATIVE "<default instructions sequence>", \
 "<alternative instructions sequence>", \
 "<features-bit>"
and

     ALTERNATIVE_2 "<default instructions sequence>", \
   "<alternative instructions sqeuence #1>", \
   "<feature-bit #1>",
   "<alternative instructions sqeuence #2>", \
   "<feature-bit #2>"

Reviewed-by: Vasily Gorbik <gor@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/include/asm/alternative-asm.h [new file with mode: 0644]