1*9880d681SAndroid Build Coastguard Worker! RUN: llvm-mc %s -arch=sparcv9 -show-encoding | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker ! CHECK: fitos %f0, %f4 ! encoding: [0x89,0xa0,0x18,0x80] 4*9880d681SAndroid Build Coastguard Worker ! CHECK: fitod %f0, %f4 ! encoding: [0x89,0xa0,0x19,0x00] 5*9880d681SAndroid Build Coastguard Worker ! CHECK: fitoq %f0, %f4 ! encoding: [0x89,0xa0,0x19,0x80] 6*9880d681SAndroid Build Coastguard Worker fitos %f0, %f4 7*9880d681SAndroid Build Coastguard Worker fitod %f0, %f4 8*9880d681SAndroid Build Coastguard Worker fitoq %f0, %f4 9*9880d681SAndroid Build Coastguard Worker 10*9880d681SAndroid Build Coastguard Worker ! CHECK: fstoi %f0, %f4 ! encoding: [0x89,0xa0,0x1a,0x20] 11*9880d681SAndroid Build Coastguard Worker ! CHECK: fdtoi %f0, %f4 ! encoding: [0x89,0xa0,0x1a,0x40] 12*9880d681SAndroid Build Coastguard Worker ! CHECK: fqtoi %f0, %f4 ! encoding: [0x89,0xa0,0x1a,0x60] 13*9880d681SAndroid Build Coastguard Worker fstoi %f0, %f4 14*9880d681SAndroid Build Coastguard Worker fdtoi %f0, %f4 15*9880d681SAndroid Build Coastguard Worker fqtoi %f0, %f4 16*9880d681SAndroid Build Coastguard Worker 17*9880d681SAndroid Build Coastguard Worker ! CHECK: fstod %f0, %f4 ! encoding: [0x89,0xa0,0x19,0x20] 18*9880d681SAndroid Build Coastguard Worker ! CHECK: fstoq %f0, %f4 ! encoding: [0x89,0xa0,0x19,0xa0] 19*9880d681SAndroid Build Coastguard Worker fstod %f0, %f4 20*9880d681SAndroid Build Coastguard Worker fstoq %f0, %f4 21*9880d681SAndroid Build Coastguard Worker 22*9880d681SAndroid Build Coastguard Worker ! CHECK: fdtos %f0, %f4 ! encoding: [0x89,0xa0,0x18,0xc0] 23*9880d681SAndroid Build Coastguard Worker ! CHECK: fdtoq %f0, %f4 ! encoding: [0x89,0xa0,0x19,0xc0] 24*9880d681SAndroid Build Coastguard Worker fdtos %f0, %f4 25*9880d681SAndroid Build Coastguard Worker fdtoq %f0, %f4 26*9880d681SAndroid Build Coastguard Worker 27*9880d681SAndroid Build Coastguard Worker ! CHECK: fqtos %f0, %f4 ! encoding: [0x89,0xa0,0x18,0xe0] 28*9880d681SAndroid Build Coastguard Worker ! CHECK: fqtod %f0, %f4 ! encoding: [0x89,0xa0,0x19,0x60] 29*9880d681SAndroid Build Coastguard Worker fqtos %f0, %f4 30*9880d681SAndroid Build Coastguard Worker fqtod %f0, %f4 31*9880d681SAndroid Build Coastguard Worker 32*9880d681SAndroid Build Coastguard Worker ! CHECK: fmovs %f0, %f4 ! encoding: [0x89,0xa0,0x00,0x20] 33*9880d681SAndroid Build Coastguard Worker ! CHECK: fmovd %f0, %f4 ! encoding: [0x89,0xa0,0x00,0x40] 34*9880d681SAndroid Build Coastguard Worker ! CHECK: fmovq %f0, %f4 ! encoding: [0x89,0xa0,0x00,0x60] 35*9880d681SAndroid Build Coastguard Worker fmovs %f0, %f4 36*9880d681SAndroid Build Coastguard Worker fmovd %f0, %f4 37*9880d681SAndroid Build Coastguard Worker fmovq %f0, %f4 38*9880d681SAndroid Build Coastguard Worker 39*9880d681SAndroid Build Coastguard Worker ! CHECK: fnegs %f0, %f4 ! encoding: [0x89,0xa0,0x00,0xa0] 40*9880d681SAndroid Build Coastguard Worker ! CHECK: fnegd %f0, %f4 ! encoding: [0x89,0xa0,0x00,0xc0] 41*9880d681SAndroid Build Coastguard Worker ! CHECK: fnegq %f0, %f4 ! encoding: [0x89,0xa0,0x00,0xe0] 42*9880d681SAndroid Build Coastguard Worker fnegs %f0, %f4 43*9880d681SAndroid Build Coastguard Worker fnegd %f0, %f4 44*9880d681SAndroid Build Coastguard Worker fnegq %f0, %f4 45*9880d681SAndroid Build Coastguard Worker 46*9880d681SAndroid Build Coastguard Worker ! CHECK: fabss %f0, %f4 ! encoding: [0x89,0xa0,0x01,0x20] 47*9880d681SAndroid Build Coastguard Worker ! CHECK: fabsd %f0, %f4 ! encoding: [0x89,0xa0,0x01,0x40] 48*9880d681SAndroid Build Coastguard Worker ! CHECK: fabsq %f0, %f4 ! encoding: [0x89,0xa0,0x01,0x60] 49*9880d681SAndroid Build Coastguard Worker fabss %f0, %f4 50*9880d681SAndroid Build Coastguard Worker fabsd %f0, %f4 51*9880d681SAndroid Build Coastguard Worker fabsq %f0, %f4 52*9880d681SAndroid Build Coastguard Worker 53*9880d681SAndroid Build Coastguard Worker ! CHECK: fsqrts %f0, %f4 ! encoding: [0x89,0xa0,0x05,0x20] 54*9880d681SAndroid Build Coastguard Worker ! CHECK: fsqrtd %f0, %f4 ! encoding: [0x89,0xa0,0x05,0x40] 55*9880d681SAndroid Build Coastguard Worker ! CHECK: fsqrtq %f0, %f4 ! encoding: [0x89,0xa0,0x05,0x60] 56*9880d681SAndroid Build Coastguard Worker fsqrts %f0, %f4 57*9880d681SAndroid Build Coastguard Worker fsqrtd %f0, %f4 58*9880d681SAndroid Build Coastguard Worker fsqrtq %f0, %f4 59*9880d681SAndroid Build Coastguard Worker 60*9880d681SAndroid Build Coastguard Worker ! CHECK: fadds %f0, %f4, %f8 ! encoding: [0x91,0xa0,0x08,0x24] 61*9880d681SAndroid Build Coastguard Worker ! CHECK: faddd %f0, %f4, %f8 ! encoding: [0x91,0xa0,0x08,0x44] 62*9880d681SAndroid Build Coastguard Worker ! CHECK: faddq %f0, %f4, %f8 ! encoding: [0x91,0xa0,0x08,0x64] 63*9880d681SAndroid Build Coastguard Worker fadds %f0, %f4, %f8 64*9880d681SAndroid Build Coastguard Worker faddd %f0, %f4, %f8 65*9880d681SAndroid Build Coastguard Worker faddq %f0, %f4, %f8 66*9880d681SAndroid Build Coastguard Worker 67*9880d681SAndroid Build Coastguard Worker ! make sure we can handle V9 double registers and their aliased quad registers. 68*9880d681SAndroid Build Coastguard Worker ! CHECK: faddd %f32, %f34, %f62 ! encoding: [0xbf,0xa0,0x48,0x43] 69*9880d681SAndroid Build Coastguard Worker ! CHECK: faddq %f32, %f36, %f60 ! encoding: [0xbb,0xa0,0x48,0x65] 70*9880d681SAndroid Build Coastguard Worker faddd %f32, %f34, %f62 71*9880d681SAndroid Build Coastguard Worker faddq %f32, %f36, %f60 72*9880d681SAndroid Build Coastguard Worker 73*9880d681SAndroid Build Coastguard Worker ! CHECK: fsubs %f0, %f4, %f8 ! encoding: [0x91,0xa0,0x08,0xa4] 74*9880d681SAndroid Build Coastguard Worker ! CHECK: fsubd %f0, %f4, %f8 ! encoding: [0x91,0xa0,0x08,0xc4] 75*9880d681SAndroid Build Coastguard Worker ! CHECK: fsubq %f0, %f4, %f8 ! encoding: [0x91,0xa0,0x08,0xe4] 76*9880d681SAndroid Build Coastguard Worker fsubs %f0, %f4, %f8 77*9880d681SAndroid Build Coastguard Worker fsubd %f0, %f4, %f8 78*9880d681SAndroid Build Coastguard Worker fsubq %f0, %f4, %f8 79*9880d681SAndroid Build Coastguard Worker 80*9880d681SAndroid Build Coastguard Worker ! CHECK: fmuls %f0, %f4, %f8 ! encoding: [0x91,0xa0,0x09,0x24] 81*9880d681SAndroid Build Coastguard Worker ! CHECK: fmuld %f0, %f4, %f8 ! encoding: [0x91,0xa0,0x09,0x44] 82*9880d681SAndroid Build Coastguard Worker ! CHECK: fmulq %f0, %f4, %f8 ! encoding: [0x91,0xa0,0x09,0x64] 83*9880d681SAndroid Build Coastguard Worker fmuls %f0, %f4, %f8 84*9880d681SAndroid Build Coastguard Worker fmuld %f0, %f4, %f8 85*9880d681SAndroid Build Coastguard Worker fmulq %f0, %f4, %f8 86*9880d681SAndroid Build Coastguard Worker 87*9880d681SAndroid Build Coastguard Worker ! CHECK: fsmuld %f0, %f4, %f8 ! encoding: [0x91,0xa0,0x0d,0x24] 88*9880d681SAndroid Build Coastguard Worker ! CHECK: fdmulq %f0, %f4, %f8 ! encoding: [0x91,0xa0,0x0d,0xc4] 89*9880d681SAndroid Build Coastguard Worker fsmuld %f0, %f4, %f8 90*9880d681SAndroid Build Coastguard Worker fdmulq %f0, %f4, %f8 91*9880d681SAndroid Build Coastguard Worker 92*9880d681SAndroid Build Coastguard Worker ! CHECK: fdivs %f0, %f4, %f8 ! encoding: [0x91,0xa0,0x09,0xa4] 93*9880d681SAndroid Build Coastguard Worker ! CHECK: fdivd %f0, %f4, %f8 ! encoding: [0x91,0xa0,0x09,0xc4] 94*9880d681SAndroid Build Coastguard Worker ! CHECK: fdivq %f0, %f4, %f8 ! encoding: [0x91,0xa0,0x09,0xe4] 95*9880d681SAndroid Build Coastguard Worker fdivs %f0, %f4, %f8 96*9880d681SAndroid Build Coastguard Worker fdivd %f0, %f4, %f8 97*9880d681SAndroid Build Coastguard Worker fdivq %f0, %f4, %f8 98*9880d681SAndroid Build Coastguard Worker 99*9880d681SAndroid Build Coastguard Worker ! CHECK: fcmps %f0, %f4 ! encoding: [0x81,0xa8,0x0a,0x24] 100*9880d681SAndroid Build Coastguard Worker ! CHECK: fcmpd %f0, %f4 ! encoding: [0x81,0xa8,0x0a,0x44] 101*9880d681SAndroid Build Coastguard Worker ! CHECK: fcmpq %f0, %f4 ! encoding: [0x81,0xa8,0x0a,0x64] 102*9880d681SAndroid Build Coastguard Worker fcmps %f0, %f4 103*9880d681SAndroid Build Coastguard Worker fcmpd %f0, %f4 104*9880d681SAndroid Build Coastguard Worker fcmpq %f0, %f4 105*9880d681SAndroid Build Coastguard Worker 106*9880d681SAndroid Build Coastguard Worker ! CHECK: fcmpes %f0, %f4 ! encoding: [0x81,0xa8,0x0a,0xa4] 107*9880d681SAndroid Build Coastguard Worker ! CHECK: fcmped %f0, %f4 ! encoding: [0x81,0xa8,0x0a,0xc4] 108*9880d681SAndroid Build Coastguard Worker ! CHECK: fcmpeq %f0, %f4 ! encoding: [0x81,0xa8,0x0a,0xe4] 109*9880d681SAndroid Build Coastguard Worker fcmpes %f0, %f4 110*9880d681SAndroid Build Coastguard Worker fcmped %f0, %f4 111*9880d681SAndroid Build Coastguard Worker fcmpeq %f0, %f4 112*9880d681SAndroid Build Coastguard Worker 113*9880d681SAndroid Build Coastguard Worker ! CHECK: fcmps %fcc2, %f0, %f4 ! encoding: [0x85,0xa8,0x0a,0x24] 114*9880d681SAndroid Build Coastguard Worker ! CHECK: fcmpd %fcc2, %f0, %f4 ! encoding: [0x85,0xa8,0x0a,0x44] 115*9880d681SAndroid Build Coastguard Worker ! CHECK: fcmpq %fcc2, %f0, %f4 ! encoding: [0x85,0xa8,0x0a,0x64] 116*9880d681SAndroid Build Coastguard Worker fcmps %fcc2, %f0, %f4 117*9880d681SAndroid Build Coastguard Worker fcmpd %fcc2, %f0, %f4 118*9880d681SAndroid Build Coastguard Worker fcmpq %fcc2, %f0, %f4 119*9880d681SAndroid Build Coastguard Worker 120*9880d681SAndroid Build Coastguard Worker ! CHECK: fcmpes %fcc2, %f0, %f4 ! encoding: [0x85,0xa8,0x0a,0xa4] 121*9880d681SAndroid Build Coastguard Worker ! CHECK: fcmped %fcc2, %f0, %f4 ! encoding: [0x85,0xa8,0x0a,0xc4] 122*9880d681SAndroid Build Coastguard Worker ! CHECK: fcmpeq %fcc2, %f0, %f4 ! encoding: [0x85,0xa8,0x0a,0xe4] 123*9880d681SAndroid Build Coastguard Worker fcmpes %fcc2, %f0, %f4 124*9880d681SAndroid Build Coastguard Worker fcmped %fcc2, %f0, %f4 125*9880d681SAndroid Build Coastguard Worker fcmpeq %fcc2, %f0, %f4 126*9880d681SAndroid Build Coastguard Worker 127*9880d681SAndroid Build Coastguard Worker ! CHECK: fxtos %f0, %f4 ! encoding: [0x89,0xa0,0x10,0x80] 128*9880d681SAndroid Build Coastguard Worker ! CHECK: fxtod %f0, %f4 ! encoding: [0x89,0xa0,0x11,0x00] 129*9880d681SAndroid Build Coastguard Worker ! CHECK: fxtoq %f0, %f4 ! encoding: [0x89,0xa0,0x11,0x80] 130*9880d681SAndroid Build Coastguard Worker fxtos %f0, %f4 131*9880d681SAndroid Build Coastguard Worker fxtod %f0, %f4 132*9880d681SAndroid Build Coastguard Worker fxtoq %f0, %f4 133*9880d681SAndroid Build Coastguard Worker 134*9880d681SAndroid Build Coastguard Worker ! CHECK: fstox %f0, %f4 ! encoding: [0x89,0xa0,0x10,0x20] 135*9880d681SAndroid Build Coastguard Worker ! CHECK: fdtox %f0, %f4 ! encoding: [0x89,0xa0,0x10,0x40] 136*9880d681SAndroid Build Coastguard Worker ! CHECK: fqtox %f0, %f4 ! encoding: [0x89,0xa0,0x10,0x60] 137*9880d681SAndroid Build Coastguard Worker fstox %f0, %f4 138*9880d681SAndroid Build Coastguard Worker fdtox %f0, %f4 139*9880d681SAndroid Build Coastguard Worker fqtox %f0, %f4 140*9880d681SAndroid Build Coastguard Worker 141*9880d681SAndroid Build Coastguard Worker ! CHECK: ld [%l0], %f29 ! encoding: [0xfb,0x04,0x00,0x00] 142*9880d681SAndroid Build Coastguard Worker ! CHECK: ldd [%l0], %f48 ! encoding: [0xe3,0x1c,0x00,0x00] 143*9880d681SAndroid Build Coastguard Worker ld [%l0], %f29 144*9880d681SAndroid Build Coastguard Worker ldd [%l0], %f48 145*9880d681SAndroid Build Coastguard Worker 146*9880d681SAndroid Build Coastguard Worker ! CHECK: st %f29, [%l0] ! encoding: [0xfb,0x24,0x00,0x00] 147*9880d681SAndroid Build Coastguard Worker ! CHECK: std %f48, [%l0] ! encoding: [0xe3,0x3c,0x00,0x00] 148*9880d681SAndroid Build Coastguard Worker st %f29, [%l0] 149*9880d681SAndroid Build Coastguard Worker std %f48, [%l0] 150*9880d681SAndroid Build Coastguard Worker 151*9880d681SAndroid Build Coastguard Worker ! CHECK: std %fq, [%o4] ! encoding: [0xc1,0x33,0x00,0x00] 152*9880d681SAndroid Build Coastguard Worker ! CHECK: std %fq, [%l1+62] ! encoding: [0xc1,0x34,0x60,0x3e] 153*9880d681SAndroid Build Coastguard Worker ! CHECK: std %fq, [%i3+%l7] ! encoding: [0xc1,0x36,0xc0,0x17] 154*9880d681SAndroid Build Coastguard Worker std %fq, [%o4] 155*9880d681SAndroid Build Coastguard Worker std %fq, [%l1+62] 156*9880d681SAndroid Build Coastguard Worker std %fq, [%i3+%l7] 157*9880d681SAndroid Build Coastguard Worker