11f5207b7SJohn Levon typedef unsigned int uint; 21f5207b7SJohn Levon typedef unsigned long ulong; 31f5207b7SJohn Levon uint_2_int(uint a)41f5207b7SJohn Levonstatic int uint_2_int(uint a) { return (int)a; } long_2_int(long a)51f5207b7SJohn Levonstatic int long_2_int(long a) { return (int)a; } ulong_2_int(ulong a)61f5207b7SJohn Levonstatic int ulong_2_int(ulong a) { return (int)a; } vptr_2_int(void * a)71f5207b7SJohn Levonstatic int vptr_2_int(void *a) { return (int)a; } iptr_2_int(int * a)81f5207b7SJohn Levonstatic int iptr_2_int(int *a) { return (int)a; } float_2_int(float a)91f5207b7SJohn Levonstatic int float_2_int(float a) { return (int)a; } double_2_int(double a)101f5207b7SJohn Levonstatic int double_2_int(double a) { return (int)a; } int_2_uint(int a)111f5207b7SJohn Levonstatic uint int_2_uint(int a) { return (uint)a; } long_2_uint(long a)121f5207b7SJohn Levonstatic uint long_2_uint(long a) { return (uint)a; } ulong_2_uint(ulong a)131f5207b7SJohn Levonstatic uint ulong_2_uint(ulong a) { return (uint)a; } vptr_2_uint(void * a)141f5207b7SJohn Levonstatic uint vptr_2_uint(void *a) { return (uint)a; } iptr_2_uint(int * a)151f5207b7SJohn Levonstatic uint iptr_2_uint(int *a) { return (uint)a; } float_2_uint(float a)161f5207b7SJohn Levonstatic uint float_2_uint(float a) { return (uint)a; } double_2_uint(double a)171f5207b7SJohn Levonstatic uint double_2_uint(double a) { return (uint)a; } int_2_long(int a)181f5207b7SJohn Levonstatic long int_2_long(int a) { return (long)a; } uint_2_long(uint a)191f5207b7SJohn Levonstatic long uint_2_long(uint a) { return (long)a; } ulong_2_long(ulong a)201f5207b7SJohn Levonstatic long ulong_2_long(ulong a) { return (long)a; } vptr_2_long(void * a)211f5207b7SJohn Levonstatic long vptr_2_long(void *a) { return (long)a; } iptr_2_long(int * a)221f5207b7SJohn Levonstatic long iptr_2_long(int *a) { return (long)a; } float_2_long(float a)231f5207b7SJohn Levonstatic long float_2_long(float a) { return (long)a; } double_2_long(double a)241f5207b7SJohn Levonstatic long double_2_long(double a) { return (long)a; } int_2_ulong(int a)251f5207b7SJohn Levonstatic ulong int_2_ulong(int a) { return (ulong)a; } uint_2_ulong(uint a)261f5207b7SJohn Levonstatic ulong uint_2_ulong(uint a) { return (ulong)a; } long_2_ulong(long a)271f5207b7SJohn Levonstatic ulong long_2_ulong(long a) { return (ulong)a; } vptr_2_ulong(void * a)281f5207b7SJohn Levonstatic ulong vptr_2_ulong(void *a) { return (ulong)a; } iptr_2_ulong(int * a)291f5207b7SJohn Levonstatic ulong iptr_2_ulong(int *a) { return (ulong)a; } float_2_ulong(float a)301f5207b7SJohn Levonstatic ulong float_2_ulong(float a) { return (ulong)a; } double_2_ulong(double a)311f5207b7SJohn Levonstatic ulong double_2_ulong(double a) { return (ulong)a; } int_2_vptr(int a)321f5207b7SJohn Levonstatic void * int_2_vptr(int a) { return (void *)a; } uint_2_vptr(uint a)331f5207b7SJohn Levonstatic void * uint_2_vptr(uint a) { return (void *)a; } long_2_vptr(long a)341f5207b7SJohn Levonstatic void * long_2_vptr(long a) { return (void *)a; } ulong_2_vptr(ulong a)351f5207b7SJohn Levonstatic void * ulong_2_vptr(ulong a) { return (void *)a; } iptr_2_vptr(int * a)361f5207b7SJohn Levonstatic void * iptr_2_vptr(int *a) { return (void *)a; } int_2_iptr(int a)371f5207b7SJohn Levonstatic int * int_2_iptr(int a) { return (int *)a; } uint_2_iptr(uint a)381f5207b7SJohn Levonstatic int * uint_2_iptr(uint a) { return (int *)a; } long_2_iptr(long a)391f5207b7SJohn Levonstatic int * long_2_iptr(long a) { return (int *)a; } ulong_2_iptr(ulong a)401f5207b7SJohn Levonstatic int * ulong_2_iptr(ulong a) { return (int *)a; } vptr_2_iptr(void * a)411f5207b7SJohn Levonstatic int * vptr_2_iptr(void *a) { return (int *)a; } int_2_float(int a)421f5207b7SJohn Levonstatic float int_2_float(int a) { return (float)a; } uint_2_float(uint a)431f5207b7SJohn Levonstatic float uint_2_float(uint a) { return (float)a; } long_2_float(long a)441f5207b7SJohn Levonstatic float long_2_float(long a) { return (float)a; } ulong_2_float(ulong a)451f5207b7SJohn Levonstatic float ulong_2_float(ulong a) { return (float)a; } double_2_float(double a)461f5207b7SJohn Levonstatic float double_2_float(double a) { return (float)a; } int_2_double(int a)471f5207b7SJohn Levonstatic double int_2_double(int a) { return (double)a; } uint_2_double(uint a)481f5207b7SJohn Levonstatic double uint_2_double(uint a) { return (double)a; } long_2_double(long a)491f5207b7SJohn Levonstatic double long_2_double(long a) { return (double)a; } ulong_2_double(ulong a)501f5207b7SJohn Levonstatic double ulong_2_double(ulong a) { return (double)a; } float_2_double(float a)511f5207b7SJohn Levonstatic double float_2_double(float a) { return (double)a; } 521f5207b7SJohn Levon float_2_float(float a)53*c85f09ccSJohn Levonstatic float float_2_float(float a) { return a; } double_2_double(double a)54*c85f09ccSJohn Levonstatic double double_2_double(double a) { return a; } 55*c85f09ccSJohn Levon 561f5207b7SJohn Levon /* 571f5207b7SJohn Levon * check-name: cast-kinds 58*c85f09ccSJohn Levon * check-command: test-linearize -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -m64 $file 59*c85f09ccSJohn Levon * check-assert: sizeof(void *) == 8 && sizeof(long) == 8 && sizeof(double) == 8 601f5207b7SJohn Levon * 611f5207b7SJohn Levon * check-output-start 621f5207b7SJohn Levon uint_2_int: 631f5207b7SJohn Levon .L0: 641f5207b7SJohn Levon <entry-point> 651f5207b7SJohn Levon ret.32 %arg1 661f5207b7SJohn Levon 671f5207b7SJohn Levon 681f5207b7SJohn Levon long_2_int: 691f5207b7SJohn Levon .L2: 701f5207b7SJohn Levon <entry-point> 71*c85f09ccSJohn Levon trunc.32 %r4 <- (64) %arg1 72*c85f09ccSJohn Levon ret.32 %r4 731f5207b7SJohn Levon 741f5207b7SJohn Levon 751f5207b7SJohn Levon ulong_2_int: 761f5207b7SJohn Levon .L4: 771f5207b7SJohn Levon <entry-point> 78*c85f09ccSJohn Levon trunc.32 %r7 <- (64) %arg1 79*c85f09ccSJohn Levon ret.32 %r7 801f5207b7SJohn Levon 811f5207b7SJohn Levon 821f5207b7SJohn Levon vptr_2_int: 831f5207b7SJohn Levon .L6: 841f5207b7SJohn Levon <entry-point> 85*c85f09ccSJohn Levon trunc.32 %r10 <- (64) %arg1 86*c85f09ccSJohn Levon ret.32 %r10 871f5207b7SJohn Levon 881f5207b7SJohn Levon 891f5207b7SJohn Levon iptr_2_int: 901f5207b7SJohn Levon .L8: 911f5207b7SJohn Levon <entry-point> 92*c85f09ccSJohn Levon trunc.32 %r14 <- (64) %arg1 931f5207b7SJohn Levon ret.32 %r14 941f5207b7SJohn Levon 951f5207b7SJohn Levon 961f5207b7SJohn Levon float_2_int: 971f5207b7SJohn Levon .L10: 981f5207b7SJohn Levon <entry-point> 99*c85f09ccSJohn Levon fcvts.32 %r17 <- (32) %arg1 100*c85f09ccSJohn Levon ret.32 %r17 1011f5207b7SJohn Levon 1021f5207b7SJohn Levon 1031f5207b7SJohn Levon double_2_int: 1041f5207b7SJohn Levon .L12: 1051f5207b7SJohn Levon <entry-point> 106*c85f09ccSJohn Levon fcvts.32 %r20 <- (64) %arg1 1071f5207b7SJohn Levon ret.32 %r20 1081f5207b7SJohn Levon 1091f5207b7SJohn Levon 1101f5207b7SJohn Levon int_2_uint: 1111f5207b7SJohn Levon .L14: 1121f5207b7SJohn Levon <entry-point> 1131f5207b7SJohn Levon ret.32 %arg1 1141f5207b7SJohn Levon 1151f5207b7SJohn Levon 1161f5207b7SJohn Levon long_2_uint: 1171f5207b7SJohn Levon .L16: 1181f5207b7SJohn Levon <entry-point> 119*c85f09ccSJohn Levon trunc.32 %r25 <- (64) %arg1 120*c85f09ccSJohn Levon ret.32 %r25 1211f5207b7SJohn Levon 1221f5207b7SJohn Levon 1231f5207b7SJohn Levon ulong_2_uint: 1241f5207b7SJohn Levon .L18: 1251f5207b7SJohn Levon <entry-point> 126*c85f09ccSJohn Levon trunc.32 %r28 <- (64) %arg1 127*c85f09ccSJohn Levon ret.32 %r28 1281f5207b7SJohn Levon 1291f5207b7SJohn Levon 1301f5207b7SJohn Levon vptr_2_uint: 1311f5207b7SJohn Levon .L20: 1321f5207b7SJohn Levon <entry-point> 133*c85f09ccSJohn Levon trunc.32 %r31 <- (64) %arg1 134*c85f09ccSJohn Levon ret.32 %r31 1351f5207b7SJohn Levon 1361f5207b7SJohn Levon 1371f5207b7SJohn Levon iptr_2_uint: 1381f5207b7SJohn Levon .L22: 1391f5207b7SJohn Levon <entry-point> 140*c85f09ccSJohn Levon trunc.32 %r35 <- (64) %arg1 1411f5207b7SJohn Levon ret.32 %r35 1421f5207b7SJohn Levon 1431f5207b7SJohn Levon 1441f5207b7SJohn Levon float_2_uint: 1451f5207b7SJohn Levon .L24: 1461f5207b7SJohn Levon <entry-point> 147*c85f09ccSJohn Levon fcvtu.32 %r38 <- (32) %arg1 148*c85f09ccSJohn Levon ret.32 %r38 1491f5207b7SJohn Levon 1501f5207b7SJohn Levon 1511f5207b7SJohn Levon double_2_uint: 1521f5207b7SJohn Levon .L26: 1531f5207b7SJohn Levon <entry-point> 154*c85f09ccSJohn Levon fcvtu.32 %r41 <- (64) %arg1 1551f5207b7SJohn Levon ret.32 %r41 1561f5207b7SJohn Levon 1571f5207b7SJohn Levon 1581f5207b7SJohn Levon int_2_long: 1591f5207b7SJohn Levon .L28: 1601f5207b7SJohn Levon <entry-point> 161*c85f09ccSJohn Levon sext.64 %r44 <- (32) %arg1 1621f5207b7SJohn Levon ret.64 %r44 1631f5207b7SJohn Levon 1641f5207b7SJohn Levon 1651f5207b7SJohn Levon uint_2_long: 1661f5207b7SJohn Levon .L30: 1671f5207b7SJohn Levon <entry-point> 168*c85f09ccSJohn Levon zext.64 %r47 <- (32) %arg1 1691f5207b7SJohn Levon ret.64 %r47 1701f5207b7SJohn Levon 1711f5207b7SJohn Levon 1721f5207b7SJohn Levon ulong_2_long: 1731f5207b7SJohn Levon .L32: 1741f5207b7SJohn Levon <entry-point> 1751f5207b7SJohn Levon ret.64 %arg1 1761f5207b7SJohn Levon 1771f5207b7SJohn Levon 1781f5207b7SJohn Levon vptr_2_long: 1791f5207b7SJohn Levon .L34: 1801f5207b7SJohn Levon <entry-point> 181*c85f09ccSJohn Levon ret.64 %arg1 1821f5207b7SJohn Levon 1831f5207b7SJohn Levon 1841f5207b7SJohn Levon iptr_2_long: 1851f5207b7SJohn Levon .L36: 1861f5207b7SJohn Levon <entry-point> 187*c85f09ccSJohn Levon ret.64 %arg1 1881f5207b7SJohn Levon 1891f5207b7SJohn Levon 1901f5207b7SJohn Levon float_2_long: 1911f5207b7SJohn Levon .L38: 1921f5207b7SJohn Levon <entry-point> 193*c85f09ccSJohn Levon fcvts.64 %r57 <- (32) %arg1 194*c85f09ccSJohn Levon ret.64 %r57 1951f5207b7SJohn Levon 1961f5207b7SJohn Levon 1971f5207b7SJohn Levon double_2_long: 1981f5207b7SJohn Levon .L40: 1991f5207b7SJohn Levon <entry-point> 200*c85f09ccSJohn Levon fcvts.64 %r60 <- (64) %arg1 201*c85f09ccSJohn Levon ret.64 %r60 2021f5207b7SJohn Levon 2031f5207b7SJohn Levon 2041f5207b7SJohn Levon int_2_ulong: 2051f5207b7SJohn Levon .L42: 2061f5207b7SJohn Levon <entry-point> 207*c85f09ccSJohn Levon sext.64 %r63 <- (32) %arg1 208*c85f09ccSJohn Levon ret.64 %r63 2091f5207b7SJohn Levon 2101f5207b7SJohn Levon 2111f5207b7SJohn Levon uint_2_ulong: 2121f5207b7SJohn Levon .L44: 2131f5207b7SJohn Levon <entry-point> 214*c85f09ccSJohn Levon zext.64 %r66 <- (32) %arg1 215*c85f09ccSJohn Levon ret.64 %r66 2161f5207b7SJohn Levon 2171f5207b7SJohn Levon 2181f5207b7SJohn Levon long_2_ulong: 2191f5207b7SJohn Levon .L46: 2201f5207b7SJohn Levon <entry-point> 2211f5207b7SJohn Levon ret.64 %arg1 2221f5207b7SJohn Levon 2231f5207b7SJohn Levon 2241f5207b7SJohn Levon vptr_2_ulong: 2251f5207b7SJohn Levon .L48: 2261f5207b7SJohn Levon <entry-point> 227*c85f09ccSJohn Levon ret.64 %arg1 2281f5207b7SJohn Levon 2291f5207b7SJohn Levon 2301f5207b7SJohn Levon iptr_2_ulong: 2311f5207b7SJohn Levon .L50: 2321f5207b7SJohn Levon <entry-point> 233*c85f09ccSJohn Levon ret.64 %arg1 2341f5207b7SJohn Levon 2351f5207b7SJohn Levon 2361f5207b7SJohn Levon float_2_ulong: 2371f5207b7SJohn Levon .L52: 2381f5207b7SJohn Levon <entry-point> 239*c85f09ccSJohn Levon fcvtu.64 %r76 <- (32) %arg1 240*c85f09ccSJohn Levon ret.64 %r76 2411f5207b7SJohn Levon 2421f5207b7SJohn Levon 2431f5207b7SJohn Levon double_2_ulong: 2441f5207b7SJohn Levon .L54: 2451f5207b7SJohn Levon <entry-point> 246*c85f09ccSJohn Levon fcvtu.64 %r79 <- (64) %arg1 247*c85f09ccSJohn Levon ret.64 %r79 2481f5207b7SJohn Levon 2491f5207b7SJohn Levon 2501f5207b7SJohn Levon int_2_vptr: 2511f5207b7SJohn Levon .L56: 2521f5207b7SJohn Levon <entry-point> 253*c85f09ccSJohn Levon sext.64 %r82 <- (32) %arg1 254*c85f09ccSJohn Levon ret.64 %r82 2551f5207b7SJohn Levon 2561f5207b7SJohn Levon 2571f5207b7SJohn Levon uint_2_vptr: 2581f5207b7SJohn Levon .L58: 2591f5207b7SJohn Levon <entry-point> 260*c85f09ccSJohn Levon zext.64 %r85 <- (32) %arg1 261*c85f09ccSJohn Levon ret.64 %r85 2621f5207b7SJohn Levon 2631f5207b7SJohn Levon 2641f5207b7SJohn Levon long_2_vptr: 2651f5207b7SJohn Levon .L60: 2661f5207b7SJohn Levon <entry-point> 267*c85f09ccSJohn Levon ret.64 %arg1 2681f5207b7SJohn Levon 2691f5207b7SJohn Levon 2701f5207b7SJohn Levon ulong_2_vptr: 2711f5207b7SJohn Levon .L62: 2721f5207b7SJohn Levon <entry-point> 273*c85f09ccSJohn Levon ret.64 %arg1 2741f5207b7SJohn Levon 2751f5207b7SJohn Levon 2761f5207b7SJohn Levon iptr_2_vptr: 2771f5207b7SJohn Levon .L64: 2781f5207b7SJohn Levon <entry-point> 279*c85f09ccSJohn Levon ret.64 %arg1 2801f5207b7SJohn Levon 2811f5207b7SJohn Levon 2821f5207b7SJohn Levon int_2_iptr: 2831f5207b7SJohn Levon .L66: 2841f5207b7SJohn Levon <entry-point> 285*c85f09ccSJohn Levon sext.64 %r94 <- (32) %arg1 286*c85f09ccSJohn Levon ret.64 %r94 2871f5207b7SJohn Levon 2881f5207b7SJohn Levon 2891f5207b7SJohn Levon uint_2_iptr: 2901f5207b7SJohn Levon .L68: 2911f5207b7SJohn Levon <entry-point> 292*c85f09ccSJohn Levon zext.64 %r98 <- (32) %arg1 293*c85f09ccSJohn Levon ret.64 %r98 2941f5207b7SJohn Levon 2951f5207b7SJohn Levon 2961f5207b7SJohn Levon long_2_iptr: 2971f5207b7SJohn Levon .L70: 2981f5207b7SJohn Levon <entry-point> 299*c85f09ccSJohn Levon ret.64 %arg1 3001f5207b7SJohn Levon 3011f5207b7SJohn Levon 3021f5207b7SJohn Levon ulong_2_iptr: 3031f5207b7SJohn Levon .L72: 3041f5207b7SJohn Levon <entry-point> 305*c85f09ccSJohn Levon ret.64 %arg1 3061f5207b7SJohn Levon 3071f5207b7SJohn Levon 3081f5207b7SJohn Levon vptr_2_iptr: 3091f5207b7SJohn Levon .L74: 3101f5207b7SJohn Levon <entry-point> 311*c85f09ccSJohn Levon ptrcast.64 %r108 <- (64) %arg1 312*c85f09ccSJohn Levon ret.64 %r108 3131f5207b7SJohn Levon 3141f5207b7SJohn Levon 3151f5207b7SJohn Levon int_2_float: 3161f5207b7SJohn Levon .L76: 3171f5207b7SJohn Levon <entry-point> 318*c85f09ccSJohn Levon scvtf.32 %r111 <- (32) %arg1 319*c85f09ccSJohn Levon ret.32 %r111 3201f5207b7SJohn Levon 3211f5207b7SJohn Levon 3221f5207b7SJohn Levon uint_2_float: 3231f5207b7SJohn Levon .L78: 3241f5207b7SJohn Levon <entry-point> 325*c85f09ccSJohn Levon ucvtf.32 %r114 <- (32) %arg1 326*c85f09ccSJohn Levon ret.32 %r114 3271f5207b7SJohn Levon 3281f5207b7SJohn Levon 3291f5207b7SJohn Levon long_2_float: 3301f5207b7SJohn Levon .L80: 3311f5207b7SJohn Levon <entry-point> 332*c85f09ccSJohn Levon scvtf.32 %r117 <- (64) %arg1 333*c85f09ccSJohn Levon ret.32 %r117 3341f5207b7SJohn Levon 3351f5207b7SJohn Levon 3361f5207b7SJohn Levon ulong_2_float: 3371f5207b7SJohn Levon .L82: 3381f5207b7SJohn Levon <entry-point> 339*c85f09ccSJohn Levon ucvtf.32 %r120 <- (64) %arg1 340*c85f09ccSJohn Levon ret.32 %r120 3411f5207b7SJohn Levon 3421f5207b7SJohn Levon 3431f5207b7SJohn Levon double_2_float: 3441f5207b7SJohn Levon .L84: 3451f5207b7SJohn Levon <entry-point> 346*c85f09ccSJohn Levon fcvtf.32 %r123 <- (64) %arg1 347*c85f09ccSJohn Levon ret.32 %r123 3481f5207b7SJohn Levon 3491f5207b7SJohn Levon 3501f5207b7SJohn Levon int_2_double: 3511f5207b7SJohn Levon .L86: 3521f5207b7SJohn Levon <entry-point> 353*c85f09ccSJohn Levon scvtf.64 %r126 <- (32) %arg1 354*c85f09ccSJohn Levon ret.64 %r126 3551f5207b7SJohn Levon 3561f5207b7SJohn Levon 3571f5207b7SJohn Levon uint_2_double: 3581f5207b7SJohn Levon .L88: 3591f5207b7SJohn Levon <entry-point> 360*c85f09ccSJohn Levon ucvtf.64 %r129 <- (32) %arg1 361*c85f09ccSJohn Levon ret.64 %r129 3621f5207b7SJohn Levon 3631f5207b7SJohn Levon 3641f5207b7SJohn Levon long_2_double: 3651f5207b7SJohn Levon .L90: 3661f5207b7SJohn Levon <entry-point> 367*c85f09ccSJohn Levon scvtf.64 %r132 <- (64) %arg1 368*c85f09ccSJohn Levon ret.64 %r132 3691f5207b7SJohn Levon 3701f5207b7SJohn Levon 3711f5207b7SJohn Levon ulong_2_double: 3721f5207b7SJohn Levon .L92: 3731f5207b7SJohn Levon <entry-point> 374*c85f09ccSJohn Levon ucvtf.64 %r135 <- (64) %arg1 375*c85f09ccSJohn Levon ret.64 %r135 3761f5207b7SJohn Levon 3771f5207b7SJohn Levon 3781f5207b7SJohn Levon float_2_double: 3791f5207b7SJohn Levon .L94: 3801f5207b7SJohn Levon <entry-point> 381*c85f09ccSJohn Levon fcvtf.64 %r138 <- (32) %arg1 382*c85f09ccSJohn Levon ret.64 %r138 383*c85f09ccSJohn Levon 384*c85f09ccSJohn Levon 385*c85f09ccSJohn Levon float_2_float: 386*c85f09ccSJohn Levon .L96: 387*c85f09ccSJohn Levon <entry-point> 388*c85f09ccSJohn Levon ret.32 %arg1 389*c85f09ccSJohn Levon 390*c85f09ccSJohn Levon 391*c85f09ccSJohn Levon double_2_double: 392*c85f09ccSJohn Levon .L98: 393*c85f09ccSJohn Levon <entry-point> 394*c85f09ccSJohn Levon ret.64 %arg1 3951f5207b7SJohn Levon 3961f5207b7SJohn Levon 3971f5207b7SJohn Levon * check-output-end 3981f5207b7SJohn Levon */ 399