reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
@ RUN: llvm-mc -triple armv7-eabi -filetype asm -o - %s | FileCheck %s
@ RUN: llvm-mc -triple armv7-eabi -filetype obj -o - %s | llvm-readobj -r \
@ RUN:   | FileCheck -check-prefix CHECK-RELOCATIONS %s

	.syntax unified

	.type function,%function
function:
	bx lr

	.global external
	.type external,%function

.set deadbeat, 0xdeadbea7

	.type test,%function
test:
	movw r0, :lower16:function
	movt r0, :upper16:function

	movw r1, #:lower16:function
	movt r1, #:upper16:function

	movw r2, :lower16:deadbeat
	movt r2, :upper16:deadbeat

	movw r3, #:lower16:deadbeat
	movt r3, #:upper16:deadbeat

	movw r4, :lower16:0xD1510D6E
	movt r4, :upper16:0xD1510D6E

	movw r5, #:lower16:0xD1510D6E
	movt r5, #:upper16:0xD1510D6E

	movw r0, :lower16:external
	movt r0, :upper16:external

	movw r1, #:lower16:external
	movt r1, #:upper16:external

	movw r2, #:lower16:(16 + 16)
	movt r2, #:upper16:(16 + 16)

	movw r3, :lower16:(16 + 16)
	movt r3, :upper16:(16 + 16)

@ CHECK-LABEL: test:
@ CHECK: 	movw r0, :lower16:function
@ CHECK: 	movt r0, :upper16:function
@ CHECK: 	movw r1, :lower16:function
@ CHECK: 	movt r1, :upper16:function
@ CHECK: 	movw r2, :lower16:(3735928487)
@ CHECK: 	movt r2, :upper16:(3735928487)
@ CHECK: 	movw r3, :lower16:(3735928487)
@ CHECK: 	movt r3, :upper16:(3735928487)
@ CHECK: 	movw r4, :lower16:(3511749998)
@ CHECK: 	movt r4, :upper16:(3511749998)
@ CHECK: 	movw r5, :lower16:(3511749998)
@ CHECK: 	movt r5, :upper16:(3511749998)
@ CHECK: 	movw r0, :lower16:external
@ CHECK: 	movt r0, :upper16:external
@ CHECK: 	movw r1, :lower16:external
@ CHECK: 	movt r1, :upper16:external
@ CHECK: 	movw r2, :lower16:(32)
@ CHECK: 	movt r2, :upper16:(32)
@ CHECK: 	movw r3, :lower16:(32)
@ CHECK: 	movt r3, :upper16:(32)

@ CHECK-RELOCATIONS: Relocations [
@ CHECK-RELOCATIONS:   0x4 R_ARM_MOVW_ABS_NC function 0x0
@ CHECK-RELOCATIONS:   0x8 R_ARM_MOVT_ABS function 0x0
@ CHECK-RELOCATIONS:   0xC R_ARM_MOVW_ABS_NC function 0x0
@ CHECK-RELOCATIONS:   0x10 R_ARM_MOVT_ABS function 0x0
@ CHECK-RELOCATIONS:   0x34 R_ARM_MOVW_ABS_NC external 0x0
@ CHECK-RELOCATIONS:   0x38 R_ARM_MOVT_ABS external 0x0
@ CHECK-RELOCATIONS:   0x3C R_ARM_MOVW_ABS_NC external 0x0
@ CHECK-RELOCATIONS:   0x40 R_ARM_MOVT_ABS external 0x0
@ CHECK-RELOCATIONS: ]