Skip to content
Commit 0eab11c7 authored by Martin Schwidefsky's avatar Martin Schwidefsky
Browse files

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: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 67f03de5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment