File: inst-rjmp.s

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (60 lines) | stat: -rw-r--r-- 2,323 bytes parent folder | download | duplicates (3)
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
; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s
;
; RUN: llvm-mc -filetype=obj -triple avr < %s \
; RUN:     | llvm-objdump -d - \
; RUN:     | FileCheck --check-prefix=INST %s

foo:
  rjmp  .+2
  rjmp  .-2
  rjmp  foo
  rjmp  .+8
  rjmp  end
  rjmp  .+0

end:
  rjmp .-4
  rjmp .-6

x:
  rjmp x
  .short 0xc00f
  rjmp .+4094

; CHECK: rjmp (.Ltmp0+2)+2    ; encoding: [A,0b1100AAAA]
; CHECK-NEXT:                 ;   fixup A - offset: 0, value: (.Ltmp0+2)+2, kind: fixup_13_pcrel
; CHECK: rjmp (.Ltmp1-2)+2    ; encoding: [A,0b1100AAAA]
; CHECK-NEXT:                 ;   fixup A - offset: 0, value: (.Ltmp1-2)+2, kind: fixup_13_pcrel
; CHECK: rjmp foo             ; encoding: [A,0b1100AAAA]
; CHECK-NEXT:                 ;   fixup A - offset: 0, value: foo, kind: fixup_13_pcrel
; CHECK: rjmp (.Ltmp2+8)+2    ; encoding: [A,0b1100AAAA]
; CHECK-NEXT:                 ;   fixup A - offset: 0, value: (.Ltmp2+8)+2, kind: fixup_13_pcrel
; CHECK: rjmp end             ; encoding: [A,0b1100AAAA]
; CHECK-NEXT:                 ;   fixup A - offset: 0, value: end, kind: fixup_13_pcrel
; CHECK: rjmp (.Ltmp3+0)+2    ; encoding: [A,0b1100AAAA]
; CHECK-NEXT:                 ;   fixup A - offset: 0, value: (.Ltmp3+0)+2, kind: fixup_13_pcrel
; CHECK: rjmp (.Ltmp4-4)+2    ; encoding: [A,0b1100AAAA]
; CHECK-NEXT:                 ;   fixup A - offset: 0, value: (.Ltmp4-4)+2, kind: fixup_13_pcrel
; CHECK: rjmp (.Ltmp5-6)+2    ; encoding: [A,0b1100AAAA]
; CHECK-NEXT:                 ;   fixup A - offset: 0, value: (.Ltmp5-6)+2, kind: fixup_13_pcrel
; CHECK: rjmp x               ; encoding: [A,0b1100AAAA]
; CHECK-NEXT:                 ;   fixup A - offset: 0, value: x, kind: fixup_13_pcrel
; CHECK: rjmp (.Ltmp6+4094)+2 ; encoding: [A,0b1100AAAA]
; CHECK-NEXT:                 ;   fixup A - offset: 0, value: (.Ltmp6+4094)+2, kind: fixup_13_pcrel

; INST-LABEL: <foo>:
; INST-NEXT: 01 c0      rjmp  .+2
; INST-NEXT: ff cf      rjmp  .-2
; INST-NEXT: fd cf      rjmp  .-6
; INST-NEXT: 04 c0      rjmp  .+8
; INST-NEXT: 01 c0      rjmp  .+2
; INST-NEXT: 00 c0      rjmp  .+0
; INST-EMPTY:
; INST-LABEL: <end>:
; INST-NEXT: fe cf      rjmp  .-4
; INST-NEXT: fd cf      rjmp  .-6
; INST-EMPTY:
; INST-LABEL: <x>:
; INST-NEXT: ff cf      rjmp  .-2
; INST-NEXT: 0f c0      rjmp  .+30
; INST-NEXT: ff c7      rjmp  .+4094