spechelper-tm laa vector lsc2 ppno vector_string vector_integer \
vector_float add-z14 sub-z14 mul-z14 bic \
misc3 vec2 vec2_float \
- dfp-1 dfp-2 dfp-3 dfp-4 dfpconv dfpext dfptest pfpo srnmt
-
-if HAS_MLONG_DOUBLE_128
- INSN_TESTS += fpext fixbr
-endif
+ dfp-1 dfp-2 dfp-3 dfp-4 dfpconv dfpext dfptest pfpo srnmt \
+ fpext fixbr
check_PROGRAMS = $(INSN_TESTS) \
allexec \
cu14_1_CFLAGS = $(AM_CFLAGS) -DM3=1
cu21_1_CFLAGS = $(AM_CFLAGS) -DM3=1
cu24_1_CFLAGS = $(AM_CFLAGS) -DM3=1
-fixbr_CFLAGS = $(AM_CFLAGS) @FLAG_MLONG_DOUBLE_128@
-fpext_CFLAGS = $(AM_CFLAGS) @FLAG_MLONG_DOUBLE_128@
ex_clone_LDADD = -lpthread
vector_CFLAGS = $(AM_CFLAGS) -march=z13
lsc2_CFLAGS = -march=z13 -DS390_TESTS_NOCOLOR
"lg %[table],0(%[i],%[table])\n"
"br %[table]\n"
TAIL
- : [i] "+d" (i)
- , [table] "=d" (table)
+ : [i] "+a" (i)
+ , [table] "=a" (table)
:: "cc");
return i;
}
asm volatile(HEAD
".insn rxy, 0xe30000000047, 4, 0(%[i],%[table])\n"
TAIL
- : [i] "+d" (i)
- , [table] "=d" (table)
+ : [i] "+a" (i)
+ , [table] "=a" (table)
:: "cc");
return i;
}
"brcl 10, 0f\n"
".insn rxy, 0xe30000000047, 15, 0(%[i],%[table])\n"
TAIL
- : [i] "+d" (i)
- , [table] "=d" (table)
+ : [i] "+a" (i)
+ , [table] "=a" (table)
:: "cc");
return i;
}
"2: ipm %0\n"
"srl %0,28\n"
:"=d" (cc)
- :"a" (a1), "a" (a2), "d" (l): "1", "cc");
+ :"a" (a1), "a" (a2), "a" (l): "1", "cc");
return cc;
}
/* load and zero rightmost byte */
static bool test_lzrf(const uint32_t testedValue)
{
- uint32_t after = testedValue;
+ uint32_t after;
uint32_t expected = testedValue & 0xffffff00;
- __asm__ volatile("lzrf %%r6, %0\n"
- "st %%r6, %0\n"
- :
- : "g"(after));
+ __asm__ volatile("lzrf %0, %1" : "=d"(after) : "T"(testedValue) : );
SMART_RETURN_R64(lzrf);
}
uint64_t after = testedValue;
uint64_t expected = testedValue & 0xffffffffffffff00UL;
- __asm__ volatile("lzrg %%r6, %0\n"
- "stg %%r6, %0\n"
- :
- : "g"(after));
-
+ __asm__ volatile("lzrg %0, %1" : "=d"(after) : "T"(testedValue) : );
SMART_RETURN_R64(lzrg);
}
static bool test_llzrgf(const uint32_t testedValue)
{
uint64_t after = 0;
- uint64_t expected = ((uint64_t)testedValue << 32) & 0xffffff0000000000UL;
-
- __asm__ volatile("llzrgf %%r6, %0\n"
- "st %%r6, %1\n"
- :
- : "g"(testedValue), "g"(after));
+ uint32_t expected = testedValue & 0xffffff00;
+ __asm__ volatile("llzrgf %0, %1" : "=d"(after) : "T"(testedValue) : );
SMART_RETURN_R64(llzrgf);
}
__asm__ volatile( \
"cr %[testedValue], %[invertedValue]\n" #TESTED_INSTRUCTION \
" %[after], %[overrideValue]\n" \
- : [after] "=r"(after) \
- : [testedValue] "r"(testedValue), \
- [invertedValue] "r"(invertedValue), \
- [overrideValue] #ARGUMENT_ASM_TYPE(overrideValue), \
- "[after]"(after) \
+ : [after] "+d"(after) \
+ : [testedValue] "d"(testedValue), \
+ [invertedValue] "d"(invertedValue), \
+ [overrideValue] #ARGUMENT_ASM_TYPE(overrideValue) \
: "cc"); \
\
SMART_RETURN_R64(TESTED_INSTRUCTION); \
}
-declare_load_high_on_condition(locfhre, ==, r)
-declare_load_high_on_condition(locfhrne, !=, r)
-declare_load_high_on_condition(locfhrh, >, r)
-declare_load_high_on_condition(locfhrl, <, r)
-declare_load_high_on_condition(locfhe, ==, m)
-declare_load_high_on_condition(locfhne, !=, m)
-declare_load_high_on_condition(locfhh, >, m)
-declare_load_high_on_condition(locfhl, <, m)
+declare_load_high_on_condition(locfhre, ==, d)
+declare_load_high_on_condition(locfhrne, !=, d)
+declare_load_high_on_condition(locfhrh, >, d)
+declare_load_high_on_condition(locfhrl, <, d)
+declare_load_high_on_condition(locfhe, ==, Q)
+declare_load_high_on_condition(locfhne, !=, Q)
+declare_load_high_on_condition(locfhh, >, Q)
+declare_load_high_on_condition(locfhl, <, Q)
/* store high on condition */
#define declare_store_high_on_condition(TESTED_INSTRUCTION, CONDITION_SYMBOL, \
__asm__ volatile( \
"cr %[testedValue], %[invertedValue]\n" #TESTED_INSTRUCTION \
" %[overrideValue], %[after]\n" \
- : [after] "=" #ARGUMENT_ASM_TYPE(after) \
- : [testedValue] "r"(testedValue), \
- [invertedValue] "r"(invertedValue), \
- [overrideValue] "r"(overrideValue) \
+ : [after] "+" #ARGUMENT_ASM_TYPE(after) \
+ : [testedValue] "d"(testedValue), \
+ [invertedValue] "d"(invertedValue), \
+ [overrideValue] "d"(overrideValue) \
: "cc"); \
\
SMART_RETURN_R64(TESTED_INSTRUCTION); \
}
-declare_store_high_on_condition(stocfhe, ==, m)
-declare_store_high_on_condition(stocfhne, !=, m)
-declare_store_high_on_condition(stocfhh, >, m)
-declare_store_high_on_condition(stocfhl, <, m)
+declare_store_high_on_condition(stocfhe, ==, Q)
+declare_store_high_on_condition(stocfhne, !=, Q)
+declare_store_high_on_condition(stocfhh, >, Q)
+declare_store_high_on_condition(stocfhl, <, Q)
#define __format_uint32_t "%x"
#define __format_uint64_t "%lx"
__asm__ volatile( \
"cr %[testedValue], %[invertedValue]\n" #TESTED_INSTRUCTION \
" %[after], " IMMEDIATE_VALUE_STR "\n" \
- : [after] "=r"(after) \
- : [testedValue] "r"(testedValue), \
- [invertedValue] "r"(invertedValue), \
- "[after]"(after) \
+ : [after] "+d"(after) \
+ : [testedValue] "d"(testedValue), \
+ [invertedValue] "d"(invertedValue) \
: "cc"); \
\
SMART_RETURN_R64(TESTED_INSTRUCTION); \
__asm__ volatile( \
"cr %[testedValue], %[invertedValue]\n" #TESTED_INSTRUCTION \
" %[after], " IMMEDIATE_VALUE_STR "\n" \
- : [after] "=r"(after) \
- : [testedValue] "r"(testedValue), \
- [invertedValue] "r"(invertedValue), \
- "[after]"(after) \
+ : [after] "+d"(after) \
+ : [testedValue] "d"(testedValue), \
+ [invertedValue] "d"(invertedValue) \
: "cc"); \
\
SMART_RETURN_R64(TESTED_INSTRUCTION); \
#define declare_load_count_to_block_boundary(M_FIELD) \
bool test_lcbb##M_FIELD(const uint32_t testedValue) \
{ \
- const size_t boundary = 64 * pow(2, M_FIELD); \
+ const size_t boundary = 64 * (1UL << (M_FIELD)); \
const uint32_t *testedPointer = \
(uint32_t *)(boundary - \
((testedValue < boundary) ? testedValue : 0)); \
\
__asm__ volatile("lcbb %[after], %[testedPointer], " #M_FIELD \
"\n" \
- : [after] "=r"(after) \
- : [testedPointer] "m"(*testedPointer) \
+ : [after] "=d"(after) \
+ : [testedPointer] "R"(*testedPointer) \
: "cc"); \
\
SMART_RETURN_R64(lcbb##M_FIELD); \
"ipm %[cc] \n"
"srl %[cc], 28 \n"
: [cc] "=d"(after)
- : [testedPointer] "m"(*testedPointer)
+ : [testedPointer] "R"(*testedPointer)
: "cc");
SMART_RETURN_R64(lcbb0_cc);
}
/* -- Move right to left -- */
-static void test_mvcrl(void *to, void *from, size_t len)
+static void test_mvcrl(char *to, char *from, size_t len)
{
len -= 1;
__asm__("lgr 0,%[len]\n\t"
".insn sse,0xe50a00000000,%[to],%[from]\n\t"
- : [to] "+Q" (*(struct { char c[len]; } *) to)
- : [from] "Q" (*(struct { char c[len]; } *) from),
+ : [to] "+Q" (*(char (*)[len]) to)
+ : [from] "Q" (*(char (*)[len]) from),
[len] "d" (len)
: );
}
#include <ucontext.h>
#include <unistd.h>
+/* Circumvent bad assembly in system header, so Clang doesn't complain */
+#undef _FPU_SETCW
+#define _FPU_SETCW(cw) __asm__ __volatile__ ("sfpc %0" : : "d" (cw))
+#undef _FPU_GETCW
+#define _FPU_GETCW(cw) __asm__ __volatile__ ("efpc %0" : "=d" (cw))
+
void handle_SIG(int sig)
{
double d;
" tre %1,%2\n"
" ipm %0\n"
" srl %0,28\n"
- :"=d"(cc),"+&d"(a1)
- :"d"(a2),"d"(param),"d"(l1),"d"(test_byte): "cc", "memory" );
+ : "=d"(cc), "+a"(a1), "+a"(a2), "+a"(l1), "+d"(param)
+ : : "cc", "memory");
regs.addr = a1;
regs.len = l1;
uint64_t cc;
} troo_regs;
-uint8_t tran_table[20] = {
+uint8_t tran_table[20] __attribute__((aligned(8))) = {
0xaa,0xbb,0xcc,0xdd,0xff,0xda,0xbc,0xab,0xca,0xea,0xcc,0xee
};
" troo %1,%2\n"
" ipm %0\n"
" srl %0,28\n"
- : "=d"(cc),"+&d"(desaddr)
- : "d" (srcaddr),"d"(test_byte),"d" (codepage2),"d"(length)
- : "cc", "memory" );
+ : "=d"(cc), "+a"(desaddr),
+ "+a"(srcaddr), "+d"(test_byte), "+a"(codepage2), "+a"(length)
+ : : "cc", "memory" );
regs.srcaddr = srcaddr;
regs.len = length;
uint64_t cc;
} trot_regs;
-uint16_t tran_table[40] = {
+uint16_t tran_table[40] __attribute__((aligned(8))) = {
0xaaaa,0xbbbb,0xcccc,0xccdd,0xffff,0xdada,0xbcbc,0xabab,0xcaca,0xeaea,
0xbbbb,0xeeee
};
" trot %1,%2\n"
" ipm %0\n"
" srl %0,28\n"
- : "=d"(cc),"+&d"(desaddr)
- : "d" (srcaddr),"d"(test_byte),"d" (codepage2),"d"(length)
- : "cc", "memory" );
+ : "=d"(cc), "+a"(desaddr),
+ "+a"(srcaddr), "+d"(test_byte), "+a"(codepage2), "+a"(length)
+ : : "cc", "memory" );
regs.srcaddr = srcaddr;
regs.len = length;
uint64_t cc;
} trto_regs;
-uint8_t tran_table[40] = {
+uint8_t tran_table[40] __attribute__((aligned(8))) = {
0xaa,0xbb,0xcc,0xdd,0xff,0xdd,0xbc,0xab,0xca,0xea,0xbb,0xee
};
" trto %1,%2\n"
" ipm %0\n"
" srl %0,28\n"
- : "=d"(cc),"+&d"(desaddr)
- : "d" (srcaddr),"d"(test_byte),"d" (codepage2),"d"(length)
- : "cc", "memory" );
+ : "=d"(cc), "+a"(desaddr),
+ "+a"(srcaddr), "+d"(test_byte), "+a"(codepage2), "+a"(length)
+ : : "cc", "memory" );
regs.srcaddr = srcaddr;
regs.len = length;
uint64_t cc;
} trtt_regs;
-uint16_t tran_table[40] = {
+uint16_t tran_table[40] __attribute__((aligned(8))) = {
0xaaaa,0xcccc,0xcccc,0xdddd,0xffff,0xdada,0xbcbc,0xabab,0xcaca,0xeaea,
0xbbbb,0xeeee
};
" trtt %1,%2\n"
" ipm %0\n"
" srl %0,28\n"
- : "=d"(cc),"+d"(desaddr),"+d"(srcaddr)
- : "d"(test_byte),"d" (codepage2),"d"(length)
- : "cc", "memory" );
+ : "=d"(cc), "+a"(desaddr),
+ "+a"(srcaddr), "+d"(test_byte), "+a"(codepage2), "+a"(length)
+ : : "cc", "memory" );
regs.srcaddr = srcaddr;
regs.len = length;
"vleif %%v5, -0x1ccc, 2\n" \
"vleig %%v5, -0x1ddd, 0")
-s390_test_generate(vlvg, "vlvgb %[r_arg1], %%v1, 12(0)\n" \
- "vlvgh %[r_arg2], %%v2, 6(0)\n" \
- "vlvgf %[r_arg3], %%v3, 2(0)\n" \
- "vlvgg %[r_arg1], %%v5, 1(0)")
+s390_test_generate(vlvg, "vlvgb %%v1, %[r_arg1], 12(0)\n" \
+ "vlvgh %%v2, %[r_arg2], 6(0)\n" \
+ "vlvgf %%v3, %[r_arg3], 2(0)\n" \
+ "vlvgg %%v5, %[r_arg1], 1(0)")
s390_test_generate(vgbm, "vgbm %%v1, 0xf00f \n" \
"vzero %%v2 \n" \
"vst %%v1, %[v_arg1]\n" \
"vst %%v2, %[v_arg2]\n" \
"vst %%v3, %[v_arg3]\n" \
- : [v_result] "=m" (current.v_result), \
- [m_result] "=m" (current.r_result), \
+ : [v_result] "+R" (current.v_result), \
[r_result] "+d" (current.r_result), \
- [r_arg1] "+d" (current.r_arg[0]), \
- [r_arg2] "+d" (current.r_arg[1]), \
- [r_arg3] "+d" (current.r_arg[2]) \
- : [v_arg1] "m" (current.v_arg[0]), \
- [v_arg2] "m" (current.v_arg[1]), \
- [v_arg3] "m" (current.v_arg[2]), \
- [m_arg1] "m" (current.r_arg[0]), \
- [m_arg2] "m" (current.r_arg[1]), \
- [m_arg3] "m" (current.r_arg[2]), \
- [r_memory_pool] "r" (random_memory_pool), \
- [m_memory_pool] "m" (random_memory_pool) \
- : "memory", "cc", \
- "r1", "r2", "r3", "r5", \
- "v1", "v2", "v3", "v5"); \
+ [r_arg1] "+a" (current.r_arg[0]), \
+ [r_arg2] "+a" (current.r_arg[1]), \
+ [r_arg3] "+a" (current.r_arg[2]), \
+ [v_arg1] "+R" (current.v_arg[0]), \
+ [v_arg2] "+R" (current.v_arg[1]), \
+ [v_arg3] "+R" (current.v_arg[2]) \
+ : [m_arg1] "R" (current.r_arg[0]), \
+ [m_arg2] "R" (current.r_arg[1]), \
+ [m_arg3] "R" (current.r_arg[2]), \
+ [r_memory_pool] "d" (random_memory_pool), \
+ [m_memory_pool] "R" (random_memory_pool) \
+ : "cc", "v1", "v2", "v3", "v5"); \
\
printf("insn %s:\n", #insn); \
print_results(info, &orig, ¤t); \
v_result = ffffffffffffffff | ffffffffffffffff
r_result = 0000000000000000
insn vlvg:
- v_result = ffffffffffffffff | ffffffffffffffff
+ v_arg1 = 1f427f7cf88382ba | 2cad200d9509e187
+ v_arg2 = 20acc9022764afbe | 418aefdf62c385cb
+ v_arg3 = db227d67146fd038 | 8e6312496b5f976f
+ v_result = ffffffffffffffff | 471361c45f8bde95
r_result = 0000000000000000
insn vlvg:
- v_result = ffffffffffffffff | ffffffffffffffff
+ v_arg1 = 70194b4fd7874ba9 | e57be5f776e3b5c6
+ v_arg2 = 8c153e6a1a7d0156 | e22ff15d10b04cd1
+ v_arg3 = 2863ce806c7f4b91 | c3df7aa12322078c
+ v_result = ffffffffffffffff | 472c4d408f223176
r_result = 0000000000000000
insn vlvg:
- v_result = ffffffffffffffff | ffffffffffffffff
+ v_arg1 = 34768342275bf3a3 | 4e46db2717824050
+ v_arg2 = cbdffee0732097f5 | 1e496d0d11a45adb
+ v_arg3 = 3e99a00d380a45e7 | 9742e1833e0e275e
+ v_result = ffffffffffffffff | e87bdd944cfba217
r_result = 0000000000000000
insn vlvg:
- v_result = ffffffffffffffff | ffffffffffffffff
+ v_arg1 = e5fe25f6d59ca39b | f61204d1a2c21186
+ v_arg2 = 422ed2e3cc26252c | f1d8b47d02f54a65
+ v_arg3 = 7063896bbc270064 | 40acc93377789e7d
+ v_result = ffffffffffffffff | e20a7c3da279a8a2
r_result = 0000000000000000
insn vlvg:
- v_result = ffffffffffffffff | ffffffffffffffff
+ v_arg1 = c4a86410f4151a62 | f5f25be4de6d0b66
+ v_arg2 = 9ef13972631676e7 | 5d6a8b7995588c0b
+ v_arg3 = d5ae53f363175313 | 5daa8a166f9f6620
+ v_result = ffffffffffffffff | 73f68c7083ee0fde
r_result = 0000000000000000
insn vlvg:
- v_result = ffffffffffffffff | ffffffffffffffff
+ v_arg1 = 96756aee7d806d67 | a5c590cef0f92a4e
+ v_arg2 = 90a72ac9dde52c31 | 2bdcedcb53a02745
+ v_arg3 = 0e74c2bd800d6a99 | b1f9136a6e7495dc
+ v_result = ffffffffffffffff | 202624e58458b9f0
r_result = 0000000000000000
insn vlvg:
- v_result = ffffffffffffffff | ffffffffffffffff
+ v_arg1 = 6735176f0f45c578 | 6afcc73a1a4c3eb8
+ v_arg2 = 921dd02006b87bf3 | a819cdfa5b7f782a
+ v_arg3 = fc7c4c6008e888fc | e441aa1120531165
+ v_result = ffffffffffffffff | 7311d38fa326611a
r_result = 0000000000000000
insn vlvg:
- v_result = ffffffffffffffff | ffffffffffffffff
+ v_arg1 = 4b47c1aeb038257e | 6c515dd47e7aaffd
+ v_arg2 = a12d4e718fa0f2b3 | 6ad8d20e2242f230
+ v_arg3 = 8b1fdfae5af5c55f | 46d9a8465aca5a4a
+ v_result = ffffffffffffffff | bb7b5c6004f3537e
r_result = 0000000000000000
insn vlvg:
- v_result = ffffffffffffffff | ffffffffffffffff
+ v_arg1 = 1858f3c58a5d2143 | 598fa302db843814
+ v_arg2 = 027f7932ce5b3358 | 096119493297dce9
+ v_arg3 = 6c009f7bf8b1d1c2 | 8b883e64d35045bc
+ v_result = ffffffffffffffff | cf367809af4836db
r_result = 0000000000000000
insn vlvg:
- v_result = ffffffffffffffff | ffffffffffffffff
+ v_arg1 = 2e212f8dafa6a92d | 2450a2ab4d1aac53
+ v_arg2 = fe49a1158218b7e3 | e747f7edeb4a16c6
+ v_arg3 = d3d2a6564c84afc5 | 904134a4ec0dbb47
+ v_result = ffffffffffffffff | cce497b6545ec34d
r_result = 0000000000000000
insn vmrhb:
v_result = 31a62c11ac495bce | d68eb232bd8c0335
v_result = 74940c700490c8ac | 7814509cb8a8e804
r_result = 0000000000000000
insn veslh:
- v_result = f4182a3065c03910 | cd88f0b88028e510
+ v_result = 0c001800e0008800 | c4005c0014008800
r_result = 0000000000000000
insn veslh:
- v_result = 205858a06b58b518 | d798a34027489d10
+ v_result = 40b0b140d6b06a30 | af3046804e903a20
r_result = 0000000000000000
insn veslh:
- v_result = 79c0b2f0af685eb0 | b918f3f8842096b0
+ v_result = 9c002f00f680eb00 | 91803f8042006b00
r_result = 0000000000000000
insn veslh:
- v_result = 1090ffd0daf84800 | 4738d01013a00178
+ v_result = 9000d000f8000000 | 38001000a0007800
r_result = 0000000000000000
insn veslf:
v_result = 683054fd9c4d4883 | 0f345c90ed85bd7f
v_result = 0000000000ff00ff | ff00ffff000000ff
r_result = 0000000000000000
insn vesrah:
- v_result = 0bc0035efcfe092f | f1200853f8c0023a
+ v_result = 00020000ffff0002 | fffc0002fffe0000
r_result = 0000000000000000
insn vesrah:
- v_result = 09580821f638fe80 | 08d70ff40b030d25
+ v_result = 02560208fd8effa0 | 023503fd02c00349
r_result = 0000000000000000
insn vesrah:
- v_result = f80af07004ee0b5f | 0c69f8c2053803e7
+ v_result = fc05f838027705af | 0634fc61029c01f3
r_result = 0000000000000000
insn vesrah:
- v_result = f4900b3c083bf80d | 0383faa9fca90374
+ v_result = e92016781077f01b | 0707f553f95206e9
r_result = 0000000000000000
insn vesraf:
v_result = fffffff800000017 | 0000001b00000018
v_result = 3376472e4c18604e | 4d16787d677a704a
r_result = 0000000000000000
insn vesrlh:
- v_result = 148b04a4013c1425 | 03fc1b8c104d1765
+ v_result = 0002000000000002 | 0000000300020002
r_result = 0000000000000000
insn vesrlh:
- v_result = 06a11d88135108f0 | 1ef9041c16501ab3
+ v_result = 03500ec409a80478 | 0f7c020e0b280d59
r_result = 0000000000000000
insn vesrlh:
- v_result = 0ed80cb30be41400 | 02af188d0cfd0067
+ v_result = 0000000000000001 | 0000000100000000
r_result = 0000000000000000
insn vesrlh:
- v_result = 019f191101a815af | 0ea408a201b91daf
+ v_result = 00190191001a015a | 00ea008a001b01da
r_result = 0000000000000000
insn vesrlf:
v_result = 0000506d00006180 | 00006b1500001cb1
v_result = cf1b17657aeda68c | 0657478664785bab
r_result = 0000000000000000
insn verllh:
- v_result = 8bd1365783de79f0 | da956b0f21fddcc9
+ v_result = 462f5cd97a0fc1e7 | 576a3dacf4872773
r_result = 0000000000000000
insn verllh:
- v_result = 3f1175c0561f88eb | 7173b8ef9891bf0e
+ v_result = 4fc41d70d587e23a | dc5cee3b6624afc3
r_result = 0000000000000000
insn verllh:
- v_result = 9bcff5ebe02ddf43 | 7612bbcd5834e6b1
+ v_result = 79f3bd7e05bce87b | c24e79b7068bd63c
r_result = 0000000000000000
insn verllh:
- v_result = d4476f71fcfd811f | afa862d3e7cea55e
+ v_result = 23eab8b77efe8fc0 | d45769b1e773af52
r_result = 0000000000000000
insn verllf:
v_result = 79226829d81a5cb3 | fea1e8903de71c9e
#include <stdio.h>
#include "test.h"
+#define OC_INSN(len,args) ".insn sse,0xd6" len "00000000," args
+#define NC_INSN(len,args) ".insn sse,0xd4" len "00000000," args
+#define XC_INSN(len,args) ".insn sse,0xd7" len "00000000," args
+
void test_oc(void)
{
char buf1[20] = "UUUUU*UUU****U*\0\0\0\0\n";
char zero[2] = "\0\0";
printf("\nOC:\n");
- asm volatile ("oc %O0(1,%R0),%0\n"::"Q" (*zero),
- "Q"(*zero):"cc","memory");
+ asm volatile (OC_INSN("00","%0,%0") : "+Q"(*zero) : : "cc");
printf("CC:%d\n", get_cc());
dump_field(zero, 2);
- asm volatile ("oc %O0(19,%R0),%1\n"::"Q" (*buf1),
- "Q"(*buf2):"memory");
+ asm volatile (OC_INSN("12","%0,%1") : "=Q"(*buf1) : "Q"(*buf2) : "cc");
printf("CC:%d\n", get_cc());
dump_field(buf1, 20);
}
char zero[2] = "\0\0";
printf("\nNC:\n");
- asm volatile ("nc %O0(1,%R0),%0\n"::"Q" (*zero),
- "Q"(*zero):"cc","memory");
+ asm volatile (NC_INSN("01","%0,%0") : "+Q"(*zero) : : "cc");
printf("CC:%d\n", get_cc());
dump_field(zero, 2);
- asm volatile ("nc %O0(19,%R0),%1\n"::"Q" (*buf1),
- "Q"(*buf2):"cc","memory");
+ asm volatile (NC_INSN("13","%0,%1") : "=Q"(*buf1) : "Q"(*buf2) : "cc");
printf("CC:%d\n", get_cc());
dump_field(buf1, 20);
}
"aaaaa";
printf("\nXC:\n");
- asm volatile ("xc %O0(1,%R0),%0\n"::"Q" (*zero),
- "Q"(*zero):"cc","memory");
+ asm volatile (XC_INSN("00","%0,%0") : "+Q"(*zero) : : "cc");
printf("CC:%d\n", get_cc());
dump_field(zero, 4);
- asm volatile ("xc %O0(10,%R0),%0\n"::"Q" (*zero),
- "Q"(*zero):"cc","memory");
+ asm volatile (XC_INSN("09","%0,%0") : "+Q"(*zero) : : "cc");
printf("CC:%d\n", get_cc());
dump_field(zero, 12);
- asm volatile ("xc %O0(100,%R0),%0\n"::"Q" (*zero),
- "Q"(*zero):"cc","memory");
+ asm volatile (XC_INSN("63","%0,%0") : "+Q"(*zero) : : "cc");
printf("CC:%d\n", get_cc());
dump_field(zero, 102);
- asm volatile ("xc %O0(256,%R0),%0\n"::"Q" (*zero),
- "Q"(*zero):"cc","memory");
+ asm volatile (XC_INSN("ff","%0,%0") : "+Q"(*zero) : : "cc");
printf("CC:%d\n", get_cc());
dump_field(zero, 257);