• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llvm-mc %s -triple=mips64-unknown-linux -show-encoding -mcpu=mips3 | \
2# RUN:   FileCheck %s
3
4.option pic2
5dla $5, symbol        # CHECK: ld $5, %got_disp(symbol)($gp)   # encoding: [0xdf,0x85,A,A]
6                      # CHECK:                                 #   fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
7dla $5, symbol($6)    # CHECK: ld $5, %got_disp(symbol)($gp)   # encoding: [0xdf,0x85,A,A]
8                      # CHECK:                                 #   fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
9                      # CHECK: daddu $5, $5, $6                # encoding: [0x00,0xa6,0x28,0x2d]
10dla $6, symbol($6)    # CHECK: ld $1, %got_disp(symbol)($gp)   # encoding: [0xdf,0x81,A,A]
11                      # CHECK:                                 #   fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
12                      # CHECK: daddu $6, $1, $6                # encoding: [0x00,0x26,0x30,0x2d]
13dla $5, symbol+8      # CHECK: ld $5, %got_disp(symbol)($gp)   # encoding: [0xdf,0x85,A,A]
14                      # CHECK:                                 #   fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
15                      # CHECK: daddiu $5, $5, 8                # encoding: [0x64,0xa5,0x00,0x08]
16dla $5, symbol+8($6)  # CHECK: ld $5, %got_disp(symbol)($gp)   # encoding: [0xdf,0x85,A,A]
17                      # CHECK:                                 #   fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
18                      # CHECK: daddiu $5, $5, 8                # encoding: [0x64,0xa5,0x00,0x08]
19                      # CHECK: daddu $5, $5, $6                # encoding: [0x00,0xa6,0x28,0x2d]
20dla $6, symbol+8($6)  # CHECK: ld $1, %got_disp(symbol)($gp)   # encoding: [0xdf,0x81,A,A]
21                      # CHECK:                                 #   fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
22                      # CHECK: daddiu $1, $1, 8                # encoding: [0x64,0x21,0x00,0x08]
23                      # CHECK: daddu $6, $1, $6                # encoding: [0x00,0x26,0x30,0x2d]
24dla $5, 1f            # CHECK: ld $5, %got_disp(.Ltmp0)($gp)   # encoding: [0xdf,0x85,A,A]
25                      # CHECK:                                 #   fixup A - offset: 0, value: %got_disp(.Ltmp0), kind: fixup_Mips_GOT_DISP
261:
27
28# PIC expansions involving $25 are special.
29dla $25, symbol       # CHECK: ld $25, %call16(symbol)($gp)     # encoding: [0xdf,0x99,A,A]
30                      # CHECK:                                  #   fixup A - offset: 0, value: %call16(symbol), kind: fixup_Mips_CALL16
31dla $25, symbol($6)   # CHECK: ld $25, %got_disp(symbol)($gp)   # encoding: [0xdf,0x99,A,A]
32                      # CHECK:                                  #   fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
33                      # CHECK: daddu $25, $25, $6               # encoding: [0x03,0x26,0xc8,0x2d]
34dla $25, symbol($25)  # CHECK: ld $1, %got_disp(symbol)($gp)    # encoding: [0xdf,0x81,A,A]
35                      # CHECK:                                  #   fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
36                      # CHECK: daddu $25, $1, $25               # encoding: [0x00,0x39,0xc8,0x2d]
37dla $25, symbol+8     # CHECK: ld $25, %got_disp(symbol)($gp)   # encoding: [0xdf,0x99,A,A]
38                      # CHECK:                                  #   fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
39                      # CHECK: daddiu $25, $25, 8               # encoding: [0x67,0x39,0x00,0x08]
40dla $25, symbol+8($6) # CHECK: ld $25, %got_disp(symbol)($gp)   # encoding: [0xdf,0x99,A,A]
41                      # CHECK:                                  #   fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
42                      # CHECK: daddiu $25, $25, 8               # encoding: [0x67,0x39,0x00,0x08]
43                      # CHECK: daddu $25, $25, $6               # encoding: [0x03,0x26,0xc8,0x2d]
44dla $25, symbol+8($25)# CHECK: ld $1, %got_disp(symbol)($gp)    # encoding: [0xdf,0x81,A,A]
45                      # CHECK:                                  #   fixup A - offset: 0, value: %got_disp(symbol), kind: fixup_Mips_GOT_DISP
46                      # CHECK: daddiu $1, $1, 8                 # encoding: [0x64,0x21,0x00,0x08]
47                      # CHECK: daddu $25, $1, $25               # encoding: [0x00,0x39,0xc8,0x2d]
48dla $25, 1f           # CHECK: ld $25, %got_disp(.Ltmp1)($gp)    # encoding: [0xdf,0x99,A,A]
49                      # CHECK:                                  #   fixup A - offset: 0, value: %got_disp(.Ltmp1), kind: fixup_Mips_GOT_DISP
501:
51