brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.9 KiB · f02017d Raw
150 lines · plain
1// RUN: not llvm-mc -triple aarch64 -mattr +brbe -show-encoding %s 2>%t | FileCheck %s2// RUN: FileCheck --check-prefix=ERROR %s < %t3// RUN: not llvm-mc -triple aarch64 -show-encoding %s 2>%t4// RUN: FileCheck --check-prefix=ERROR-NO-BRBE %s < %t5 6msr BRBCR_EL1, x07mrs x1, BRBCR_EL18// CHECK: msr     BRBCR_EL1, x0           // encoding: [0x00,0x90,0x11,0xd5]9// CHECK: mrs     x1, BRBCR_EL1           // encoding: [0x01,0x90,0x31,0xd5]10// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register11// ERROR-NO-BRBE: [[@LINE-4]]:9: error: expected readable system register12 13msr BRBCR_EL12, x214mrs x3, BRBCR_EL1215// CHECK: msr     BRBCR_EL12, x2          // encoding: [0x02,0x90,0x15,0xd5]16// CHECK: mrs     x3, BRBCR_EL12          // encoding: [0x03,0x90,0x35,0xd5]17// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register18// ERROR-NO-BRBE: [[@LINE-4]]:9: error: expected readable system register19 20msr BRBCR_EL2, x421mrs x5, BRBCR_EL222// CHECK: msr     BRBCR_EL2, x4           // encoding: [0x04,0x90,0x14,0xd5]23// CHECK: mrs     x5, BRBCR_EL2           // encoding: [0x05,0x90,0x34,0xd5]24// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register25// ERROR-NO-BRBE: [[@LINE-4]]:9: error: expected readable system register26 27msr BRBFCR_EL1, x628mrs x7, BRBFCR_EL129// CHECK: msr     BRBFCR_EL1, x6          // encoding: [0x26,0x90,0x11,0xd5]30// CHECK: mrs     x7, BRBFCR_EL1          // encoding: [0x27,0x90,0x31,0xd5]31// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register32// ERROR-NO-BRBE: [[@LINE-4]]:9: error: expected readable system register33 34msr BRBIDR0_EL1, x835mrs x9, BRBIDR0_EL136// ERROR: [[@LINE-2]]:5: error: expected writable system register37// CHECK: mrs     x9, BRBIDR0_EL1         // encoding: [0x09,0x92,0x31,0xd5]38// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register39// ERROR-NO-BRBE: [[@LINE-4]]:9: error: expected readable system register40 41msr BRBINFINJ_EL1, x1042mrs x11, BRBINFINJ_EL143// CHECK: msr     BRBINFINJ_EL1, x10      // encoding: [0x0a,0x91,0x11,0xd5]44// CHECK: mrs     x11, BRBINFINJ_EL1      // encoding: [0x0b,0x91,0x31,0xd5]45// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register46// ERROR-NO-BRBE: [[@LINE-4]]:10: error: expected readable system register47 48msr BRBSRCINJ_EL1, x1249mrs x13, BRBSRCINJ_EL150// CHECK: msr     BRBSRCINJ_EL1, x12      // encoding: [0x2c,0x91,0x11,0xd5]51// CHECK: mrs     x13, BRBSRCINJ_EL1      // encoding: [0x2d,0x91,0x31,0xd5]52// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register53// ERROR-NO-BRBE: [[@LINE-4]]:10: error: expected readable system register54 55msr BRBTGTINJ_EL1, x1456mrs x15, BRBTGTINJ_EL157// CHECK: msr     BRBTGTINJ_EL1, x14      // encoding: [0x4e,0x91,0x11,0xd5]58// CHECK: mrs     x15, BRBTGTINJ_EL1      // encoding: [0x4f,0x91,0x31,0xd5]59// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register60// ERROR-NO-BRBE: [[@LINE-4]]:10: error: expected readable system register61 62msr BRBTS_EL1, x1663mrs x17, BRBTS_EL164// CHECK: msr     BRBTS_EL1, x16          // encoding: [0x50,0x90,0x11,0xd5]65// CHECK: mrs     x17, BRBTS_EL1          // encoding: [0x51,0x90,0x31,0xd5]66// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register67// ERROR-NO-BRBE: [[@LINE-4]]:10: error: expected readable system register68 69// Rather than testing all 32 registers in the three BRBINF/BRBSRC/BRBTGT70// families, I'll test a representative sample, including all bits clear,71// all bits set, each bit set individually, and a couple of intermediate72// patterns.73 74msr BRBINF0_EL1, x1875mrs x19, BRBINF0_EL176// ERROR: [[@LINE-2]]:5: error: expected writable system register77// CHECK: mrs     x19, BRBINF0_EL1        // encoding: [0x13,0x80,0x31,0xd5]78// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register79// ERROR-NO-BRBE: [[@LINE-4]]:10: error: expected readable system register80 81msr BRBINF1_EL1, x2082mrs x21, BRBINF1_EL183// ERROR: [[@LINE-2]]:5: error: expected writable system register84// CHECK: mrs     x21, BRBINF1_EL1        // encoding: [0x15,0x81,0x31,0xd5]85// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register86// ERROR-NO-BRBE: [[@LINE-4]]:10: error: expected readable system register87 88msr BRBINF2_EL1, x2289mrs x23, BRBINF2_EL190// ERROR: [[@LINE-2]]:5: error: expected writable system register91// CHECK: mrs     x23, BRBINF2_EL1        // encoding: [0x17,0x82,0x31,0xd5]92// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register93// ERROR-NO-BRBE: [[@LINE-4]]:10: error: expected readable system register94 95msr BRBSRC4_EL1, x2496mrs x25, BRBSRC4_EL197// ERROR: [[@LINE-2]]:5: error: expected writable system register98// CHECK: mrs     x25, BRBSRC4_EL1        // encoding: [0x39,0x84,0x31,0xd5]99// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register100// ERROR-NO-BRBE: [[@LINE-4]]:10: error: expected readable system register101 102msr BRBSRC8_EL1, x26103mrs x27, BRBSRC8_EL1104// ERROR: [[@LINE-2]]:5: error: expected writable system register105// CHECK: mrs     x27, BRBSRC8_EL1        // encoding: [0x3b,0x88,0x31,0xd5]106// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register107// ERROR-NO-BRBE: [[@LINE-4]]:10: error: expected readable system register108 109msr BRBSRC16_EL1, x28110mrs x29, BRBSRC16_EL1111// ERROR: [[@LINE-2]]:5: error: expected writable system register112// CHECK: mrs     x29, BRBSRC16_EL1       // encoding: [0xbd,0x80,0x31,0xd5]113// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register114// ERROR-NO-BRBE: [[@LINE-4]]:10: error: expected readable system register115 116msr BRBTGT10_EL1, x0117mrs x1, BRBTGT10_EL1118// ERROR: [[@LINE-2]]:5: error: expected writable system register119// CHECK: mrs     x1, BRBTGT10_EL1        // encoding: [0x41,0x8a,0x31,0xd5]120// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register121// ERROR-NO-BRBE: [[@LINE-4]]:9: error: expected readable system register122 123msr BRBTGT21_EL1, x2124mrs x3, BRBTGT21_EL1125// ERROR: [[@LINE-2]]:5: error: expected writable system register126// CHECK: mrs     x3, BRBTGT21_EL1        // encoding: [0xc3,0x85,0x31,0xd5]127// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register128// ERROR-NO-BRBE: [[@LINE-4]]:9: error: expected readable system register129 130msr BRBTGT31_EL1, x4131mrs x5, BRBTGT31_EL1132// ERROR: [[@LINE-2]]:5: error: expected writable system register133// CHECK: mrs     x5, BRBTGT31_EL1        // encoding: [0xc5,0x8f,0x31,0xd5]134// ERROR-NO-BRBE: [[@LINE-4]]:5: error: expected writable system register135// ERROR-NO-BRBE: [[@LINE-4]]:9: error: expected readable system register136 137brb iall138brb inj139// CHECK: brb iall  // encoding: [0x9f,0x72,0x09,0xd5]140// CHECK: brb inj   // encoding: [0xbf,0x72,0x09,0xd5]141// ERROR-NO-BRBE: [[@LINE-4]]:1: error: instruction requires: brbe142// ERROR-NO-BRBE: [[@LINE-4]]:1: error: instruction requires: brbe143 144brb IALL145brb INJ146// CHECK: brb iall  // encoding: [0x9f,0x72,0x09,0xd5]147// CHECK: brb inj   // encoding: [0xbf,0x72,0x09,0xd5]148// ERROR-NO-BRBE: [[@LINE-4]]:1: error: instruction requires: brbe149// ERROR-NO-BRBE: [[@LINE-4]]:1: error: instruction requires: brbe150