1*c85f09ccSJohn Levon typedef unsigned int uint; 2*c85f09ccSJohn Levon typedef unsigned long ulong; 3*c85f09ccSJohn Levon uint_2_int(uint a)4*c85f09ccSJohn Levonstatic int uint_2_int(uint a) { return (int)a; } long_2_int(long a)5*c85f09ccSJohn Levonstatic int long_2_int(long a) { return (int)a; } ulong_2_int(ulong a)6*c85f09ccSJohn Levonstatic int ulong_2_int(ulong a) { return (int)a; } vptr_2_int(void * a)7*c85f09ccSJohn Levonstatic int vptr_2_int(void *a) { return (int)a; } iptr_2_int(int * a)8*c85f09ccSJohn Levonstatic int iptr_2_int(int *a) { return (int)a; } float_2_int(float a)9*c85f09ccSJohn Levonstatic int float_2_int(float a) { return (int)a; } double_2_int(double a)10*c85f09ccSJohn Levonstatic int double_2_int(double a) { return (int)a; } int_2_uint(int a)11*c85f09ccSJohn Levonstatic uint int_2_uint(int a) { return (uint)a; } long_2_uint(long a)12*c85f09ccSJohn Levonstatic uint long_2_uint(long a) { return (uint)a; } ulong_2_uint(ulong a)13*c85f09ccSJohn Levonstatic uint ulong_2_uint(ulong a) { return (uint)a; } vptr_2_uint(void * a)14*c85f09ccSJohn Levonstatic uint vptr_2_uint(void *a) { return (uint)a; } iptr_2_uint(int * a)15*c85f09ccSJohn Levonstatic uint iptr_2_uint(int *a) { return (uint)a; } float_2_uint(float a)16*c85f09ccSJohn Levonstatic uint float_2_uint(float a) { return (uint)a; } double_2_uint(double a)17*c85f09ccSJohn Levonstatic uint double_2_uint(double a) { return (uint)a; } int_2_long(int a)18*c85f09ccSJohn Levonstatic long int_2_long(int a) { return (long)a; } uint_2_long(uint a)19*c85f09ccSJohn Levonstatic long uint_2_long(uint a) { return (long)a; } ulong_2_long(ulong a)20*c85f09ccSJohn Levonstatic long ulong_2_long(ulong a) { return (long)a; } vptr_2_long(void * a)21*c85f09ccSJohn Levonstatic long vptr_2_long(void *a) { return (long)a; } iptr_2_long(int * a)22*c85f09ccSJohn Levonstatic long iptr_2_long(int *a) { return (long)a; } float_2_long(float a)23*c85f09ccSJohn Levonstatic long float_2_long(float a) { return (long)a; } double_2_long(double a)24*c85f09ccSJohn Levonstatic long double_2_long(double a) { return (long)a; } int_2_ulong(int a)25*c85f09ccSJohn Levonstatic ulong int_2_ulong(int a) { return (ulong)a; } uint_2_ulong(uint a)26*c85f09ccSJohn Levonstatic ulong uint_2_ulong(uint a) { return (ulong)a; } long_2_ulong(long a)27*c85f09ccSJohn Levonstatic ulong long_2_ulong(long a) { return (ulong)a; } vptr_2_ulong(void * a)28*c85f09ccSJohn Levonstatic ulong vptr_2_ulong(void *a) { return (ulong)a; } iptr_2_ulong(int * a)29*c85f09ccSJohn Levonstatic ulong iptr_2_ulong(int *a) { return (ulong)a; } float_2_ulong(float a)30*c85f09ccSJohn Levonstatic ulong float_2_ulong(float a) { return (ulong)a; } double_2_ulong(double a)31*c85f09ccSJohn Levonstatic ulong double_2_ulong(double a) { return (ulong)a; } int_2_vptr(int a)32*c85f09ccSJohn Levonstatic void * int_2_vptr(int a) { return (void *)a; } uint_2_vptr(uint a)33*c85f09ccSJohn Levonstatic void * uint_2_vptr(uint a) { return (void *)a; } long_2_vptr(long a)34*c85f09ccSJohn Levonstatic void * long_2_vptr(long a) { return (void *)a; } ulong_2_vptr(ulong a)35*c85f09ccSJohn Levonstatic void * ulong_2_vptr(ulong a) { return (void *)a; } iptr_2_vptr(int * a)36*c85f09ccSJohn Levonstatic void * iptr_2_vptr(int *a) { return (void *)a; } int_2_iptr(int a)37*c85f09ccSJohn Levonstatic int * int_2_iptr(int a) { return (int *)a; } uint_2_iptr(uint a)38*c85f09ccSJohn Levonstatic int * uint_2_iptr(uint a) { return (int *)a; } long_2_iptr(long a)39*c85f09ccSJohn Levonstatic int * long_2_iptr(long a) { return (int *)a; } ulong_2_iptr(ulong a)40*c85f09ccSJohn Levonstatic int * ulong_2_iptr(ulong a) { return (int *)a; } vptr_2_iptr(void * a)41*c85f09ccSJohn Levonstatic int * vptr_2_iptr(void *a) { return (int *)a; } int_2_float(int a)42*c85f09ccSJohn Levonstatic float int_2_float(int a) { return (float)a; } uint_2_float(uint a)43*c85f09ccSJohn Levonstatic float uint_2_float(uint a) { return (float)a; } long_2_float(long a)44*c85f09ccSJohn Levonstatic float long_2_float(long a) { return (float)a; } ulong_2_float(ulong a)45*c85f09ccSJohn Levonstatic float ulong_2_float(ulong a) { return (float)a; } double_2_float(double a)46*c85f09ccSJohn Levonstatic float double_2_float(double a) { return (float)a; } int_2_double(int a)47*c85f09ccSJohn Levonstatic double int_2_double(int a) { return (double)a; } uint_2_double(uint a)48*c85f09ccSJohn Levonstatic double uint_2_double(uint a) { return (double)a; } long_2_double(long a)49*c85f09ccSJohn Levonstatic double long_2_double(long a) { return (double)a; } ulong_2_double(ulong a)50*c85f09ccSJohn Levonstatic double ulong_2_double(ulong a) { return (double)a; } float_2_double(float a)51*c85f09ccSJohn Levonstatic double float_2_double(float a) { return (double)a; } 52*c85f09ccSJohn 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 56*c85f09ccSJohn Levon /* 57*c85f09ccSJohn 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 60*c85f09ccSJohn Levon * 61*c85f09ccSJohn Levon * check-output-start 62*c85f09ccSJohn Levon uint_2_int: 63*c85f09ccSJohn Levon .L0: 64*c85f09ccSJohn Levon <entry-point> 65*c85f09ccSJohn Levon ret.32 %arg1 66*c85f09ccSJohn Levon 67*c85f09ccSJohn Levon 68*c85f09ccSJohn Levon long_2_int: 69*c85f09ccSJohn Levon .L2: 70*c85f09ccSJohn Levon <entry-point> 71*c85f09ccSJohn Levon trunc.32 %r4 <- (64) %arg1 72*c85f09ccSJohn Levon ret.32 %r4 73*c85f09ccSJohn Levon 74*c85f09ccSJohn Levon 75*c85f09ccSJohn Levon ulong_2_int: 76*c85f09ccSJohn Levon .L4: 77*c85f09ccSJohn Levon <entry-point> 78*c85f09ccSJohn Levon trunc.32 %r7 <- (64) %arg1 79*c85f09ccSJohn Levon ret.32 %r7 80*c85f09ccSJohn Levon 81*c85f09ccSJohn Levon 82*c85f09ccSJohn Levon vptr_2_int: 83*c85f09ccSJohn Levon .L6: 84*c85f09ccSJohn Levon <entry-point> 85*c85f09ccSJohn Levon trunc.32 %r10 <- (64) %arg1 86*c85f09ccSJohn Levon ret.32 %r10 87*c85f09ccSJohn Levon 88*c85f09ccSJohn Levon 89*c85f09ccSJohn Levon iptr_2_int: 90*c85f09ccSJohn Levon .L8: 91*c85f09ccSJohn Levon <entry-point> 92*c85f09ccSJohn Levon trunc.32 %r14 <- (64) %arg1 93*c85f09ccSJohn Levon ret.32 %r14 94*c85f09ccSJohn Levon 95*c85f09ccSJohn Levon 96*c85f09ccSJohn Levon float_2_int: 97*c85f09ccSJohn Levon .L10: 98*c85f09ccSJohn Levon <entry-point> 99*c85f09ccSJohn Levon fcvts.32 %r17 <- (32) %arg1 100*c85f09ccSJohn Levon ret.32 %r17 101*c85f09ccSJohn Levon 102*c85f09ccSJohn Levon 103*c85f09ccSJohn Levon double_2_int: 104*c85f09ccSJohn Levon .L12: 105*c85f09ccSJohn Levon <entry-point> 106*c85f09ccSJohn Levon fcvts.32 %r20 <- (64) %arg1 107*c85f09ccSJohn Levon ret.32 %r20 108*c85f09ccSJohn Levon 109*c85f09ccSJohn Levon 110*c85f09ccSJohn Levon int_2_uint: 111*c85f09ccSJohn Levon .L14: 112*c85f09ccSJohn Levon <entry-point> 113*c85f09ccSJohn Levon ret.32 %arg1 114*c85f09ccSJohn Levon 115*c85f09ccSJohn Levon 116*c85f09ccSJohn Levon long_2_uint: 117*c85f09ccSJohn Levon .L16: 118*c85f09ccSJohn Levon <entry-point> 119*c85f09ccSJohn Levon trunc.32 %r25 <- (64) %arg1 120*c85f09ccSJohn Levon ret.32 %r25 121*c85f09ccSJohn Levon 122*c85f09ccSJohn Levon 123*c85f09ccSJohn Levon ulong_2_uint: 124*c85f09ccSJohn Levon .L18: 125*c85f09ccSJohn Levon <entry-point> 126*c85f09ccSJohn Levon trunc.32 %r28 <- (64) %arg1 127*c85f09ccSJohn Levon ret.32 %r28 128*c85f09ccSJohn Levon 129*c85f09ccSJohn Levon 130*c85f09ccSJohn Levon vptr_2_uint: 131*c85f09ccSJohn Levon .L20: 132*c85f09ccSJohn Levon <entry-point> 133*c85f09ccSJohn Levon trunc.32 %r31 <- (64) %arg1 134*c85f09ccSJohn Levon ret.32 %r31 135*c85f09ccSJohn Levon 136*c85f09ccSJohn Levon 137*c85f09ccSJohn Levon iptr_2_uint: 138*c85f09ccSJohn Levon .L22: 139*c85f09ccSJohn Levon <entry-point> 140*c85f09ccSJohn Levon trunc.32 %r35 <- (64) %arg1 141*c85f09ccSJohn Levon ret.32 %r35 142*c85f09ccSJohn Levon 143*c85f09ccSJohn Levon 144*c85f09ccSJohn Levon float_2_uint: 145*c85f09ccSJohn Levon .L24: 146*c85f09ccSJohn Levon <entry-point> 147*c85f09ccSJohn Levon fcvtu.32 %r38 <- (32) %arg1 148*c85f09ccSJohn Levon ret.32 %r38 149*c85f09ccSJohn Levon 150*c85f09ccSJohn Levon 151*c85f09ccSJohn Levon double_2_uint: 152*c85f09ccSJohn Levon .L26: 153*c85f09ccSJohn Levon <entry-point> 154*c85f09ccSJohn Levon fcvtu.32 %r41 <- (64) %arg1 155*c85f09ccSJohn Levon ret.32 %r41 156*c85f09ccSJohn Levon 157*c85f09ccSJohn Levon 158*c85f09ccSJohn Levon int_2_long: 159*c85f09ccSJohn Levon .L28: 160*c85f09ccSJohn Levon <entry-point> 161*c85f09ccSJohn Levon sext.64 %r44 <- (32) %arg1 162*c85f09ccSJohn Levon ret.64 %r44 163*c85f09ccSJohn Levon 164*c85f09ccSJohn Levon 165*c85f09ccSJohn Levon uint_2_long: 166*c85f09ccSJohn Levon .L30: 167*c85f09ccSJohn Levon <entry-point> 168*c85f09ccSJohn Levon zext.64 %r47 <- (32) %arg1 169*c85f09ccSJohn Levon ret.64 %r47 170*c85f09ccSJohn Levon 171*c85f09ccSJohn Levon 172*c85f09ccSJohn Levon ulong_2_long: 173*c85f09ccSJohn Levon .L32: 174*c85f09ccSJohn Levon <entry-point> 175*c85f09ccSJohn Levon ret.64 %arg1 176*c85f09ccSJohn Levon 177*c85f09ccSJohn Levon 178*c85f09ccSJohn Levon vptr_2_long: 179*c85f09ccSJohn Levon .L34: 180*c85f09ccSJohn Levon <entry-point> 181*c85f09ccSJohn Levon ret.64 %arg1 182*c85f09ccSJohn Levon 183*c85f09ccSJohn Levon 184*c85f09ccSJohn Levon iptr_2_long: 185*c85f09ccSJohn Levon .L36: 186*c85f09ccSJohn Levon <entry-point> 187*c85f09ccSJohn Levon ret.64 %arg1 188*c85f09ccSJohn Levon 189*c85f09ccSJohn Levon 190*c85f09ccSJohn Levon float_2_long: 191*c85f09ccSJohn Levon .L38: 192*c85f09ccSJohn Levon <entry-point> 193*c85f09ccSJohn Levon fcvts.64 %r57 <- (32) %arg1 194*c85f09ccSJohn Levon ret.64 %r57 195*c85f09ccSJohn Levon 196*c85f09ccSJohn Levon 197*c85f09ccSJohn Levon double_2_long: 198*c85f09ccSJohn Levon .L40: 199*c85f09ccSJohn Levon <entry-point> 200*c85f09ccSJohn Levon fcvts.64 %r60 <- (64) %arg1 201*c85f09ccSJohn Levon ret.64 %r60 202*c85f09ccSJohn Levon 203*c85f09ccSJohn Levon 204*c85f09ccSJohn Levon int_2_ulong: 205*c85f09ccSJohn Levon .L42: 206*c85f09ccSJohn Levon <entry-point> 207*c85f09ccSJohn Levon sext.64 %r63 <- (32) %arg1 208*c85f09ccSJohn Levon ret.64 %r63 209*c85f09ccSJohn Levon 210*c85f09ccSJohn Levon 211*c85f09ccSJohn Levon uint_2_ulong: 212*c85f09ccSJohn Levon .L44: 213*c85f09ccSJohn Levon <entry-point> 214*c85f09ccSJohn Levon zext.64 %r66 <- (32) %arg1 215*c85f09ccSJohn Levon ret.64 %r66 216*c85f09ccSJohn Levon 217*c85f09ccSJohn Levon 218*c85f09ccSJohn Levon long_2_ulong: 219*c85f09ccSJohn Levon .L46: 220*c85f09ccSJohn Levon <entry-point> 221*c85f09ccSJohn Levon ret.64 %arg1 222*c85f09ccSJohn Levon 223*c85f09ccSJohn Levon 224*c85f09ccSJohn Levon vptr_2_ulong: 225*c85f09ccSJohn Levon .L48: 226*c85f09ccSJohn Levon <entry-point> 227*c85f09ccSJohn Levon ret.64 %arg1 228*c85f09ccSJohn Levon 229*c85f09ccSJohn Levon 230*c85f09ccSJohn Levon iptr_2_ulong: 231*c85f09ccSJohn Levon .L50: 232*c85f09ccSJohn Levon <entry-point> 233*c85f09ccSJohn Levon ret.64 %arg1 234*c85f09ccSJohn Levon 235*c85f09ccSJohn Levon 236*c85f09ccSJohn Levon float_2_ulong: 237*c85f09ccSJohn Levon .L52: 238*c85f09ccSJohn Levon <entry-point> 239*c85f09ccSJohn Levon fcvtu.64 %r76 <- (32) %arg1 240*c85f09ccSJohn Levon ret.64 %r76 241*c85f09ccSJohn Levon 242*c85f09ccSJohn Levon 243*c85f09ccSJohn Levon double_2_ulong: 244*c85f09ccSJohn Levon .L54: 245*c85f09ccSJohn Levon <entry-point> 246*c85f09ccSJohn Levon fcvtu.64 %r79 <- (64) %arg1 247*c85f09ccSJohn Levon ret.64 %r79 248*c85f09ccSJohn Levon 249*c85f09ccSJohn Levon 250*c85f09ccSJohn Levon int_2_vptr: 251*c85f09ccSJohn Levon .L56: 252*c85f09ccSJohn Levon <entry-point> 253*c85f09ccSJohn Levon sext.64 %r82 <- (32) %arg1 254*c85f09ccSJohn Levon ret.64 %r82 255*c85f09ccSJohn Levon 256*c85f09ccSJohn Levon 257*c85f09ccSJohn Levon uint_2_vptr: 258*c85f09ccSJohn Levon .L58: 259*c85f09ccSJohn Levon <entry-point> 260*c85f09ccSJohn Levon zext.64 %r85 <- (32) %arg1 261*c85f09ccSJohn Levon ret.64 %r85 262*c85f09ccSJohn Levon 263*c85f09ccSJohn Levon 264*c85f09ccSJohn Levon long_2_vptr: 265*c85f09ccSJohn Levon .L60: 266*c85f09ccSJohn Levon <entry-point> 267*c85f09ccSJohn Levon ret.64 %arg1 268*c85f09ccSJohn Levon 269*c85f09ccSJohn Levon 270*c85f09ccSJohn Levon ulong_2_vptr: 271*c85f09ccSJohn Levon .L62: 272*c85f09ccSJohn Levon <entry-point> 273*c85f09ccSJohn Levon ret.64 %arg1 274*c85f09ccSJohn Levon 275*c85f09ccSJohn Levon 276*c85f09ccSJohn Levon iptr_2_vptr: 277*c85f09ccSJohn Levon .L64: 278*c85f09ccSJohn Levon <entry-point> 279*c85f09ccSJohn Levon ret.64 %arg1 280*c85f09ccSJohn Levon 281*c85f09ccSJohn Levon 282*c85f09ccSJohn Levon int_2_iptr: 283*c85f09ccSJohn Levon .L66: 284*c85f09ccSJohn Levon <entry-point> 285*c85f09ccSJohn Levon sext.64 %r94 <- (32) %arg1 286*c85f09ccSJohn Levon ret.64 %r94 287*c85f09ccSJohn Levon 288*c85f09ccSJohn Levon 289*c85f09ccSJohn Levon uint_2_iptr: 290*c85f09ccSJohn Levon .L68: 291*c85f09ccSJohn Levon <entry-point> 292*c85f09ccSJohn Levon zext.64 %r98 <- (32) %arg1 293*c85f09ccSJohn Levon ret.64 %r98 294*c85f09ccSJohn Levon 295*c85f09ccSJohn Levon 296*c85f09ccSJohn Levon long_2_iptr: 297*c85f09ccSJohn Levon .L70: 298*c85f09ccSJohn Levon <entry-point> 299*c85f09ccSJohn Levon ret.64 %arg1 300*c85f09ccSJohn Levon 301*c85f09ccSJohn Levon 302*c85f09ccSJohn Levon ulong_2_iptr: 303*c85f09ccSJohn Levon .L72: 304*c85f09ccSJohn Levon <entry-point> 305*c85f09ccSJohn Levon ret.64 %arg1 306*c85f09ccSJohn Levon 307*c85f09ccSJohn Levon 308*c85f09ccSJohn Levon vptr_2_iptr: 309*c85f09ccSJohn Levon .L74: 310*c85f09ccSJohn Levon <entry-point> 311*c85f09ccSJohn Levon ptrcast.64 %r108 <- (64) %arg1 312*c85f09ccSJohn Levon ret.64 %r108 313*c85f09ccSJohn Levon 314*c85f09ccSJohn Levon 315*c85f09ccSJohn Levon int_2_float: 316*c85f09ccSJohn Levon .L76: 317*c85f09ccSJohn Levon <entry-point> 318*c85f09ccSJohn Levon scvtf.32 %r111 <- (32) %arg1 319*c85f09ccSJohn Levon ret.32 %r111 320*c85f09ccSJohn Levon 321*c85f09ccSJohn Levon 322*c85f09ccSJohn Levon uint_2_float: 323*c85f09ccSJohn Levon .L78: 324*c85f09ccSJohn Levon <entry-point> 325*c85f09ccSJohn Levon ucvtf.32 %r114 <- (32) %arg1 326*c85f09ccSJohn Levon ret.32 %r114 327*c85f09ccSJohn Levon 328*c85f09ccSJohn Levon 329*c85f09ccSJohn Levon long_2_float: 330*c85f09ccSJohn Levon .L80: 331*c85f09ccSJohn Levon <entry-point> 332*c85f09ccSJohn Levon scvtf.32 %r117 <- (64) %arg1 333*c85f09ccSJohn Levon ret.32 %r117 334*c85f09ccSJohn Levon 335*c85f09ccSJohn Levon 336*c85f09ccSJohn Levon ulong_2_float: 337*c85f09ccSJohn Levon .L82: 338*c85f09ccSJohn Levon <entry-point> 339*c85f09ccSJohn Levon ucvtf.32 %r120 <- (64) %arg1 340*c85f09ccSJohn Levon ret.32 %r120 341*c85f09ccSJohn Levon 342*c85f09ccSJohn Levon 343*c85f09ccSJohn Levon double_2_float: 344*c85f09ccSJohn Levon .L84: 345*c85f09ccSJohn Levon <entry-point> 346*c85f09ccSJohn Levon fcvtf.32 %r123 <- (64) %arg1 347*c85f09ccSJohn Levon ret.32 %r123 348*c85f09ccSJohn Levon 349*c85f09ccSJohn Levon 350*c85f09ccSJohn Levon int_2_double: 351*c85f09ccSJohn Levon .L86: 352*c85f09ccSJohn Levon <entry-point> 353*c85f09ccSJohn Levon scvtf.64 %r126 <- (32) %arg1 354*c85f09ccSJohn Levon ret.64 %r126 355*c85f09ccSJohn Levon 356*c85f09ccSJohn Levon 357*c85f09ccSJohn Levon uint_2_double: 358*c85f09ccSJohn Levon .L88: 359*c85f09ccSJohn Levon <entry-point> 360*c85f09ccSJohn Levon ucvtf.64 %r129 <- (32) %arg1 361*c85f09ccSJohn Levon ret.64 %r129 362*c85f09ccSJohn Levon 363*c85f09ccSJohn Levon 364*c85f09ccSJohn Levon long_2_double: 365*c85f09ccSJohn Levon .L90: 366*c85f09ccSJohn Levon <entry-point> 367*c85f09ccSJohn Levon scvtf.64 %r132 <- (64) %arg1 368*c85f09ccSJohn Levon ret.64 %r132 369*c85f09ccSJohn Levon 370*c85f09ccSJohn Levon 371*c85f09ccSJohn Levon ulong_2_double: 372*c85f09ccSJohn Levon .L92: 373*c85f09ccSJohn Levon <entry-point> 374*c85f09ccSJohn Levon ucvtf.64 %r135 <- (64) %arg1 375*c85f09ccSJohn Levon ret.64 %r135 376*c85f09ccSJohn Levon 377*c85f09ccSJohn Levon 378*c85f09ccSJohn Levon float_2_double: 379*c85f09ccSJohn Levon .L94: 380*c85f09ccSJohn 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 395*c85f09ccSJohn Levon 396*c85f09ccSJohn Levon 397*c85f09ccSJohn Levon * check-output-end 398*c85f09ccSJohn Levon */ 399