brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · 81a599d Raw
58 lines · plain
1// RUN: llvm-mc -triple=thumbv7 -show-encoding < %s 2>/dev/null | FileCheck --check-prefix=CHECK-NONARM %s2// RUN: llvm-mc -triple=thumbv8 -show-encoding < %s 2>/dev/null | FileCheck --check-prefix=CHECK-NONARM %s3// RUN: llvm-mc -triple=armv7 -show-encoding < %s 2>/dev/null | FileCheck --check-prefix=CHECK-ARM %s4 5        // lsl #0 is actually mov, so here we check that it behaves the same as6        // mov with regards to the permitted registers and how it behaves in an7        // IT block.8 9        // Non-flags-setting with only one of source and destination SP should10        // be OK11        lsl sp, r0, #012        lsl r0, sp, #013 14// CHECK-NONARM: mov.w sp, r0           @ encoding: [0x4f,0xea,0x00,0x0d]15// CHECK-NONARM: mov.w r0, sp           @ encoding: [0x4f,0xea,0x0d,0x00]16 17// CHECK-ARM: mov sp, r0                @ encoding: [0x00,0xd0,0xa0,0xe1]18// CHECK-ARM: mov r0, sp                @ encoding: [0x0d,0x00,0xa0,0xe1]19 20        //FIXME: pre-ARMv8 we give an error for these instructions21        //mov sp, r0, lsl #022        //mov r0, sp, lsl #023 24        // LSL #0 in IT block should select the 32-bit encoding25        itt eq26        lsleq  r0, r1, #027        lslseq r0, r1, #028        itt gt29        lslgt  r0, r1, #030        lslsgt r0, r1, #031 32// CHECK-NONARM: moveq.w r0, r1         @ encoding: [0x4f,0xea,0x01,0x00]33// CHECK-NONARM: movseq.w r0, r1        @ encoding: [0x5f,0xea,0x01,0x00]34// CHECK-NONARM: movgt.w r0, r1         @ encoding: [0x4f,0xea,0x01,0x00]35// CHECK-NONARM: movsgt.w r0, r1        @ encoding: [0x5f,0xea,0x01,0x00]36 37// CHECK-ARM: moveq r0, r1              @ encoding: [0x01,0x00,0xa0,0x01]38// CHECK-ARM: movseq r0, r1             @ encoding: [0x01,0x00,0xb0,0x01]39// CHECK-ARM: movgt r0, r1              @ encoding: [0x01,0x00,0xa0,0xc1]40// CHECK-ARM: movsgt r0, r1             @ encoding: [0x01,0x00,0xb0,0xc1]41 42        itt eq43        moveq  r0, r1, lsl #044        movseq r0, r1, lsl #045        itt gt46        movgt  r0, r1, lsl #047        movsgt r0, r1, lsl #048 49// CHECK-NONARM: moveq.w r0, r1         @ encoding: [0x4f,0xea,0x01,0x00]50// CHECK-NONARM: movseq.w r0, r1        @ encoding: [0x5f,0xea,0x01,0x00]51// CHECK-NONARM: movgt.w r0, r1         @ encoding: [0x4f,0xea,0x01,0x00]52// CHECK-NONARM: movsgt.w r0, r1        @ encoding: [0x5f,0xea,0x01,0x00]53 54// CHECK-ARM: moveq r0, r1              @ encoding: [0x01,0x00,0xa0,0x01]55// CHECK-ARM: movseq r0, r1             @ encoding: [0x01,0x00,0xb0,0x01]56// CHECK-ARM: movgt r0, r1              @ encoding: [0x01,0x00,0xa0,0xc1]57// CHECK-ARM: movsgt r0, r1             @ encoding: [0x01,0x00,0xb0,0xc1]58