mvcos,"move with optional specifications",N/A,"privileged instruction"
lptea,"load page-table-entry address",N/A,"privileged instruction"
cu24,"convert utf-16 to utf-32","not implemented","open bugzilla"
-cu21,"convert utf-16 to utf-8","not implemented","open bugzilla"
+cu21,"convert utf-16 to utf-8",implemented
cu42,"convert utf-32 to utf-16","not implemented","open bugzilla"
cu41,"convert utf-32 to utf-8","not implemented","open bugzilla"
cu12,"convert utf-8 to utf-16","not implemented","open bugzilla"
dist_noinst_SCRIPTS = filter_stderr
-INSN_TESTS = cs csg cds cdsg
+INSN_TESTS = cs csg cds cdsg cu21
check_PROGRAMS = $(INSN_TESTS)
--- /dev/null
+#include <stdint.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include "../../../none/tests/s390x/opcodes.h"
+
+/* Define various input buffers. */
+
+/* U+0000 to U+007f: Result is 1 byte for each uint16_t */
+uint16_t pattern1[] = {
+ 0x0000, 0x007f, /* corner cases */
+ 0x0047, 0x0056, 0x0045, 0x0021, 0x007b, 0x003a /* misc */
+};
+
+/* U+0080 to U+07ff: Result is 2 bytes for each uint16_t */
+uint16_t pattern2[] = {
+ 0x0080, 0x07ff, /* corner cases */
+ 0x07df, 0x008f, 0x0100, 0x017f, 0x052f, 0x0600, 0x06ff /* misc */
+};
+
+/* U+0800 to U+d7ff: Result is 3 bytes for each uint16_t
+ U+dc00 to U+ffff: Result is 3 bytes for each uint16_t */
+uint16_t pattern3[] = {
+ 0x0800, 0xd7ff, /* corner cases */
+ 0xdc00, 0xffff, /* corner cases */
+ 0x083f, 0x1a21, 0x1b10, 0x2200, 0x225e, 0x22c9, 0xe001 /* misc */
+};
+
+/* U+d800 to U+dbff: Result is 4 bytes for each uint16_t pair */
+uint16_t pattern4[] = {
+ 0xd800, 0xdc00, /* left corner case */
+ 0xdbff, 0xdfff, /* right corner case */
+ 0xdada, 0xdddd, 0xdeaf, 0xdcdc /* misc */
+};
+
+
+void
+do_cu21(uint8_t *dst, uint64_t dst_len, uint16_t *src, uint64_t src_len)
+{
+ /* build up the register pairs */
+ register uint16_t *source asm("4") = src;
+ register uint64_t source_len asm("5") = src_len;
+ register uint8_t *dest asm("2") = dst;
+ register uint64_t dest_len asm("3") = dst_len;
+
+ asm volatile(
+ CU21(0,2,4)
+ : "+d"(dest), "+d"(source), "+d"(source_len), "+d"(dest_len)
+ :
+ : "memory", "cc");
+ return;
+}
+
+int main()
+{
+ /*------------------------------------------------------------*/
+ /* Write to a too small buffer */
+ /*------------------------------------------------------------*/
+
+ /* Write 2 bytes into buffer of length 1 */
+ do_cu21(malloc(1), 10, pattern2, 2); // complaint (2 bytes)
+
+ /* Write 2 bytes into buffer of length 2 */
+ do_cu21(malloc(2), 10, pattern2, 2); // no complaint
+
+ /* Write 3 bytes into buffer of length 1 */
+ do_cu21(malloc(1), 10, pattern3, 2); // 2 complaints (3 = 2+1)
+
+ /* Write 3 bytes into buffer of length 2 */
+ do_cu21(malloc(2), 10, pattern3, 2); // complaint (1 byte)
+
+ /* Write 3 bytes into buffer of length 3 */
+ do_cu21(malloc(3), 10, pattern3, 2); // no complaint
+
+ /* Write 4 bytes into buffer of length 1 */
+ do_cu21(malloc(1), 10, pattern4, 4); // complaint (4 bytes)
+
+ /* Write 4 bytes into buffer of length 2 */
+ do_cu21(malloc(2), 10, pattern4, 4); // complaint (4 bytes)
+
+ /* Write 4 bytes into buffer of length 3 */
+ do_cu21(malloc(3), 10, pattern4, 4); // complaint (4 bytes)
+
+ /* Write 4 bytes into buffer of length 4 */
+ do_cu21(malloc(4), 10, pattern4, 4); // no complaint
+
+ /*------------------------------------------------------------*/
+ /* Read uninitialised data */
+ /*------------------------------------------------------------*/
+ uint8_t *input = malloc(10);
+
+ /* Input buffer is completely uninitialised */
+ do_cu21(malloc(4), 4, (void *)input, 2); // complaint
+
+ /* Read 2 bytes from input buffer. First byte is uninitialised */
+ input = malloc(10);
+ input[0] = 0x0;
+ do_cu21(malloc(4), 4, (void *)input, 2); // complaint
+
+ /* Read 2 bytes from input buffer. Second byte is uninitialised */
+ input = malloc(10);
+ input[1] = 0x0;
+ do_cu21(malloc(4), 4, (void *)input, 2); // complaint
+
+ /* Read 2 bytes from input buffer. All bytes are uninitialised */
+ input = malloc(10);
+ input[0] = input[1] = 0x0;
+ do_cu21(malloc(4), 4, (void *)input, 2); // no complaint
+
+ /* Write to NULL */
+ // do_cu21(NULL, 10, pattern1, sizeof pattern1); // complaint
+
+ return 0;
+}
--- /dev/null
+Invalid write of size 2
+ at 0x........: do_cu21 (cu21.c:53)
+ by 0x........: main (cu21.c:62)
+ Address 0x........ is 0 bytes inside a block of size 1 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (cu21.c:62)
+
+Invalid write of size 2
+ at 0x........: do_cu21 (cu21.c:53)
+ by 0x........: main (cu21.c:68)
+ Address 0x........ is 0 bytes inside a block of size 1 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (cu21.c:68)
+
+Invalid write of size 1
+ at 0x........: do_cu21 (cu21.c:53)
+ by 0x........: main (cu21.c:68)
+ Address 0x........ is 1 bytes after a block of size 1 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (cu21.c:68)
+
+Invalid write of size 1
+ at 0x........: do_cu21 (cu21.c:53)
+ by 0x........: main (cu21.c:71)
+ Address 0x........ is 0 bytes after a block of size 2 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (cu21.c:71)
+
+Invalid write of size 4
+ at 0x........: do_cu21 (cu21.c:53)
+ by 0x........: main (cu21.c:77)
+ Address 0x........ is 0 bytes inside a block of size 1 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (cu21.c:77)
+
+Invalid write of size 4
+ at 0x........: do_cu21 (cu21.c:53)
+ by 0x........: main (cu21.c:80)
+ Address 0x........ is 0 bytes inside a block of size 2 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (cu21.c:80)
+
+Invalid write of size 4
+ at 0x........: do_cu21 (cu21.c:53)
+ by 0x........: main (cu21.c:83)
+ Address 0x........ is 0 bytes inside a block of size 3 alloc'd
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: main (cu21.c:83)
+
+Conditional jump or move depends on uninitialised value(s)
+ at 0x........: do_cu21 (cu21.c:53)
+ by 0x........: main (cu21.c:94)
+
+Conditional jump or move depends on uninitialised value(s)
+ at 0x........: do_cu21 (cu21.c:45)
+ by 0x........: main (cu21.c:94)
+
+Conditional jump or move depends on uninitialised value(s)
+ at 0x........: do_cu21 (cu21.c:53)
+ by 0x........: main (cu21.c:99)
+
+Conditional jump or move depends on uninitialised value(s)
+ at 0x........: do_cu21 (cu21.c:45)
+ by 0x........: main (cu21.c:99)
+
+Conditional jump or move depends on uninitialised value(s)
+ at 0x........: do_cu21 (cu21.c:53)
+ by 0x........: main (cu21.c:104)
+
+Conditional jump or move depends on uninitialised value(s)
+ at 0x........: do_cu21 (cu21.c:45)
+ by 0x........: main (cu21.c:104)
+
--- /dev/null
+prog: cu21
+vgopts: -q
and_EI or_EI xor_EI insert_EI mul_GE add_GE condloadstore \
op_exception fgx stck stckf stcke stfle cksm mvcl clcl troo \
trto trot trtt tr tre cij cgij clij clgij crj cgrj clrj clgrj \
- cs csg cds cdsg
+ cs csg cds cdsg cu21 cu21_1
check_PROGRAMS = $(INSN_TESTS) \
allexec \
ex_clone_LDFLAGS = -lpthread
tcxb_CFLAGS = $(AM_CFLAGS) -std=gnu99
+cu21_1_CFLAGS = $(AM_CFLAGS) -DM3=1
--- /dev/null
+#include <stdint.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include "opcodes.h"
+
+#ifndef M3
+#define M3 0
+#endif
+
+/* The abstracted result of an CU21 insn */
+typedef struct {
+ uint64_t addr1; // target
+ uint64_t len1;
+ uint64_t addr2; // source
+ uint64_t len2;
+ uint32_t cc;
+} cu21_t;
+
+/* Define various input buffers. */
+
+/* U+0000 to U+007f: Result is 1 byte for each uint16_t */
+uint16_t pattern1[] = {
+ 0x0000, 0x007f, /* corner cases */
+ 0x0047, 0x0056, 0x0045, 0x0021, 0x007b, 0x003a /* misc */
+};
+
+/* U+0080 to U+07ff: Result is 2 bytes for each uint16_t */
+uint16_t pattern2[] = {
+ 0x0080, 0x07ff, /* corner cases */
+ 0x07df, 0x008f, 0x0100, 0x017f, 0x052f, 0x0600, 0x06ff /* misc */
+};
+
+/* U+0800 to U+d7ff: Result is 3 bytes for each uint16_t
+ U+dc00 to U+ffff: Result is 3 bytes for each uint16_t */
+uint16_t pattern3[] = {
+ 0x0800, 0xd7ff, /* corner cases */
+ 0xdc00, 0xffff, /* corner cases */
+ 0x083f, 0x1a21, 0x1b10, 0x2200, 0x225e, 0x22c9, 0xe001 /* misc */
+};
+
+/* U+d800 to U+dbff: Result is 4 bytes for each uint16_t pair */
+uint16_t pattern4[] = {
+ 0xd800, 0xdc00, /* left corner case */
+ 0xdbff, 0xdfff, /* right corner case */
+ 0xdada, 0xdddd, 0xdeaf, 0xdcdc /* misc */
+};
+
+/* Invalid low surrogate */
+uint16_t invalid[] = { 0xd801, 0x0098 };
+
+/* Mixed bytes */
+uint16_t mixed[] = {
+ 0x0078 /* 1 byte */,
+ 0x0200 /* 2 bytes */,
+ 0xffff /* 3 bytes */,
+ 0xd800, 0xdc01 /* 4 bytes */
+};
+
+/* This is the buffer for the converted bytes. */
+uint8_t buff[1000]; /* Large so we con'don't have to worry about it */
+
+void write_and_check(uint16_t *, unsigned, unsigned);
+
+
+static cu21_t
+do_cu21(uint8_t *dst, uint64_t dst_len, uint16_t *src, uint64_t src_len)
+{
+ int cc = 42;
+ cu21_t regs;
+
+ /* build up the register pairs */
+ register uint16_t *source asm("4") = src;
+ register uint64_t source_len asm("5") = src_len;
+ register uint8_t *dest asm("2") = dst;
+ register uint64_t dest_len asm("3") = dst_len;
+
+ asm volatile(
+ CU21(M3,2,4)
+ "ipm %2\n\t"
+ "srl %2,28\n\t"
+ : "+d"(dest), "+d"(source), "=d"(cc),
+ "+d"(source_len), "+d"(dest_len)
+ :
+ : "memory", "cc");
+
+ /* Capture register contents at end of cu21 */
+ regs.addr1 = (uint64_t)dest;
+ regs.len1 = dest_len;
+ regs.addr2 = (uint64_t)source;
+ regs.len2 = source_len;
+ regs.cc = cc;
+
+ return regs;
+}
+
+void
+run_test(uint8_t *dst, uint64_t dst_len, uint16_t *src, uint64_t src_len)
+{
+ int i;
+ cu21_t result;
+
+ result = do_cu21(dst, dst_len, src, src_len);
+
+ // Write out the converted bytes, if any
+ printf("UTF8: ");
+ if (dst_len - result.len1 == 0)
+ printf(" <none>");
+ else
+ for (i = 0; i < dst_len - result.len1; i++) {
+ printf(" %02x", dst[i]);
+ }
+ printf("\n");
+
+ printf(" cc = %d\n", result.cc);
+ if (dst != NULL)
+ printf(" dst address difference: %"PRId64, result.addr1 - (uint64_t)dst);
+ printf(" dst len: %"PRId64"\n", result.len1);
+
+ if (src != NULL)
+ printf(" src address difference: %"PRId64, result.addr2 - (uint64_t)src);
+ printf(" src len: %"PRId64"\n", result.len2);
+}
+
+int main()
+{
+ /* Length == 0, no memory should be read or written */
+ printf("\n------------- test1 ----------------\n");
+ run_test(NULL, 0, NULL, 0);
+
+ /* Test exhaustion of source length (source bytes are valid) */
+ printf("\n------------- test2.1 ----------------\n");
+
+ /* No character will be written to BUFF, i.e. loop in jitted code
+ is not iterated */
+ run_test(buff, sizeof buff, NULL, 1);
+ run_test(buff, sizeof buff, pattern1, 1);
+ run_test(buff, sizeof buff, pattern2, 1);
+ run_test(buff, sizeof buff, pattern3, 1);
+ run_test(buff, sizeof buff, pattern4, 1);
+ run_test(buff, sizeof buff, pattern4, 2);
+ run_test(buff, sizeof buff, pattern4, 3);
+
+ printf("\n------------- test2.2 ----------------\n");
+ /* At least one character will be written to BUFF, i.e. loop in jitted
+ code is iterated */
+ run_test(buff, sizeof buff, pattern1, 3);
+ run_test(buff, sizeof buff, pattern2, 5);
+ run_test(buff, sizeof buff, pattern3, 7);
+ run_test(buff, sizeof buff, pattern4, 9);
+ run_test(buff, sizeof buff, pattern4, 10);
+ run_test(buff, sizeof buff, pattern4, 11);
+
+ /* Test exhaustion of destination length (source bytes are valid) */
+ printf("\n------------- test3.1 ----------------\n");
+
+ /* No character will be written to BUFF, i.e. loop in jitted code
+ is not iterated */
+
+ /* Want to write a single byte */
+ run_test(NULL, 0, pattern1, sizeof pattern1);
+
+ /* Want to write two bytes */
+ run_test(NULL, 0, pattern2, sizeof pattern2);
+ run_test(NULL, 1, pattern2, sizeof pattern2);
+
+ /* Want to write three bytes */
+ run_test(NULL, 0, pattern3, sizeof pattern3);
+ run_test(NULL, 1, pattern3, sizeof pattern3);
+ run_test(NULL, 2, pattern3, sizeof pattern3);
+
+ /* Want to write four bytes */
+ run_test(NULL, 0, pattern4, sizeof pattern4);
+ run_test(NULL, 1, pattern4, sizeof pattern4);
+ run_test(NULL, 2, pattern4, sizeof pattern4);
+ run_test(NULL, 3, pattern4, sizeof pattern4);
+
+ printf("\n------------- test3.2 ----------------\n");
+ /* At least one character will be written to BUFF, i.e. loop in jitted
+ code is iterated */
+ run_test(buff, 3, pattern1, sizeof pattern1);
+
+ run_test(buff, 5, pattern2, sizeof pattern2);
+
+ run_test(buff, 7, pattern3, sizeof pattern3);
+ run_test(buff, 8, pattern3, sizeof pattern3);
+
+ run_test(buff, 9, pattern4, sizeof pattern4);
+ run_test(buff, 10, pattern4, sizeof pattern4);
+ run_test(buff, 11, pattern4, sizeof pattern4);
+
+ /* When both operands are exhausted, cc=0 takes precedence.
+ (test1 tests this for len == 0) */
+ printf("\n------------- test4 ----------------\n");
+ run_test(buff, 6, pattern1, 6);
+
+ /* Input has invalid low surrogate. */
+ printf("\n------------- test5 ----------------\n");
+ run_test(buff, sizeof buff, invalid, sizeof invalid);
+ run_test(buff, 0, invalid, sizeof invalid);
+
+ /* Convert all pattern buffers */
+ printf("\n------------- test6 ----------------\n");
+ run_test(buff, sizeof buff, pattern1, sizeof pattern1);
+ run_test(buff, sizeof buff, pattern2, sizeof pattern2);
+ run_test(buff, sizeof buff, pattern3, sizeof pattern3);
+ run_test(buff, sizeof buff, pattern4, sizeof pattern4);
+ run_test(buff, sizeof buff, mixed, sizeof mixed);
+
+ /* Make sure we only write the exact number of bytes (and not more) */
+ uint16_t pat[2];
+
+ /* Write 1 byte */
+ printf("\n------------- test7.1 ----------------\n");
+ pat[0] = 0x10;
+ write_and_check(pat, 2, 1);
+
+ /* Write 2 bytes */
+ printf("\n------------- test7.2 ----------------\n");
+ pat[0] = 0x8f;
+ write_and_check(pat, 2, 2);
+
+ /* Write 3 bytes */
+ printf("\n------------- test7.3 ----------------\n");
+ pat[0] = 0x842;
+ write_and_check(pat, 2, 3);
+
+ /* Write 4 bytes */
+ printf("\n------------- test7.4 ----------------\n");
+ pat[0] = 0xd842;
+ pat[1] = 0xdc42;
+ write_and_check(pat, 2, 4);
+
+ return 0;
+}
+
+
+void
+write_and_check_aux(uint16_t *input, unsigned num_input_bytes,
+ unsigned num_expected_output_bytes,
+ unsigned fill_byte)
+{
+ int num_errors, i;
+
+ /* Fill output buffer with FILL_BYTE */
+ memset(buff, fill_byte, sizeof buff);
+
+ /* Execute cu21 */
+ run_test(buff, sizeof buff, input, num_input_bytes);
+
+ /* Make sure the rest of the buffer is unmodified. */
+ num_errors = 0;
+ for (i = num_expected_output_bytes; i < sizeof buff; ++i)
+ if (buff[i] != fill_byte) ++num_errors;
+ if (num_errors)
+ fprintf(stderr, "*** wrote more than one byte\n");
+}
+
+void
+write_and_check(uint16_t *input, unsigned num_input_bytes,
+ unsigned num_expected_output_bytes)
+{
+ write_and_check_aux(input, num_input_bytes, num_expected_output_bytes, 0x0);
+
+ /* Run again with different fill pattern to make sure we did not write
+ an extra 0x0 byte */
+ write_and_check_aux(input, num_input_bytes, num_expected_output_bytes, 0xFF);
+}
--- /dev/null
+
+------------- test1 ----------------
+UTF8: <none>
+ cc = 0
+ dst len: 0
+ src len: 0
+
+------------- test2.1 ----------------
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src len: 1
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src address difference: 0 src len: 1
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src address difference: 0 src len: 1
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src address difference: 0 src len: 1
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src address difference: 0 src len: 1
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src address difference: 0 src len: 2
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src address difference: 0 src len: 3
+
+------------- test2.2 ----------------
+UTF8: 00
+ cc = 0
+ dst address difference: 1 dst len: 999
+ src address difference: 2 src len: 1
+UTF8: c2 80 df bf
+ cc = 0
+ dst address difference: 4 dst len: 996
+ src address difference: 4 src len: 1
+UTF8: e0 a0 80 ed 9f bf ed b0 80
+ cc = 0
+ dst address difference: 9 dst len: 991
+ src address difference: 6 src len: 1
+UTF8: f0 90 80 80 f4 8f bf bf
+ cc = 0
+ dst address difference: 8 dst len: 992
+ src address difference: 8 src len: 1
+UTF8: f0 90 80 80 f4 8f bf bf
+ cc = 0
+ dst address difference: 8 dst len: 992
+ src address difference: 8 src len: 2
+UTF8: f0 90 80 80 f4 8f bf bf
+ cc = 0
+ dst address difference: 8 dst len: 992
+ src address difference: 8 src len: 3
+
+------------- test3.1 ----------------
+UTF8: <none>
+ cc = 1
+ dst len: 0
+ src address difference: 0 src len: 16
+UTF8: <none>
+ cc = 1
+ dst len: 0
+ src address difference: 0 src len: 18
+UTF8: <none>
+ cc = 1
+ dst len: 1
+ src address difference: 0 src len: 18
+UTF8: <none>
+ cc = 1
+ dst len: 0
+ src address difference: 0 src len: 22
+UTF8: <none>
+ cc = 1
+ dst len: 1
+ src address difference: 0 src len: 22
+UTF8: <none>
+ cc = 1
+ dst len: 2
+ src address difference: 0 src len: 22
+UTF8: <none>
+ cc = 1
+ dst len: 0
+ src address difference: 0 src len: 16
+UTF8: <none>
+ cc = 1
+ dst len: 1
+ src address difference: 0 src len: 16
+UTF8: <none>
+ cc = 1
+ dst len: 2
+ src address difference: 0 src len: 16
+UTF8: <none>
+ cc = 1
+ dst len: 3
+ src address difference: 0 src len: 16
+
+------------- test3.2 ----------------
+UTF8: 00 7f 47
+ cc = 1
+ dst address difference: 3 dst len: 0
+ src address difference: 6 src len: 10
+UTF8: c2 80 df bf
+ cc = 1
+ dst address difference: 4 dst len: 1
+ src address difference: 4 src len: 14
+UTF8: e0 a0 80 ed 9f bf
+ cc = 1
+ dst address difference: 6 dst len: 1
+ src address difference: 4 src len: 18
+UTF8: e0 a0 80 ed 9f bf
+ cc = 1
+ dst address difference: 6 dst len: 2
+ src address difference: 4 src len: 18
+UTF8: f0 90 80 80 f4 8f bf bf
+ cc = 1
+ dst address difference: 8 dst len: 1
+ src address difference: 8 src len: 8
+UTF8: f0 90 80 80 f4 8f bf bf
+ cc = 1
+ dst address difference: 8 dst len: 2
+ src address difference: 8 src len: 8
+UTF8: f0 90 80 80 f4 8f bf bf
+ cc = 1
+ dst address difference: 8 dst len: 3
+ src address difference: 8 src len: 8
+
+------------- test4 ----------------
+UTF8: 00 7f 47
+ cc = 0
+ dst address difference: 3 dst len: 3
+ src address difference: 6 src len: 0
+
+------------- test5 ----------------
+UTF8: f0 90 92 98
+ cc = 0
+ dst address difference: 4 dst len: 996
+ src address difference: 4 src len: 0
+UTF8: <none>
+ cc = 1
+ dst address difference: 0 dst len: 0
+ src address difference: 0 src len: 4
+
+------------- test6 ----------------
+UTF8: 00 7f 47 56 45 21 7b 3a
+ cc = 0
+ dst address difference: 8 dst len: 992
+ src address difference: 16 src len: 0
+UTF8: c2 80 df bf df 9f c2 8f c4 80 c5 bf d4 af d8 80 db bf
+ cc = 0
+ dst address difference: 18 dst len: 982
+ src address difference: 18 src len: 0
+UTF8: e0 a0 80 ed 9f bf ed b0 80 ef bf bf e0 a0 bf e1 a8 a1 e1 ac 90 e2 88 80 e2 89 9e e2 8b 89 ee 80 81
+ cc = 0
+ dst address difference: 33 dst len: 967
+ src address difference: 22 src len: 0
+UTF8: f0 90 80 80 f4 8f bf bf f3 86 a7 9d ed ba af ed b3 9c
+ cc = 0
+ dst address difference: 18 dst len: 982
+ src address difference: 16 src len: 0
+UTF8: 78 c8 80 ef bf bf f0 90 80 81
+ cc = 0
+ dst address difference: 10 dst len: 990
+ src address difference: 10 src len: 0
+
+------------- test7.1 ----------------
+UTF8: 10
+ cc = 0
+ dst address difference: 1 dst len: 999
+ src address difference: 2 src len: 0
+UTF8: 10
+ cc = 0
+ dst address difference: 1 dst len: 999
+ src address difference: 2 src len: 0
+
+------------- test7.2 ----------------
+UTF8: c2 8f
+ cc = 0
+ dst address difference: 2 dst len: 998
+ src address difference: 2 src len: 0
+UTF8: c2 8f
+ cc = 0
+ dst address difference: 2 dst len: 998
+ src address difference: 2 src len: 0
+
+------------- test7.3 ----------------
+UTF8: e0 a1 82
+ cc = 0
+ dst address difference: 3 dst len: 997
+ src address difference: 2 src len: 0
+UTF8: e0 a1 82
+ cc = 0
+ dst address difference: 3 dst len: 997
+ src address difference: 2 src len: 0
+
+------------- test7.4 ----------------
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src address difference: 0 src len: 2
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src address difference: 0 src len: 2
--- /dev/null
+prog: cu21
--- /dev/null
+cu21.c
\ No newline at end of file
--- /dev/null
+
+------------- test1 ----------------
+UTF8: <none>
+ cc = 0
+ dst len: 0
+ src len: 0
+
+------------- test2.1 ----------------
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src len: 1
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src address difference: 0 src len: 1
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src address difference: 0 src len: 1
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src address difference: 0 src len: 1
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src address difference: 0 src len: 1
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src address difference: 0 src len: 2
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src address difference: 0 src len: 3
+
+------------- test2.2 ----------------
+UTF8: 00
+ cc = 0
+ dst address difference: 1 dst len: 999
+ src address difference: 2 src len: 1
+UTF8: c2 80 df bf
+ cc = 0
+ dst address difference: 4 dst len: 996
+ src address difference: 4 src len: 1
+UTF8: e0 a0 80 ed 9f bf ed b0 80
+ cc = 0
+ dst address difference: 9 dst len: 991
+ src address difference: 6 src len: 1
+UTF8: f0 90 80 80 f4 8f bf bf
+ cc = 0
+ dst address difference: 8 dst len: 992
+ src address difference: 8 src len: 1
+UTF8: f0 90 80 80 f4 8f bf bf
+ cc = 0
+ dst address difference: 8 dst len: 992
+ src address difference: 8 src len: 2
+UTF8: f0 90 80 80 f4 8f bf bf
+ cc = 0
+ dst address difference: 8 dst len: 992
+ src address difference: 8 src len: 3
+
+------------- test3.1 ----------------
+UTF8: <none>
+ cc = 1
+ dst len: 0
+ src address difference: 0 src len: 16
+UTF8: <none>
+ cc = 1
+ dst len: 0
+ src address difference: 0 src len: 18
+UTF8: <none>
+ cc = 1
+ dst len: 1
+ src address difference: 0 src len: 18
+UTF8: <none>
+ cc = 1
+ dst len: 0
+ src address difference: 0 src len: 22
+UTF8: <none>
+ cc = 1
+ dst len: 1
+ src address difference: 0 src len: 22
+UTF8: <none>
+ cc = 1
+ dst len: 2
+ src address difference: 0 src len: 22
+UTF8: <none>
+ cc = 1
+ dst len: 0
+ src address difference: 0 src len: 16
+UTF8: <none>
+ cc = 1
+ dst len: 1
+ src address difference: 0 src len: 16
+UTF8: <none>
+ cc = 1
+ dst len: 2
+ src address difference: 0 src len: 16
+UTF8: <none>
+ cc = 1
+ dst len: 3
+ src address difference: 0 src len: 16
+
+------------- test3.2 ----------------
+UTF8: 00 7f 47
+ cc = 1
+ dst address difference: 3 dst len: 0
+ src address difference: 6 src len: 10
+UTF8: c2 80 df bf
+ cc = 1
+ dst address difference: 4 dst len: 1
+ src address difference: 4 src len: 14
+UTF8: e0 a0 80 ed 9f bf
+ cc = 1
+ dst address difference: 6 dst len: 1
+ src address difference: 4 src len: 18
+UTF8: e0 a0 80 ed 9f bf
+ cc = 1
+ dst address difference: 6 dst len: 2
+ src address difference: 4 src len: 18
+UTF8: f0 90 80 80 f4 8f bf bf
+ cc = 1
+ dst address difference: 8 dst len: 1
+ src address difference: 8 src len: 8
+UTF8: f0 90 80 80 f4 8f bf bf
+ cc = 1
+ dst address difference: 8 dst len: 2
+ src address difference: 8 src len: 8
+UTF8: f0 90 80 80 f4 8f bf bf
+ cc = 1
+ dst address difference: 8 dst len: 3
+ src address difference: 8 src len: 8
+
+------------- test4 ----------------
+UTF8: 00 7f 47
+ cc = 0
+ dst address difference: 3 dst len: 3
+ src address difference: 6 src len: 0
+
+------------- test5 ----------------
+UTF8: <none>
+ cc = 2
+ dst address difference: 0 dst len: 1000
+ src address difference: 0 src len: 4
+UTF8: <none>
+ cc = 2
+ dst address difference: 0 dst len: 0
+ src address difference: 0 src len: 4
+
+------------- test6 ----------------
+UTF8: 00 7f 47 56 45 21 7b 3a
+ cc = 0
+ dst address difference: 8 dst len: 992
+ src address difference: 16 src len: 0
+UTF8: c2 80 df bf df 9f c2 8f c4 80 c5 bf d4 af d8 80 db bf
+ cc = 0
+ dst address difference: 18 dst len: 982
+ src address difference: 18 src len: 0
+UTF8: e0 a0 80 ed 9f bf ed b0 80 ef bf bf e0 a0 bf e1 a8 a1 e1 ac 90 e2 88 80 e2 89 9e e2 8b 89 ee 80 81
+ cc = 0
+ dst address difference: 33 dst len: 967
+ src address difference: 22 src len: 0
+UTF8: f0 90 80 80 f4 8f bf bf f3 86 a7 9d ed ba af ed b3 9c
+ cc = 0
+ dst address difference: 18 dst len: 982
+ src address difference: 16 src len: 0
+UTF8: 78 c8 80 ef bf bf f0 90 80 81
+ cc = 0
+ dst address difference: 10 dst len: 990
+ src address difference: 10 src len: 0
+
+------------- test7.1 ----------------
+UTF8: 10
+ cc = 0
+ dst address difference: 1 dst len: 999
+ src address difference: 2 src len: 0
+UTF8: 10
+ cc = 0
+ dst address difference: 1 dst len: 999
+ src address difference: 2 src len: 0
+
+------------- test7.2 ----------------
+UTF8: c2 8f
+ cc = 0
+ dst address difference: 2 dst len: 998
+ src address difference: 2 src len: 0
+UTF8: c2 8f
+ cc = 0
+ dst address difference: 2 dst len: 998
+ src address difference: 2 src len: 0
+
+------------- test7.3 ----------------
+UTF8: e0 a1 82
+ cc = 0
+ dst address difference: 3 dst len: 997
+ src address difference: 2 src len: 0
+UTF8: e0 a1 82
+ cc = 0
+ dst address difference: 3 dst len: 997
+ src address difference: 2 src len: 0
+
+------------- test7.4 ----------------
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src address difference: 0 src len: 2
+UTF8: <none>
+ cc = 0
+ dst address difference: 0 dst len: 1000
+ src address difference: 0 src len: 2
--- /dev/null
+prereq: ../../../tests/s390x_features s390x-etf3
+prog: cu21_1