s390/vx: allow to include vx-insn.h with .include
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 25 Aug 2016 08:40:19 +0000 (10:40 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 29 Aug 2016 09:04:59 +0000 (11:04 +0200)
commit0eab11c7e0d30de14a15ccd8269eef238321a8e1
treee028c7fa80a9f978117f5afb26f66be5bdaf2d36
parent67f03de5f0ad6b4b0481bb43e4a819d1a441900b
s390/vx: allow to include vx-insn.h with .include

To make the vx-insn.h more versatile avoid cpp preprocessor macros
and allow to use plain numbers for vector and general purpose register
operands. With that you can emit an .include from a C file into the
assembler text and then use the vx-insn macros in inline assemblies.

For example:

asm (".include \"asm/vx-insn.h\"");

static inline void xor_vec(int x, int y, int z)
{
asm volatile("VX %0,%1,%2"
     : : "i" (x), "i" (y), "i" (z));
}

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/vx-insn.h