From: Florian Krohm Date: Sun, 5 Aug 2012 03:02:43 +0000 (+0000) Subject: Add testcases for the cu14 insn. Update opcode table. X-Git-Tag: svn/VALGRIND_3_8_0~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76a9da7830ec9e9c4dd075193620da2d167b4c71;p=thirdparty%2Fvalgrind.git Add testcases for the cu14 insn. Update opcode table. Part of fixing #289839. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12837 --- diff --git a/docs/internals/s390-opcodes.csv b/docs/internals/s390-opcodes.csv index 51a58ee0c2..ff6f1352ac 100644 --- a/docs/internals/s390-opcodes.csv +++ b/docs/internals/s390-opcodes.csv @@ -664,7 +664,7 @@ cu21,"convert utf-16 to utf-8",implemented cu42,"convert utf-32 to utf-16",implemented cu41,"convert utf-32 to utf-8","not implemented","open bugzilla" cu12,"convert utf-8 to utf-16",implemented -cu14,"convert utf-8 to utf-32","not implemented","open bugzilla" +cu14,"convert utf-8 to utf-32",implemented srstu,"search string unicode","not implemented", trtr,"tranlate and test reverse","not implemented", myr,"multiply unnormalized long hfp","won't do","hfp instruction" diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am index 2f275438b6..e32bfd6909 100644 --- a/none/tests/s390x/Makefile.am +++ b/none/tests/s390x/Makefile.am @@ -8,7 +8,7 @@ INSN_TESTS = clc clcle cvb cvd icm lpr tcxb lam_stam xc mvst add sub mul \ 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 cu21 cu21_1 cu24 cu24_1 cu42 cu12 cu12_1 \ - ex_sig ex_clone + ex_sig ex_clone cu14 cu14_1 check_PROGRAMS = $(INSN_TESTS) \ allexec \ @@ -29,6 +29,7 @@ AM_CCASFLAGS += @FLAG_M64@ allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@ tcxb_CFLAGS = $(AM_CFLAGS) -std=gnu99 cu12_1_CFLAGS = $(AM_CFLAGS) -DM3=1 +cu14_1_CFLAGS = $(AM_CFLAGS) -DM3=1 cu21_1_CFLAGS = $(AM_CFLAGS) -DM3=1 cu24_1_CFLAGS = $(AM_CFLAGS) -DM3=1 diff --git a/none/tests/s390x/cu14.c b/none/tests/s390x/cu14.c new file mode 100644 index 0000000000..44738c785b --- /dev/null +++ b/none/tests/s390x/cu14.c @@ -0,0 +1,595 @@ +#include +#include +#include +#include +#include +#include "opcodes.h" + +#ifndef M3 +#define M3 0 +#endif + +/* The abstracted result of an CU14 insn */ +typedef struct { + uint64_t addr1; // target + uint64_t len1; + uint64_t addr2; // source + uint64_t len2; + uint32_t cc; +} cu14_t; + +/* Define various input buffers. */ + +/* 1-byte UTF-8 character */ +uint8_t pattern1[] = { + 0x00, 0x01, 0x02, 0x03 +}; + +/* 2-byte UTF-8 character */ +uint8_t pattern2[] = { + 0xc2, 0x80, + 0xc2, 0x81, + 0xc2, 0x82, + 0xc2, 0x83, +}; + +/* 3-byte UTF-8 character */ +uint8_t pattern3[] = { + 0xe1, 0x80, 0x80, + 0xe1, 0x80, 0x81, + 0xe1, 0x80, 0x82, + 0xe1, 0x80, 0x83, +}; + +/* 4-byte UTF-8 character */ +uint8_t pattern4[] = { + 0xf4, 0x80, 0x80, 0x80, + 0xf4, 0x80, 0x80, 0x81, + 0xf4, 0x80, 0x80, 0x82, + 0xf4, 0x80, 0x80, 0x83, +}; + + +/* Mixed bytes */ +uint8_t mixed[] = { + 0x01, // 1 byte + 0xc3, 0x80, // 2 bytes + 0x12, // 1 byte + 0xe1, 0x90, 0x93, // 3 bytes + 0x23, // 1 byte + 0xf4, 0x80, 0x90, 0x8a, // 4 bytes + 0x34, // 1 byte + 0xc4, 0x8c, // 2 bytes + 0xe1, 0x91, 0x94, // 3 bytes + 0xc5, 0x8a, // 2 bytes + 0xf4, 0x80, 0x90, 0x8a, // 4 bytes + 0xc5, 0x8a, // 2 bytes + 0xe1, 0x91, 0x94, // 3 bytes + 0xf4, 0x80, 0x90, 0x8a, // 4 bytes + 0xe1, 0x91, 0x94, // 3 bytes +}; + +/* This is the buffer for the converted bytes. */ +uint32_t buff[500]; /* Large so we con'don't have to worry about it */ + + +static cu14_t +do_cu14(uint32_t *dst, uint64_t dst_len, uint8_t *src, uint64_t src_len) +{ + int cc = 42; + cu14_t regs; + + /* build up the register pairs */ + register uint8_t *source asm("4") = src; + register uint64_t source_len asm("5") = src_len; + register uint32_t *dest asm("2") = dst; + register uint64_t dest_len asm("3") = dst_len; + + asm volatile( + CU14(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 cu14 */ + 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(uint32_t *dst, uint64_t dst_len, uint8_t *src, uint64_t src_len) +{ + int i; + cu14_t result; + + printf("UTF8: "); + if (src_len == 0) + printf(" "); + else { + for(i = 0; i < src_len; ++i) + printf(" %02x", src[i]); + } + printf("\n"); + + result = do_cu14(dst, dst_len, src, src_len); + + // Write out the converted bytes, if any + printf("UTF32: "); + if (dst_len - result.len1 == 0) + printf(" "); + else { + uint64_t num_bytes = dst_len - result.len1; + + /* The number of bytes that were written must be divisible by 4 */ + if (num_bytes % 4 != 0) + fprintf(stderr, "*** number of bytes is not a multiple of 4\n"); + + for (i = 0; i < num_bytes / 4; i++) { + printf(" %08x", 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); +} + +// Test conversion of a one-byte character +void convert_1_byte(void) +{ + int i; + + printf("===== Conversion of a one-byte character =====\n"); + + printf("\n----- Valid characters -----\n"); + uint8_t valid[] = { + 0x00, 0x7f, // corner cases + 0x01, 0x10, 0x7e, 0x5d // misc + }; + run_test(buff, sizeof buff, valid, sizeof valid); + + // As conversion stops upon encountering an invalid character, we + // need to test each invalid character separately, to make sure it + // is recognized as invalid. + + printf("\n----- Invalid characters -----\n"); + uint8_t always_invalid[] = { + 0x80, 0xbf, // corner cases + 0xf8, 0xff, // corner cases + 0x81, 0xbe, 0x95, 0xab // misc + }; + for (i = 0; i < sizeof always_invalid; ++i) { + uint8_t invalid_char[1]; + invalid_char[0] = always_invalid[i]; + run_test(buff, sizeof buff, invalid_char, sizeof invalid_char); + } + + // In case of m3 == 0 we get cc=0 indicating exhaustion of source + printf("\n----- Invalid characters if m3 == 1 -----\n"); + uint8_t invalid_if_m3[] = { // contains all such invalid characters + 0xc0, 0xc1, + 0xf5, 0xf6, 0xf7 + }; + for (i = 0; i < sizeof invalid_if_m3; ++i) { + uint8_t invalid_char[1]; + invalid_char[0] = invalid_if_m3[i]; + run_test(buff, sizeof buff, invalid_char, sizeof invalid_char); + } + + printf("\n----- 1st char valid, 2nd char invalid -----\n"); + uint8_t valid_invalid[] = { + 0x10, // valid + 0xaa // invalid + }; + run_test(buff, sizeof buff, valid_invalid, sizeof valid_invalid); +} + +// Test conversion of a two-byte character +void convert_2_bytes(void) +{ + int i; + + printf("\n===== Conversion of a two-byte character =====\n"); + + printf("\n----- Valid characters -----\n"); + uint8_t valid[] = { + 0xc2, 0x80, // corner case + 0xc2, 0xbf, // corner case + 0xdf, 0x80, // corner case + 0xdf, 0xbf, // corner case + 0xc3, 0xbe, 0xda, 0xbc // misc + }; + run_test(buff, sizeof buff, valid, sizeof valid); + + printf("\n----- Valid characters if m3 == 0 -----\n"); + // First char is 0xc0 or 0xc1 + uint8_t valid_if_not_m3[] = { + 0xc0, 0x80, + 0xc0, 0xbf, + 0xc1, 0x80, + 0xc0, 0xbf + }; + run_test(buff, sizeof buff, valid_if_not_m3, sizeof valid_if_not_m3); + + // Test for invalid two-byte characters where the 1st byte is valid + // The 2nd byte is invalid if not in range 0x80..0xbf, inclusive + + // As conversion stops upon encountering an invalid character, we + // need to test each invalid character separately, to make sure it + // is recognized as invalid. + + printf("\n----- Invalid characters if m3 == 1 -----\n"); + uint8_t always_invalid[] = { + 0xc2, 0x00, + 0xc2, 0x7f, + 0xc2, 0xc0, + 0xc2, 0xff + }; + for (i = 0; i < sizeof always_invalid; i += 2) { + uint8_t invalid_char[2]; + invalid_char[0] = always_invalid[i]; + invalid_char[1] = always_invalid[i+1]; + run_test(buff, sizeof buff, invalid_char, sizeof invalid_char); + } + + /* Nb: for a two-byte character we need not test the case where + invalidity of the character (cc=2) takes precedence over exhaustion + of the 1st operand (cc=1). Invalidity of the character has already + been tested when testing the 1st byte. */ + + printf("\n----- 1st char valid, 2nd char invalid -----\n"); + uint8_t valid_invalid[] = { + 0xc3, 0x81, // valid + 0xc4, 0x00 // invalid + }; + run_test(buff, sizeof buff, valid_invalid, sizeof valid_invalid); +} + +// Test conversion of a three-byte character +void +convert_3_bytes(void) +{ + int i; + + printf("\n===== Conversion of a three-byte character =====\n"); + + /* Exhaustively test the 1st byte E0 - EF, and the interval boundaries for + the 2nd and 3rd bytes */ + printf("\n----- Valid characters -----\n"); + uint8_t e0[] = { + 0xe0, 0xa0, 0x80, + 0xe0, 0xbf, 0x80, + 0xe0, 0xa0, 0xbf, + 0xe0, 0xbf, 0xbf, + 0xe0, 0xaa, 0xbb, // random e0 .. .. + }; + run_test(buff, sizeof buff, e0, sizeof e0); + + uint8_t ed[] = { + 0xed, 0x80, 0x80, + 0xed, 0x9f, 0x80, + 0xed, 0x80, 0xbf, + 0xed, 0x9f, 0xbf, + 0xed, 0x8a, 0xbb, // random ed .. .. + }; + run_test(buff, sizeof buff, ed, sizeof ed); + + for (i = 0; i <= 0xf; ++i) { + uint8_t exxx_1[3] = { 0x0, 0x80, 0x80 }; + uint8_t exxx_2[3] = { 0x0, 0xbf, 0x80 }; + uint8_t exxx_3[3] = { 0x0, 0x80, 0xbf }; + uint8_t exxx_4[3] = { 0x0, 0xbf, 0xbf }; + + if (i == 0x00) continue; // special case e0 + if (i == 0x0d) continue; // special case ed + + exxx_1[0] = 0xe0 | i; + exxx_2[0] = 0xe0 | i; + exxx_3[0] = 0xe0 | i; + exxx_4[0] = 0xe0 | i; + run_test(buff, sizeof buff, exxx_1, sizeof exxx_1); + run_test(buff, sizeof buff, exxx_2, sizeof exxx_2); + run_test(buff, sizeof buff, exxx_3, sizeof exxx_3); + run_test(buff, sizeof buff, exxx_4, sizeof exxx_4); + }; + + printf("\n----- Invalid characters (2nd byte is invalid) -----\n"); + // Test for invalid three-byte characters where the 1st byte is valid + // The 2nd byte is invalid. + + // As conversion stops upon encountering an invalid character, we + // need to test each invalid character separately, to make sure it + // is recognized as invalid. + + e0[0] = 0xe0; // valid + e0[1] = 0x9f; // invalid because outside [0xa0 .. 0xbf] + e0[2] = 0x80; // valid + run_test(buff, sizeof buff, e0, sizeof e0); + e0[1] = 0xc0; // invalid because outside [0xa0 .. 0xbf] + run_test(buff, sizeof buff, e0, sizeof e0); + + ed[0] = 0xed; // valid + ed[1] = 0x7f; // invalid because outside [0x80 .. 0x9f] + ed[2] = 0x80; // valid + run_test(buff, sizeof buff, ed, sizeof ed); + ed[1] = 0xa0; // invalid because outside [0x80 .. 0x9f] + run_test(buff, sizeof buff, ed, sizeof ed); + + for (i = 0; i <= 0xf; ++i) { + uint8_t exxx_1[3] = { 0x0, 0x7f, 0x80 }; + uint8_t exxx_2[3] = { 0x0, 0xc0, 0x80 }; + + if (i == 0x00) continue; // special case e0 + if (i == 0x0d) continue; // special case ed + + exxx_1[0] = 0xe0 | i; + exxx_2[0] = 0xe0 | i; + run_test(buff, sizeof buff, exxx_1, sizeof exxx_1); + run_test(buff, sizeof buff, exxx_2, sizeof exxx_2); + }; + + printf("\n----- Invalid characters (3rd byte is invalid) -----\n"); + // For all 1st bytes 0xe0 .. 0xef the 3rd bytes must be in [0x80 .. 0xbf] + // No need to special case 0xe0 and 0xed + for (i = 0; i <= 0xf; ++i) { + uint8_t exxx_1[3] = { 0x0, 0xab, 0x7f }; + uint8_t exxx_2[3] = { 0x0, 0xab, 0xc0 }; + + exxx_1[0] = 0xe0 | i; + exxx_2[0] = 0xe0 | i; + run_test(buff, sizeof buff, exxx_1, sizeof exxx_1); + run_test(buff, sizeof buff, exxx_2, sizeof exxx_2); + }; + + printf("\n----- Invalid 2nd char AND output exhausted -----\n"); + /* The character is invalid in its 2nd byte AND the output buffer is + exhausted (2 bytes are needed) */ + uint8_t pat1[] = { + 0xe0, 0x00, 0x80 + }; + run_test(buff, 1, pat1, 3); + + printf("\n----- Invalid 3rd char AND output exhausted -----\n"); + /* The character is invalid in its 3rd byte AND the output buffer is + exhausted (2 bytes are needed) */ + uint8_t pat2[] = { + 0xe4, 0x84, 0x00 + }; + run_test(buff, 1, pat2, 3); + + printf("\n----- 1st char valid, 2nd char invalid -----\n"); + uint8_t valid_invalid[] = { + 0xe1, 0x90, 0x90, // valid + 0xe1, 0x00, 0x90 // invalid + }; + run_test(buff, sizeof buff, valid_invalid, sizeof valid_invalid); +} + +// Test conversion of a four-byte character +void +convert_4_bytes(void) +{ + int i, j; + + printf("\n===== Conversion of a four-byte character =====\n"); + + printf("\n----- Valid characters -----\n"); + for (i = 0; i <= 4; ++i) { + uint8_t valid[4]; + + valid[0] = 0xf0 | i; + + for (j = 0; j <= 1; ++j) { + // Byte 2 + if (i == 0) { + valid[1] = j == 0 ? 0x90 : 0xbf; // 0xf0 + } else if (i == 4) { + valid[1] = j == 0 ? 0x80 : 0x8f; // 0xf4 + } else { + valid[1] = j == 0 ? 0x80 : 0xbf; // 0xf1 .. 0xf3 + } + // Byte 3 and byte 4 have same interval 0x80 .. 0xbf + valid[2] = 0x80; + valid[3] = 0x80; + run_test(buff, sizeof buff, valid, sizeof valid); + valid[2] = 0x80; + valid[3] = 0xbf; + run_test(buff, sizeof buff, valid, sizeof valid); + valid[2] = 0xbf; + valid[3] = 0x80; + run_test(buff, sizeof buff, valid, sizeof valid); + valid[2] = 0xbf; + valid[3] = 0xbf; + run_test(buff, sizeof buff, valid, sizeof valid); + } + } + + printf("\n----- Valid characters if m3 == 0 -----\n"); + // First char is 0xf5 .. 0xf7 + uint8_t valid_if_not_m3[] = { + 0xf5, 0x00, 0x00, 0x00, + 0xf6, 0x11, 0x22, 0x33, + 0xf7, 0x44, 0x55, 0x66, + }; + run_test(buff, sizeof buff, valid_if_not_m3, sizeof valid_if_not_m3); + + // As conversion stops upon encountering an invalid character, we + // need to test each invalid character separately, to make sure it + // is recognized as invalid. + + printf("\n----- Invalid characters (2nd byte is invalid) -----\n"); + // Test for invalid four-byte characters where the 2nd byte is invalid. + // All other bytes are valid + uint8_t f0[4], f4[4]; + + f0[0] = 0xf0; // valid + f0[1] = 0x8f; // invalid because outside [0x90 .. 0xbf] + f0[2] = 0x80; // valid + f0[3] = 0x80; // valid + run_test(buff, sizeof buff, f0, sizeof f0); + f0[1] = 0xc0; // invalid because outside [0x90 .. 0xbf] + run_test(buff, sizeof buff, f0, sizeof f0); + + f4[0] = 0xf4; // valid + f4[1] = 0x7f; // invalid because outside [0x80 .. 0x8f] + f4[2] = 0x80; // valid + f4[3] = 0x80; // valid + run_test(buff, sizeof buff, f4, sizeof f4); + f4[1] = 0x90; // invalid because outside [0x80 .. 0x9f] + run_test(buff, sizeof buff, f4, sizeof f4); + + for (i = 0; i <= 0x4; ++i) { + uint8_t fxxx_1[4] = { 0x0, 0x7f, 0x80, 0x80 }; + uint8_t fxxx_2[4] = { 0x0, 0xc0, 0x80, 0x80 }; + + if (i == 0) continue; // special case f0 + if (i == 4) continue; // special case f4 + + fxxx_1[0] = 0xf0 | i; + fxxx_2[0] = 0xf0 | i; + run_test(buff, sizeof buff, fxxx_1, sizeof fxxx_1); + run_test(buff, sizeof buff, fxxx_2, sizeof fxxx_2); + }; + + printf("\n----- Invalid characters (3rd byte is invalid) -----\n"); + // Test for invalid four-byte characters where the 3rd byte is invalid. + // All other bytes are valid + for (i = 0; i <= 0x4; ++i) { + uint8_t fxxx[4] = { 0x0, 0x0, 0x0, 0x80 }; + + fxxx[0] = 0xf0 | i; + fxxx[1] = (i == 0) ? 0x94 : 0x84; + fxxx[2] = 0x7f; + run_test(buff, sizeof buff, fxxx, sizeof fxxx); + fxxx[2] = 0xc0; + run_test(buff, sizeof buff, fxxx, sizeof fxxx); + }; + + printf("\n----- Invalid characters (4th byte is invalid) -----\n"); + // Test for invalid four-byte characters where the 3rd byte is invalid. + // All other bytes are valid + for (i = 0; i <= 0x4; ++i) { + uint8_t fxxx[4] = { 0x0, 0x0, 0x80, 0x0 }; + + fxxx[0] = 0xf0 | i; + fxxx[1] = (i == 0) ? 0x94 : 0x84; + fxxx[3] = 0x7f; + run_test(buff, sizeof buff, fxxx, sizeof fxxx); + fxxx[3] = 0xc0; + run_test(buff, sizeof buff, fxxx, sizeof fxxx); + }; + + printf("\n----- Invalid 2nd char AND output exhausted -----\n"); + /* The character is invalid in its 2nd byte AND the output buffer is + exhausted (4 bytes are needed) */ + uint8_t pat1[] = { + 0xf0, 0x00, 0x80, 0x80 + }; + run_test(buff, 1, pat1, 4); + + printf("\n----- Invalid 3rd char AND output exhausted -----\n"); + /* The character is invalid in its 3rd byte AND the output buffer is + exhausted (4 bytes are needed) */ + uint8_t pat2[] = { + 0xf0, 0xaa, 0x00, 0x80 + }; + run_test(buff, 3, pat2, 4); + + printf("\n----- Invalid 4th char AND output exhausted -----\n"); + /* The character is invalid in its 4th byte AND the output buffer is + exhausted (4 bytes are needed) */ + uint8_t pat3[] = { + 0xf0, 0xaa, 0xaa, 0x00 + }; + run_test(buff, 3, pat3, 4); + + printf("\n----- 1st char valid, 2nd char invalid -----\n"); + uint8_t valid_invalid[] = { + 0xf0, 0xaa, 0xaa, 0xaa, // valid + 0xf0, 0x00, 0x00, 0x00 // invalid + }; + run_test(buff, sizeof buff, valid_invalid, sizeof valid_invalid); +} + + +int main() +{ + convert_1_byte(); + convert_2_bytes(); + convert_3_bytes(); + convert_4_bytes(); + + /* 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, 0); + run_test(buff, sizeof buff, pattern1, 0); + run_test(buff, sizeof buff, pattern2, 0); + run_test(buff, sizeof buff, pattern2, 1); + run_test(buff, sizeof buff, pattern3, 0); + run_test(buff, sizeof buff, pattern3, 1); + run_test(buff, sizeof buff, pattern3, 2); + run_test(buff, sizeof buff, pattern4, 0); + 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, 2); + run_test(buff, sizeof buff, pattern2, 5); + run_test(buff, sizeof buff, pattern3, 6); + run_test(buff, sizeof buff, pattern4, 9); + + /* 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 2 or 4 bytes at a time */ + run_test(NULL, 0, pattern1, sizeof pattern1); // 2-byte result + run_test(NULL, 0, pattern2, sizeof pattern2); // 2-byte result + run_test(NULL, 1, pattern2, sizeof pattern2); // 2-byte result + run_test(NULL, 0, pattern3, sizeof pattern3); // 2-byte result + run_test(NULL, 1, pattern3, sizeof pattern3); // 2-byte result + run_test(NULL, 0, pattern4, sizeof pattern4); // 4-byte result + run_test(NULL, 1, pattern4, sizeof pattern4); // 4-byte result + run_test(NULL, 2, pattern4, sizeof pattern4); // 4-byte result + run_test(NULL, 3, pattern4, sizeof pattern4); // 4-byte result + + 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, 4, pattern1, sizeof pattern1); + run_test(buff, 5, pattern1, sizeof pattern2); + run_test(buff, 6, pattern1, sizeof pattern3); + run_test(buff, 7, pattern1, sizeof pattern4); + + /* Convert buffer with mixed characters */ + printf("\n------------- test4 ----------------\n"); + run_test(buff, sizeof buff, mixed, sizeof mixed); + + return 0; +} diff --git a/none/tests/s390x/cu14.stderr.exp b/none/tests/s390x/cu14.stderr.exp new file mode 100644 index 0000000000..139597f9cb --- /dev/null +++ b/none/tests/s390x/cu14.stderr.exp @@ -0,0 +1,2 @@ + + diff --git a/none/tests/s390x/cu14.stdout.exp b/none/tests/s390x/cu14.stdout.exp new file mode 100644 index 0000000000..9cba92d191 --- /dev/null +++ b/none/tests/s390x/cu14.stdout.exp @@ -0,0 +1,1325 @@ +===== Conversion of a one-byte character ===== + +----- Valid characters ----- +UTF8: 00 7f 01 10 7e 5d +UTF32: 00000000 0000007f 00000001 00000010 0000007e 0000005d + cc = 0 + dst address difference: 24 dst len: 1976 + src address difference: 6 src len: 0 + +----- Invalid characters ----- +UTF8: 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: bf +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: f8 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: ff +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: 81 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: be +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: 95 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: ab +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 + +----- Invalid characters if m3 == 1 ----- +UTF8: c0 +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: c1 +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: f5 +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: f6 +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: f7 +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 + +----- 1st char valid, 2nd char invalid ----- +UTF8: 10 aa +UTF32: 00000010 + cc = 2 + dst address difference: 4 dst len: 1996 + src address difference: 1 src len: 1 + +===== Conversion of a two-byte character ===== + +----- Valid characters ----- +UTF8: c2 80 c2 bf df 80 df bf c3 be da bc +UTF32: 00000080 000000bf 000007c0 000007ff 000000fe 000006bc + cc = 0 + dst address difference: 24 dst len: 1976 + src address difference: 12 src len: 0 + +----- Valid characters if m3 == 0 ----- +UTF8: c0 80 c0 bf c1 80 c0 bf +UTF32: 00000000 0000003f 00000040 0000003f + cc = 0 + dst address difference: 16 dst len: 1984 + src address difference: 8 src len: 0 + +----- Invalid characters if m3 == 1 ----- +UTF8: c2 00 +UTF32: 00000080 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 2 src len: 0 +UTF8: c2 7f +UTF32: 000000bf + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 2 src len: 0 +UTF8: c2 c0 +UTF32: 00000080 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 2 src len: 0 +UTF8: c2 ff +UTF32: 000000bf + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 2 src len: 0 + +----- 1st char valid, 2nd char invalid ----- +UTF8: c3 81 c4 00 +UTF32: 000000c1 00000100 + cc = 0 + dst address difference: 8 dst len: 1992 + src address difference: 4 src len: 0 + +===== Conversion of a three-byte character ===== + +----- Valid characters ----- +UTF8: e0 a0 80 e0 bf 80 e0 a0 bf e0 bf bf e0 aa bb +UTF32: 00000800 00000fc0 0000083f 00000fff 00000abb + cc = 0 + dst address difference: 20 dst len: 1980 + src address difference: 15 src len: 0 +UTF8: ed 80 80 ed 9f 80 ed 80 bf ed 9f bf ed 8a bb +UTF32: 0000d000 0000d7c0 0000d03f 0000d7ff 0000d2bb + cc = 0 + dst address difference: 20 dst len: 1980 + src address difference: 15 src len: 0 +UTF8: e1 80 80 +UTF32: 00001000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e1 bf 80 +UTF32: 00001fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e1 80 bf +UTF32: 0000103f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e1 bf bf +UTF32: 00001fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e2 80 80 +UTF32: 00002000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e2 bf 80 +UTF32: 00002fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e2 80 bf +UTF32: 0000203f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e2 bf bf +UTF32: 00002fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e3 80 80 +UTF32: 00003000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e3 bf 80 +UTF32: 00003fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e3 80 bf +UTF32: 0000303f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e3 bf bf +UTF32: 00003fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e4 80 80 +UTF32: 00004000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e4 bf 80 +UTF32: 00004fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e4 80 bf +UTF32: 0000403f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e4 bf bf +UTF32: 00004fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e5 80 80 +UTF32: 00005000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e5 bf 80 +UTF32: 00005fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e5 80 bf +UTF32: 0000503f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e5 bf bf +UTF32: 00005fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e6 80 80 +UTF32: 00006000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e6 bf 80 +UTF32: 00006fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e6 80 bf +UTF32: 0000603f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e6 bf bf +UTF32: 00006fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e7 80 80 +UTF32: 00007000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e7 bf 80 +UTF32: 00007fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e7 80 bf +UTF32: 0000703f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e7 bf bf +UTF32: 00007fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e8 80 80 +UTF32: 00008000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e8 bf 80 +UTF32: 00008fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e8 80 bf +UTF32: 0000803f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e8 bf bf +UTF32: 00008fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e9 80 80 +UTF32: 00009000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e9 bf 80 +UTF32: 00009fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e9 80 bf +UTF32: 0000903f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e9 bf bf +UTF32: 00009fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ea 80 80 +UTF32: 0000a000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ea bf 80 +UTF32: 0000afc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ea 80 bf +UTF32: 0000a03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ea bf bf +UTF32: 0000afff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: eb 80 80 +UTF32: 0000b000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: eb bf 80 +UTF32: 0000bfc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: eb 80 bf +UTF32: 0000b03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: eb bf bf +UTF32: 0000bfff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ec 80 80 +UTF32: 0000c000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ec bf 80 +UTF32: 0000cfc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ec 80 bf +UTF32: 0000c03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ec bf bf +UTF32: 0000cfff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ee 80 80 +UTF32: 0000e000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ee bf 80 +UTF32: 0000efc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ee 80 bf +UTF32: 0000e03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ee bf bf +UTF32: 0000efff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ef 80 80 +UTF32: 0000f000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ef bf 80 +UTF32: 0000ffc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ef 80 bf +UTF32: 0000f03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ef bf bf +UTF32: 0000ffff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 + +----- Invalid characters (2nd byte is invalid) ----- +UTF8: e0 9f 80 e0 bf 80 e0 a0 bf e0 bf bf e0 aa bb +UTF32: 000007c0 00000fc0 0000083f 00000fff 00000abb + cc = 0 + dst address difference: 20 dst len: 1980 + src address difference: 15 src len: 0 +UTF8: e0 c0 80 e0 bf 80 e0 a0 bf e0 bf bf e0 aa bb +UTF32: 00000000 00000fc0 0000083f 00000fff 00000abb + cc = 0 + dst address difference: 20 dst len: 1980 + src address difference: 15 src len: 0 +UTF8: ed 7f 80 ed 9f 80 ed 80 bf ed 9f bf ed 8a bb +UTF32: 0000dfc0 0000d7c0 0000d03f 0000d7ff 0000d2bb + cc = 0 + dst address difference: 20 dst len: 1980 + src address difference: 15 src len: 0 +UTF8: ed a0 80 ed 9f 80 ed 80 bf ed 9f bf ed 8a bb +UTF32: 0000d800 0000d7c0 0000d03f 0000d7ff 0000d2bb + cc = 0 + dst address difference: 20 dst len: 1980 + src address difference: 15 src len: 0 +UTF8: e1 7f 80 +UTF32: 00001fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e1 c0 80 +UTF32: 00001000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e2 7f 80 +UTF32: 00002fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e2 c0 80 +UTF32: 00002000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e3 7f 80 +UTF32: 00003fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e3 c0 80 +UTF32: 00003000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e4 7f 80 +UTF32: 00004fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e4 c0 80 +UTF32: 00004000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e5 7f 80 +UTF32: 00005fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e5 c0 80 +UTF32: 00005000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e6 7f 80 +UTF32: 00006fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e6 c0 80 +UTF32: 00006000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e7 7f 80 +UTF32: 00007fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e7 c0 80 +UTF32: 00007000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e8 7f 80 +UTF32: 00008fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e8 c0 80 +UTF32: 00008000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e9 7f 80 +UTF32: 00009fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e9 c0 80 +UTF32: 00009000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ea 7f 80 +UTF32: 0000afc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ea c0 80 +UTF32: 0000a000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: eb 7f 80 +UTF32: 0000bfc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: eb c0 80 +UTF32: 0000b000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ec 7f 80 +UTF32: 0000cfc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ec c0 80 +UTF32: 0000c000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ee 7f 80 +UTF32: 0000efc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ee c0 80 +UTF32: 0000e000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ef 7f 80 +UTF32: 0000ffc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ef c0 80 +UTF32: 0000f000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 + +----- Invalid characters (3rd byte is invalid) ----- +UTF8: e0 ab 7f +UTF32: 00000aff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e0 ab c0 +UTF32: 00000ac0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e1 ab 7f +UTF32: 00001aff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e1 ab c0 +UTF32: 00001ac0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e2 ab 7f +UTF32: 00002aff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e2 ab c0 +UTF32: 00002ac0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e3 ab 7f +UTF32: 00003aff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e3 ab c0 +UTF32: 00003ac0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e4 ab 7f +UTF32: 00004aff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e4 ab c0 +UTF32: 00004ac0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e5 ab 7f +UTF32: 00005aff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e5 ab c0 +UTF32: 00005ac0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e6 ab 7f +UTF32: 00006aff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e6 ab c0 +UTF32: 00006ac0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e7 ab 7f +UTF32: 00007aff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e7 ab c0 +UTF32: 00007ac0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e8 ab 7f +UTF32: 00008aff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e8 ab c0 +UTF32: 00008ac0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e9 ab 7f +UTF32: 00009aff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e9 ab c0 +UTF32: 00009ac0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ea ab 7f +UTF32: 0000aaff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ea ab c0 +UTF32: 0000aac0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: eb ab 7f +UTF32: 0000baff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: eb ab c0 +UTF32: 0000bac0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ec ab 7f +UTF32: 0000caff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ec ab c0 +UTF32: 0000cac0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ed ab 7f +UTF32: 0000daff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ed ab c0 +UTF32: 0000dac0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ee ab 7f +UTF32: 0000eaff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ee ab c0 +UTF32: 0000eac0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ef ab 7f +UTF32: 0000faff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ef ab c0 +UTF32: 0000fac0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 + +----- Invalid 2nd char AND output exhausted ----- +UTF8: e0 00 80 +UTF32: + cc = 1 + dst address difference: 0 dst len: 1 + src address difference: 0 src len: 3 + +----- Invalid 3rd char AND output exhausted ----- +UTF8: e4 84 00 +UTF32: + cc = 1 + dst address difference: 0 dst len: 1 + src address difference: 0 src len: 3 + +----- 1st char valid, 2nd char invalid ----- +UTF8: e1 90 90 e1 00 90 +UTF32: 00001410 00001010 + cc = 0 + dst address difference: 8 dst len: 1992 + src address difference: 6 src len: 0 + +===== Conversion of a four-byte character ===== + +----- Valid characters ----- +UTF8: f0 90 80 80 +UTF32: 00010000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f0 90 80 bf +UTF32: 0001003f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f0 90 bf 80 +UTF32: 00010fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f0 90 bf bf +UTF32: 00010fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f0 bf 80 80 +UTF32: 0003f000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f0 bf 80 bf +UTF32: 0003f03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f0 bf bf 80 +UTF32: 0003ffc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f0 bf bf bf +UTF32: 0003ffff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 80 80 80 +UTF32: 00040000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 80 80 bf +UTF32: 0004003f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 80 bf 80 +UTF32: 00040fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 80 bf bf +UTF32: 00040fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 bf 80 80 +UTF32: 0007f000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 bf 80 bf +UTF32: 0007f03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 bf bf 80 +UTF32: 0007ffc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 bf bf bf +UTF32: 0007ffff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 80 80 80 +UTF32: 00080000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 80 80 bf +UTF32: 0008003f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 80 bf 80 +UTF32: 00080fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 80 bf bf +UTF32: 00080fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 bf 80 80 +UTF32: 000bf000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 bf 80 bf +UTF32: 000bf03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 bf bf 80 +UTF32: 000bffc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 bf bf bf +UTF32: 000bffff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 80 80 80 +UTF32: 000c0000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 80 80 bf +UTF32: 000c003f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 80 bf 80 +UTF32: 000c0fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 80 bf bf +UTF32: 000c0fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 bf 80 80 +UTF32: 000ff000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 bf 80 bf +UTF32: 000ff03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 bf bf 80 +UTF32: 000fffc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 bf bf bf +UTF32: 000fffff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 80 80 80 +UTF32: 00100000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 80 80 bf +UTF32: 0010003f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 80 bf 80 +UTF32: 00100fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 80 bf bf +UTF32: 00100fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 8f 80 80 +UTF32: 0010f000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 8f 80 bf +UTF32: 0010f03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 8f bf 80 +UTF32: 0010ffc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 8f bf bf +UTF32: 0010ffff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 + +----- Valid characters if m3 == 0 ----- +UTF8: f5 00 00 00 f6 11 22 33 f7 44 55 66 +UTF32: 00140000 001918b3 001c4566 + cc = 0 + dst address difference: 12 dst len: 1988 + src address difference: 12 src len: 0 + +----- Invalid characters (2nd byte is invalid) ----- +UTF8: f0 8f 80 80 +UTF32: 0000f000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f0 c0 80 80 +UTF32: 00000000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 7f 80 80 +UTF32: 0013f000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 90 80 80 +UTF32: 00110000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 7f 80 80 +UTF32: 0007f000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 c0 80 80 +UTF32: 00040000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 7f 80 80 +UTF32: 000bf000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 c0 80 80 +UTF32: 00080000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 7f 80 80 +UTF32: 000ff000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 c0 80 80 +UTF32: 000c0000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 + +----- Invalid characters (3rd byte is invalid) ----- +UTF8: f0 94 7f 80 +UTF32: 00014fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f0 94 c0 80 +UTF32: 00014000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 84 7f 80 +UTF32: 00044fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 84 c0 80 +UTF32: 00044000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 84 7f 80 +UTF32: 00084fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 84 c0 80 +UTF32: 00084000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 84 7f 80 +UTF32: 000c4fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 84 c0 80 +UTF32: 000c4000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 84 7f 80 +UTF32: 00104fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 84 c0 80 +UTF32: 00104000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 + +----- Invalid characters (4th byte is invalid) ----- +UTF8: f0 94 80 7f +UTF32: 0001403f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f0 94 80 c0 +UTF32: 00014000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 84 80 7f +UTF32: 0004403f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 84 80 c0 +UTF32: 00044000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 84 80 7f +UTF32: 0008403f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 84 80 c0 +UTF32: 00084000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 84 80 7f +UTF32: 000c403f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 84 80 c0 +UTF32: 000c4000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 84 80 7f +UTF32: 0010403f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 84 80 c0 +UTF32: 00104000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 + +----- Invalid 2nd char AND output exhausted ----- +UTF8: f0 00 80 80 +UTF32: + cc = 1 + dst address difference: 0 dst len: 1 + src address difference: 0 src len: 4 + +----- Invalid 3rd char AND output exhausted ----- +UTF8: f0 aa 00 80 +UTF32: + cc = 1 + dst address difference: 0 dst len: 3 + src address difference: 0 src len: 4 + +----- Invalid 4th char AND output exhausted ----- +UTF8: f0 aa aa 00 +UTF32: + cc = 1 + dst address difference: 0 dst len: 3 + src address difference: 0 src len: 4 + +----- 1st char valid, 2nd char invalid ----- +UTF8: f0 aa aa aa f0 00 00 00 +UTF32: 0002aaaa 00000000 + cc = 0 + dst address difference: 8 dst len: 1992 + src address difference: 8 src len: 0 + +------------- test1 ---------------- +UTF8: +UTF32: + cc = 0 + dst len: 0 + src len: 0 + +------------- test2.1 ---------------- +UTF8: +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src len: 0 +UTF8: +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 0 +UTF8: +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 0 +UTF8: c2 +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 0 +UTF8: e1 +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: e1 80 +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 2 +UTF8: +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 0 +UTF8: f4 +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: f4 80 +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 2 +UTF8: f4 80 80 +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 + +------------- test2.2 ---------------- +UTF8: 00 01 +UTF32: 00000000 00000001 + cc = 0 + dst address difference: 8 dst len: 1992 + src address difference: 2 src len: 0 +UTF8: c2 80 c2 81 c2 +UTF32: 00000080 00000081 + cc = 0 + dst address difference: 8 dst len: 1992 + src address difference: 4 src len: 1 +UTF8: e1 80 80 e1 80 81 +UTF32: 00001000 00001001 + cc = 0 + dst address difference: 8 dst len: 1992 + src address difference: 6 src len: 0 +UTF8: f4 80 80 80 f4 80 80 81 f4 +UTF32: 00100000 00100001 + cc = 0 + dst address difference: 8 dst len: 1992 + src address difference: 8 src len: 1 + +------------- test3.1 ---------------- +UTF8: 00 01 02 03 +UTF32: + cc = 1 + dst len: 0 + src address difference: 0 src len: 4 +UTF8: c2 80 c2 81 c2 82 c2 83 +UTF32: + cc = 1 + dst len: 0 + src address difference: 0 src len: 8 +UTF8: c2 80 c2 81 c2 82 c2 83 +UTF32: + cc = 1 + dst len: 1 + src address difference: 0 src len: 8 +UTF8: e1 80 80 e1 80 81 e1 80 82 e1 80 83 +UTF32: + cc = 1 + dst len: 0 + src address difference: 0 src len: 12 +UTF8: e1 80 80 e1 80 81 e1 80 82 e1 80 83 +UTF32: + cc = 1 + dst len: 1 + src address difference: 0 src len: 12 +UTF8: f4 80 80 80 f4 80 80 81 f4 80 80 82 f4 80 80 83 +UTF32: + cc = 1 + dst len: 0 + src address difference: 0 src len: 16 +UTF8: f4 80 80 80 f4 80 80 81 f4 80 80 82 f4 80 80 83 +UTF32: + cc = 1 + dst len: 1 + src address difference: 0 src len: 16 +UTF8: f4 80 80 80 f4 80 80 81 f4 80 80 82 f4 80 80 83 +UTF32: + cc = 1 + dst len: 2 + src address difference: 0 src len: 16 +UTF8: f4 80 80 80 f4 80 80 81 f4 80 80 82 f4 80 80 83 +UTF32: + cc = 1 + dst len: 3 + src address difference: 0 src len: 16 + +------------- test3.2 ---------------- +UTF8: 00 01 02 03 +UTF32: 00000000 + cc = 1 + dst address difference: 4 dst len: 0 + src address difference: 1 src len: 3 +UTF8: 00 01 02 03 c2 80 c2 81 +UTF32: 00000000 + cc = 1 + dst address difference: 4 dst len: 1 + src address difference: 1 src len: 7 +UTF8: 00 01 02 03 c2 80 c2 81 c2 82 c2 83 +UTF32: 00000000 + cc = 1 + dst address difference: 4 dst len: 2 + src address difference: 1 src len: 11 +UTF8: 00 01 02 03 c2 80 c2 81 c2 82 c2 83 e1 80 80 e1 +UTF32: 00000000 + cc = 1 + dst address difference: 4 dst len: 3 + src address difference: 1 src len: 15 + +------------- test4 ---------------- +UTF8: 01 c3 80 12 e1 90 93 23 f4 80 90 8a 34 c4 8c e1 91 94 c5 8a f4 80 90 8a c5 8a e1 91 94 f4 80 90 8a e1 91 94 +UTF32: 00000001 000000c0 00000012 00001413 00000023 0010040a 00000034 0000010c 00001454 0000014a 0010040a 0000014a 00001454 0010040a 00001454 + cc = 0 + dst address difference: 60 dst len: 1940 + src address difference: 36 src len: 0 diff --git a/none/tests/s390x/cu14.vgtest b/none/tests/s390x/cu14.vgtest new file mode 100644 index 0000000000..5c71bcb18d --- /dev/null +++ b/none/tests/s390x/cu14.vgtest @@ -0,0 +1 @@ +prog: cu14 diff --git a/none/tests/s390x/cu14_1.c b/none/tests/s390x/cu14_1.c new file mode 120000 index 0000000000..d0d84e8cea --- /dev/null +++ b/none/tests/s390x/cu14_1.c @@ -0,0 +1 @@ +cu14.c \ No newline at end of file diff --git a/none/tests/s390x/cu14_1.stderr.exp b/none/tests/s390x/cu14_1.stderr.exp new file mode 100644 index 0000000000..139597f9cb --- /dev/null +++ b/none/tests/s390x/cu14_1.stderr.exp @@ -0,0 +1,2 @@ + + diff --git a/none/tests/s390x/cu14_1.stdout.exp b/none/tests/s390x/cu14_1.stdout.exp new file mode 100644 index 0000000000..a685c0eb58 --- /dev/null +++ b/none/tests/s390x/cu14_1.stdout.exp @@ -0,0 +1,1325 @@ +===== Conversion of a one-byte character ===== + +----- Valid characters ----- +UTF8: 00 7f 01 10 7e 5d +UTF32: 00000000 0000007f 00000001 00000010 0000007e 0000005d + cc = 0 + dst address difference: 24 dst len: 1976 + src address difference: 6 src len: 0 + +----- Invalid characters ----- +UTF8: 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: bf +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: f8 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: ff +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: 81 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: be +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: 95 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: ab +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 + +----- Invalid characters if m3 == 1 ----- +UTF8: c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: c1 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: f5 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: f6 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: f7 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 + +----- 1st char valid, 2nd char invalid ----- +UTF8: 10 aa +UTF32: 00000010 + cc = 2 + dst address difference: 4 dst len: 1996 + src address difference: 1 src len: 1 + +===== Conversion of a two-byte character ===== + +----- Valid characters ----- +UTF8: c2 80 c2 bf df 80 df bf c3 be da bc +UTF32: 00000080 000000bf 000007c0 000007ff 000000fe 000006bc + cc = 0 + dst address difference: 24 dst len: 1976 + src address difference: 12 src len: 0 + +----- Valid characters if m3 == 0 ----- +UTF8: c0 80 c0 bf c1 80 c0 bf +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 8 + +----- Invalid characters if m3 == 1 ----- +UTF8: c2 00 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 2 +UTF8: c2 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 2 +UTF8: c2 c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 2 +UTF8: c2 ff +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 2 + +----- 1st char valid, 2nd char invalid ----- +UTF8: c3 81 c4 00 +UTF32: 000000c1 + cc = 2 + dst address difference: 4 dst len: 1996 + src address difference: 2 src len: 2 + +===== Conversion of a three-byte character ===== + +----- Valid characters ----- +UTF8: e0 a0 80 e0 bf 80 e0 a0 bf e0 bf bf e0 aa bb +UTF32: 00000800 00000fc0 0000083f 00000fff 00000abb + cc = 0 + dst address difference: 20 dst len: 1980 + src address difference: 15 src len: 0 +UTF8: ed 80 80 ed 9f 80 ed 80 bf ed 9f bf ed 8a bb +UTF32: 0000d000 0000d7c0 0000d03f 0000d7ff 0000d2bb + cc = 0 + dst address difference: 20 dst len: 1980 + src address difference: 15 src len: 0 +UTF8: e1 80 80 +UTF32: 00001000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e1 bf 80 +UTF32: 00001fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e1 80 bf +UTF32: 0000103f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e1 bf bf +UTF32: 00001fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e2 80 80 +UTF32: 00002000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e2 bf 80 +UTF32: 00002fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e2 80 bf +UTF32: 0000203f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e2 bf bf +UTF32: 00002fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e3 80 80 +UTF32: 00003000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e3 bf 80 +UTF32: 00003fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e3 80 bf +UTF32: 0000303f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e3 bf bf +UTF32: 00003fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e4 80 80 +UTF32: 00004000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e4 bf 80 +UTF32: 00004fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e4 80 bf +UTF32: 0000403f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e4 bf bf +UTF32: 00004fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e5 80 80 +UTF32: 00005000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e5 bf 80 +UTF32: 00005fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e5 80 bf +UTF32: 0000503f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e5 bf bf +UTF32: 00005fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e6 80 80 +UTF32: 00006000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e6 bf 80 +UTF32: 00006fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e6 80 bf +UTF32: 0000603f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e6 bf bf +UTF32: 00006fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e7 80 80 +UTF32: 00007000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e7 bf 80 +UTF32: 00007fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e7 80 bf +UTF32: 0000703f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e7 bf bf +UTF32: 00007fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e8 80 80 +UTF32: 00008000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e8 bf 80 +UTF32: 00008fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e8 80 bf +UTF32: 0000803f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e8 bf bf +UTF32: 00008fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e9 80 80 +UTF32: 00009000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e9 bf 80 +UTF32: 00009fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e9 80 bf +UTF32: 0000903f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: e9 bf bf +UTF32: 00009fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ea 80 80 +UTF32: 0000a000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ea bf 80 +UTF32: 0000afc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ea 80 bf +UTF32: 0000a03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ea bf bf +UTF32: 0000afff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: eb 80 80 +UTF32: 0000b000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: eb bf 80 +UTF32: 0000bfc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: eb 80 bf +UTF32: 0000b03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: eb bf bf +UTF32: 0000bfff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ec 80 80 +UTF32: 0000c000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ec bf 80 +UTF32: 0000cfc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ec 80 bf +UTF32: 0000c03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ec bf bf +UTF32: 0000cfff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ee 80 80 +UTF32: 0000e000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ee bf 80 +UTF32: 0000efc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ee 80 bf +UTF32: 0000e03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ee bf bf +UTF32: 0000efff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ef 80 80 +UTF32: 0000f000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ef bf 80 +UTF32: 0000ffc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ef 80 bf +UTF32: 0000f03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 +UTF8: ef bf bf +UTF32: 0000ffff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 0 + +----- Invalid characters (2nd byte is invalid) ----- +UTF8: e0 9f 80 e0 bf 80 e0 a0 bf e0 bf bf e0 aa bb +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 15 +UTF8: e0 c0 80 e0 bf 80 e0 a0 bf e0 bf bf e0 aa bb +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 15 +UTF8: ed 7f 80 ed 9f 80 ed 80 bf ed 9f bf ed 8a bb +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 15 +UTF8: ed a0 80 ed 9f 80 ed 80 bf ed 9f bf ed 8a bb +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 15 +UTF8: e1 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e1 c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e2 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e2 c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e3 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e3 c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e4 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e4 c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e5 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e5 c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e6 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e6 c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e7 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e7 c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e8 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e8 c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e9 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e9 c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ea 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ea c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: eb 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: eb c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ec 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ec c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ee 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ee c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ef 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ef c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 + +----- Invalid characters (3rd byte is invalid) ----- +UTF8: e0 ab 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e0 ab c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e1 ab 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e1 ab c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e2 ab 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e2 ab c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e3 ab 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e3 ab c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e4 ab 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e4 ab c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e5 ab 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e5 ab c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e6 ab 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e6 ab c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e7 ab 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e7 ab c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e8 ab 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e8 ab c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e9 ab 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: e9 ab c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ea ab 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ea ab c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: eb ab 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: eb ab c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ec ab 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ec ab c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ed ab 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ed ab c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ee ab 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ee ab c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ef ab 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 +UTF8: ef ab c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 + +----- Invalid 2nd char AND output exhausted ----- +UTF8: e0 00 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 1 + src address difference: 0 src len: 3 + +----- Invalid 3rd char AND output exhausted ----- +UTF8: e4 84 00 +UTF32: + cc = 2 + dst address difference: 0 dst len: 1 + src address difference: 0 src len: 3 + +----- 1st char valid, 2nd char invalid ----- +UTF8: e1 90 90 e1 00 90 +UTF32: 00001410 + cc = 2 + dst address difference: 4 dst len: 1996 + src address difference: 3 src len: 3 + +===== Conversion of a four-byte character ===== + +----- Valid characters ----- +UTF8: f0 90 80 80 +UTF32: 00010000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f0 90 80 bf +UTF32: 0001003f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f0 90 bf 80 +UTF32: 00010fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f0 90 bf bf +UTF32: 00010fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f0 bf 80 80 +UTF32: 0003f000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f0 bf 80 bf +UTF32: 0003f03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f0 bf bf 80 +UTF32: 0003ffc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f0 bf bf bf +UTF32: 0003ffff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 80 80 80 +UTF32: 00040000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 80 80 bf +UTF32: 0004003f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 80 bf 80 +UTF32: 00040fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 80 bf bf +UTF32: 00040fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 bf 80 80 +UTF32: 0007f000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 bf 80 bf +UTF32: 0007f03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 bf bf 80 +UTF32: 0007ffc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f1 bf bf bf +UTF32: 0007ffff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 80 80 80 +UTF32: 00080000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 80 80 bf +UTF32: 0008003f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 80 bf 80 +UTF32: 00080fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 80 bf bf +UTF32: 00080fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 bf 80 80 +UTF32: 000bf000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 bf 80 bf +UTF32: 000bf03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 bf bf 80 +UTF32: 000bffc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f2 bf bf bf +UTF32: 000bffff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 80 80 80 +UTF32: 000c0000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 80 80 bf +UTF32: 000c003f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 80 bf 80 +UTF32: 000c0fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 80 bf bf +UTF32: 000c0fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 bf 80 80 +UTF32: 000ff000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 bf 80 bf +UTF32: 000ff03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 bf bf 80 +UTF32: 000fffc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f3 bf bf bf +UTF32: 000fffff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 80 80 80 +UTF32: 00100000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 80 80 bf +UTF32: 0010003f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 80 bf 80 +UTF32: 00100fc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 80 bf bf +UTF32: 00100fff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 8f 80 80 +UTF32: 0010f000 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 8f 80 bf +UTF32: 0010f03f + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 8f bf 80 +UTF32: 0010ffc0 + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 +UTF8: f4 8f bf bf +UTF32: 0010ffff + cc = 0 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 0 + +----- Valid characters if m3 == 0 ----- +UTF8: f5 00 00 00 f6 11 22 33 f7 44 55 66 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 12 + +----- Invalid characters (2nd byte is invalid) ----- +UTF8: f0 8f 80 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f0 c0 80 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f4 7f 80 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f4 90 80 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f1 7f 80 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f1 c0 80 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f2 7f 80 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f2 c0 80 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f3 7f 80 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f3 c0 80 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 + +----- Invalid characters (3rd byte is invalid) ----- +UTF8: f0 94 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f0 94 c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f1 84 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f1 84 c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f2 84 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f2 84 c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f3 84 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f3 84 c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f4 84 7f 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f4 84 c0 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 + +----- Invalid characters (4th byte is invalid) ----- +UTF8: f0 94 80 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f0 94 80 c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f1 84 80 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f1 84 80 c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f2 84 80 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f2 84 80 c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f3 84 80 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f3 84 80 c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f4 84 80 7f +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 +UTF8: f4 84 80 c0 +UTF32: + cc = 2 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 4 + +----- Invalid 2nd char AND output exhausted ----- +UTF8: f0 00 80 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 1 + src address difference: 0 src len: 4 + +----- Invalid 3rd char AND output exhausted ----- +UTF8: f0 aa 00 80 +UTF32: + cc = 2 + dst address difference: 0 dst len: 3 + src address difference: 0 src len: 4 + +----- Invalid 4th char AND output exhausted ----- +UTF8: f0 aa aa 00 +UTF32: + cc = 2 + dst address difference: 0 dst len: 3 + src address difference: 0 src len: 4 + +----- 1st char valid, 2nd char invalid ----- +UTF8: f0 aa aa aa f0 00 00 00 +UTF32: 0002aaaa + cc = 2 + dst address difference: 4 dst len: 1996 + src address difference: 4 src len: 4 + +------------- test1 ---------------- +UTF8: +UTF32: + cc = 0 + dst len: 0 + src len: 0 + +------------- test2.1 ---------------- +UTF8: +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src len: 0 +UTF8: +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 0 +UTF8: +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 0 +UTF8: c2 +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 0 +UTF8: e1 +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: e1 80 +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 2 +UTF8: +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 0 +UTF8: f4 +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 1 +UTF8: f4 80 +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 2 +UTF8: f4 80 80 +UTF32: + cc = 0 + dst address difference: 0 dst len: 2000 + src address difference: 0 src len: 3 + +------------- test2.2 ---------------- +UTF8: 00 01 +UTF32: 00000000 00000001 + cc = 0 + dst address difference: 8 dst len: 1992 + src address difference: 2 src len: 0 +UTF8: c2 80 c2 81 c2 +UTF32: 00000080 00000081 + cc = 0 + dst address difference: 8 dst len: 1992 + src address difference: 4 src len: 1 +UTF8: e1 80 80 e1 80 81 +UTF32: 00001000 00001001 + cc = 0 + dst address difference: 8 dst len: 1992 + src address difference: 6 src len: 0 +UTF8: f4 80 80 80 f4 80 80 81 f4 +UTF32: 00100000 00100001 + cc = 0 + dst address difference: 8 dst len: 1992 + src address difference: 8 src len: 1 + +------------- test3.1 ---------------- +UTF8: 00 01 02 03 +UTF32: + cc = 1 + dst len: 0 + src address difference: 0 src len: 4 +UTF8: c2 80 c2 81 c2 82 c2 83 +UTF32: + cc = 1 + dst len: 0 + src address difference: 0 src len: 8 +UTF8: c2 80 c2 81 c2 82 c2 83 +UTF32: + cc = 1 + dst len: 1 + src address difference: 0 src len: 8 +UTF8: e1 80 80 e1 80 81 e1 80 82 e1 80 83 +UTF32: + cc = 1 + dst len: 0 + src address difference: 0 src len: 12 +UTF8: e1 80 80 e1 80 81 e1 80 82 e1 80 83 +UTF32: + cc = 1 + dst len: 1 + src address difference: 0 src len: 12 +UTF8: f4 80 80 80 f4 80 80 81 f4 80 80 82 f4 80 80 83 +UTF32: + cc = 1 + dst len: 0 + src address difference: 0 src len: 16 +UTF8: f4 80 80 80 f4 80 80 81 f4 80 80 82 f4 80 80 83 +UTF32: + cc = 1 + dst len: 1 + src address difference: 0 src len: 16 +UTF8: f4 80 80 80 f4 80 80 81 f4 80 80 82 f4 80 80 83 +UTF32: + cc = 1 + dst len: 2 + src address difference: 0 src len: 16 +UTF8: f4 80 80 80 f4 80 80 81 f4 80 80 82 f4 80 80 83 +UTF32: + cc = 1 + dst len: 3 + src address difference: 0 src len: 16 + +------------- test3.2 ---------------- +UTF8: 00 01 02 03 +UTF32: 00000000 + cc = 1 + dst address difference: 4 dst len: 0 + src address difference: 1 src len: 3 +UTF8: 00 01 02 03 c2 80 c2 81 +UTF32: 00000000 + cc = 1 + dst address difference: 4 dst len: 1 + src address difference: 1 src len: 7 +UTF8: 00 01 02 03 c2 80 c2 81 c2 82 c2 83 +UTF32: 00000000 + cc = 1 + dst address difference: 4 dst len: 2 + src address difference: 1 src len: 11 +UTF8: 00 01 02 03 c2 80 c2 81 c2 82 c2 83 e1 80 80 e1 +UTF32: 00000000 + cc = 1 + dst address difference: 4 dst len: 3 + src address difference: 1 src len: 15 + +------------- test4 ---------------- +UTF8: 01 c3 80 12 e1 90 93 23 f4 80 90 8a 34 c4 8c e1 91 94 c5 8a f4 80 90 8a c5 8a e1 91 94 f4 80 90 8a e1 91 94 +UTF32: 00000001 000000c0 00000012 00001413 00000023 0010040a 00000034 0000010c 00001454 0000014a 0010040a 0000014a 00001454 0010040a 00001454 + cc = 0 + dst address difference: 60 dst len: 1940 + src address difference: 36 src len: 0 diff --git a/none/tests/s390x/cu14_1.vgtest b/none/tests/s390x/cu14_1.vgtest new file mode 100644 index 0000000000..b722c3ab9a --- /dev/null +++ b/none/tests/s390x/cu14_1.vgtest @@ -0,0 +1 @@ +prog: cu14_1