1@ RUN: not llvm-mc %s -triple thumbv7-linux-gnueabi -filetype=obj -o /dev/null 2>&1 | FileCheck %s 2@ RUN: not llvm-mc %s -triple thumbv8-m.baseline-none-eabi -filetype=obj -o /dev/null 2>&1 | FileCheck %s 3@ RUN: not llvm-mc %s -triple thumbv8-m.mainline-none-eabi -filetype=obj -o /dev/null 2>&1 | FileCheck %s 4@ RUN: not llvm-mc %s -triple thumbv6m-none-eabi -filetype=obj -o /dev/null 2>&1 | FileCheck %s 5@ RUN: not llvm-mc %s -triple thumbv5-linux-gnueabi -filetype=obj -o /dev/null 2>&1 | FileCheck -check-prefix=CHECKSHORT %s 6 7// Thumb BL has range +- 4 Megabytes if CPU does not support Thumb2 or does not 8// have v8-M baseline ops, it is +- 16 Megabytes otherwise. 9 10 .code 16 11 bl shortend 12 .space 0x3fffff 13shortend: 14// CHECKSHORT-NOT: error 15// CHECKSHORT: [[@LINE+1]]:{{[0-9]}}: error: Relocation out of range 16 bl shortend2 17 .space 0x400000 18shortend2: 19 20// CHECKSHORT: [[@LINE+1]]:{{[0-9]}}: error: Relocation out of range 21 bl end 22 .space 0xffffff 23end: 24 bl end2 25 .space 0xffffff 26 .global end2 27end2: 28 29 bl end3 30 .space 0x1000000 31 .global end3 32end3: 33 34// CHECK-NOT: error 35// CHECKSHORT-NOT: error 36// CHECKSHORT: [[@LINE+2]]:{{[0-9]}}: error: Relocation out of range 37// CHECK: [[@LINE+1]]:{{[0-9]}}: error: Relocation out of range 38 bl end4 39 .space 0x1000000 40end4: 41 42shortstart1: 43 .space 0x3ffffc 44 bl shortstart1 45 46shortstart2: 47 .space 0x400000 48// CHECKSHORT: [[@LINE+1]]:{{[0-9]}}: error: Relocation out of range 49 bl shortstart2 50 51start1: 52 .space 0xfffffc 53// CHECKSHORT: [[@LINE+1]]:{{[0-9]}}: error: Relocation out of range 54 bl start1 55 56 .global start2 57start2: 58 .space 0xfffffc 59 bl start2 60 61 .global start3 62start3: 63 .space 0xfffffd 64 bl start3 65 66// CHECK-NOT: error 67start4: 68 .space 0xfffffd 69// CHECK: [[@LINE+2]]:{{[0-9]}}: error: Relocation out of range 70// CHECKSHORT: [[@LINE+1]]:{{[0-9]}}: error: Relocation out of range 71 bl start4 72