On 7/12/22 18:02, Ilya Leoshkevich wrote:
This works, of course. It could be simpler using EXECUTE, to store
just the one
instruction and not worry about an executable mapped page, but I
guess it doesn't matter.
I thought about this too, but EX/EXRL operate only on the second byte,
and I need to modify bytes 3-5 here.
I didn't mean modify the instruction via EX, but something like
static char minmax[6] __attribute__((aligned(2)))
= { xx, yy, zz, 0, 0, 0 };
minmax[3] = m6 ...
minmax[4] = ...
minmax[5] = op;
asm("vl %%v25,0(%1)\n"
"vl %%v26,0(%2)\n"
"ex 0,0(%3)\n"
"vst %%v24,0(%0)"
: : "a"(v1), "a"(v2), "a"(v3), "a"(minmax)
: "memory", "v24", "v25", "v26);
r~