• Martin Schwidefsky's avatar
    s390/vx: allow to include vx-insn.h with .include · 0eab11c7
    Martin Schwidefsky authored
    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>
    0eab11c7
vx-insn.h 8.97 KB