1# RUN: llvm-mc -triple mblaze-unknown-unknown -show-encoding %s | FileCheck %s 2 3# Test to ensure that all FPU instructions can be parsed by the 4# assembly parser correctly. 5 6# TYPE A: OPCODE RD RA RB FLAGS 7# BINARY: 011011 00000 00000 00000 00000000000 8 9# CHECK: fadd 10# BINARY: 010110 00000 00001 00010 00000000000 11# CHECK: encoding: [0x58,0x01,0x10,0x00] 12 fadd r0, r1, r2 13 14# CHECK: frsub 15# BINARY: 010110 00000 00001 00010 00010000000 16# CHECK: encoding: [0x58,0x01,0x10,0x80] 17 frsub r0, r1, r2 18 19# CHECK: fmul 20# BINARY: 010110 00000 00001 00010 00100000000 21# CHECK: encoding: [0x58,0x01,0x11,0x00] 22 fmul r0, r1, r2 23 24# CHECK: fdiv 25# BINARY: 010110 00000 00001 00010 00110000000 26# CHECK: encoding: [0x58,0x01,0x11,0x80] 27 fdiv r0, r1, r2 28 29# CHECK: fsqrt 30# BINARY: 010110 00000 00001 00000 01110000000 31# CHECK: encoding: [0x58,0x01,0x03,0x80] 32 fsqrt r0, r1 33 34# CHECK: fint 35# BINARY: 010110 00000 00001 00000 01100000000 36# CHECK: encoding: [0x58,0x01,0x03,0x00] 37 fint r0, r1 38 39# CHECK: flt 40# BINARY: 010110 00000 00001 00000 01010000000 41# CHECK: encoding: [0x58,0x01,0x02,0x80] 42 flt r0, r1 43 44# CHECK: fcmp.un 45# BINARY: 010110 00000 00001 00010 01000000000 46# CHECK: encoding: [0x58,0x01,0x12,0x00] 47 fcmp.un r0, r1, r2 48 49# CHECK: fcmp.lt 50# BINARY: 010110 00000 00001 00010 01000010000 51# CHECK: encoding: [0x58,0x01,0x12,0x10] 52 fcmp.lt r0, r1, r2 53 54# CHECK: fcmp.eq 55# BINARY: 010110 00000 00001 00010 01000100000 56# CHECK: encoding: [0x58,0x01,0x12,0x20] 57 fcmp.eq r0, r1, r2 58 59# CHECK: fcmp.le 60# BINARY: 010110 00000 00001 00010 01000110000 61# CHECK: encoding: [0x58,0x01,0x12,0x30] 62 fcmp.le r0, r1, r2 63 64# CHECK: fcmp.gt 65# BINARY: 010110 00000 00001 00010 01001000000 66# CHECK: encoding: [0x58,0x01,0x12,0x40] 67 fcmp.gt r0, r1, r2 68 69# CHECK: fcmp.ne 70# BINARY: 010110 00000 00001 00010 01001010000 71# CHECK: encoding: [0x58,0x01,0x12,0x50] 72 fcmp.ne r0, r1, r2 73 74# CHECK: fcmp.ge 75# BINARY: 010110 00000 00001 00010 01001100000 76# CHECK: encoding: [0x58,0x01,0x12,0x60] 77 fcmp.ge r0, r1, r2 78