mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 12:09:58 +00:00
8b398296d4
Adds clobbers and merges remaining separate asm statements. Signed-off-by: David Miller <dmiller423@gmail.com> Message-Id: <20220301214305.2778-1-dmiller423@gmail.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> [thuth: dropped changes to mie3-compl.c, whitespace fixes] Signed-off-by: Thomas Huth <thuth@redhat.com>
30 lines
615 B
C
30 lines
615 B
C
#include <stdint.h>
|
|
#include <string.h>
|
|
|
|
|
|
static inline void mvcrl_8(const char *dst, const char *src)
|
|
{
|
|
asm volatile (
|
|
"llill %%r0, 8\n"
|
|
".insn sse, 0xE50A00000000, 0(%[dst]), 0(%[src])"
|
|
: : [dst] "d" (dst), [src] "d" (src)
|
|
: "r0", "memory");
|
|
}
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
const char *alpha = "abcdefghijklmnop";
|
|
|
|
/* array missing 'i' */
|
|
char tstr[17] = "abcdefghjklmnop\0" ;
|
|
|
|
/* mvcrl reference use: 'open a hole in an array' */
|
|
mvcrl_8(tstr + 9, tstr + 8);
|
|
|
|
/* place missing 'i' */
|
|
tstr[8] = 'i';
|
|
|
|
return strncmp(alpha, tstr, 16ul);
|
|
}
|