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
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130
  131
  132
  133
  134
  135
  136
  137
  138
  139
  140
  141
  142
  143
  144
  145
  146
  147
  148
  149
  150
  151
  152
  153
  154
  155
  156
  157
  158
  159
  160
  161
  162
  163
  164
  165
  166
  167
; RUN: llc -march=mipsel -mcpu=mips32r6 -relocation-model=pic < %s | FileCheck %s -check-prefixes=ALL,09BIT
; RUN: llc -march=mipsel -mattr=+micromips -relocation-model=pic < %s | FileCheck %s -check-prefixes=ALL,12BIT
; RUN: llc -march=mipsel -relocation-model=pic < %s | FileCheck %s -check-prefixes=ALL,16BIT

@data = global [8193 x i32] zeroinitializer

define void @ZC(i32 *%p) nounwind {
entry:
  ; ALL-LABEL: ZC:

  call void asm sideeffect "lw $$1, $0", "*^ZC,~{$1}"(i32* getelementptr inbounds ([8193 x i32], [8193 x i32]* @data, i32 0, i32 0))

  ; ALL: lw $[[BASEPTR:[0-9]+]], %got(data)(
  ; ALL: #APP
  ; ALL: lw $1, 0($[[BASEPTR]])
  ; ALL: #NO_APP

  ret void
}

define void @ZC_offset_n4(i32 *%p) nounwind {
entry:
  ; ALL-LABEL: ZC_offset_n4:

  call void asm sideeffect "lw $$1, $0", "*^ZC,~{$1}"(i32* getelementptr inbounds ([8193 x i32], [8193 x i32]* @data, i32 0, i32 -1))

  ; ALL: lw $[[BASEPTR:[0-9]+]], %got(data)(
  ; ALL: #APP
  ; ALL: lw $1, -4($[[BASEPTR]])
  ; ALL: #NO_APP

  ret void
}

define void @ZC_offset_4(i32 *%p) nounwind {
entry:
  ; ALL-LABEL: ZC_offset_4:

  call void asm sideeffect "lw $$1, $0", "*^ZC,~{$1}"(i32* getelementptr inbounds ([8193 x i32], [8193 x i32]* @data, i32 0, i32 1))

  ; ALL: lw $[[BASEPTR:[0-9]+]], %got(data)(
  ; ALL: #APP
  ; ALL: lw $1, 4($[[BASEPTR]])
  ; ALL: #NO_APP

  ret void
}

define void @ZC_offset_252(i32 *%p) nounwind {
entry:
  ; ALL-LABEL: ZC_offset_252:

  call void asm sideeffect "lw $$1, $0", "*^ZC,~{$1}"(i32* getelementptr inbounds ([8193 x i32], [8193 x i32]* @data, i32 0, i32 63))

  ; ALL: lw $[[BASEPTR:[0-9]+]], %got(data)(
  ; ALL: #APP
  ; ALL: lw $1, 252($[[BASEPTR]])
  ; ALL: #NO_APP

  ret void
}

define void @ZC_offset_256(i32 *%p) nounwind {
entry:
  ; ALL-LABEL: ZC_offset_256:

  call void asm sideeffect "lw $$1, $0", "*^ZC,~{$1}"(i32* getelementptr inbounds ([8193 x i32], [8193 x i32]* @data, i32 0, i32 64))

  ; ALL: lw $[[BASEPTR:[0-9]+]], %got(data)(

  ; 09BIT: addiu $[[BASEPTR2:[0-9]+]], $[[BASEPTR]], 256

  ; ALL: #APP

  ; 09BIT: lw $1, 0($[[BASEPTR2]])
  ; 12BIT: lw $1, 256($[[BASEPTR]])
  ; 16BIT: lw $1, 256($[[BASEPTR]])

  ; ALL: #NO_APP

  ret void
}

define void @ZC_offset_2044(i32 *%p) nounwind {
entry:
  ; ALL-LABEL: ZC_offset_2044:

  call void asm sideeffect "lw $$1, $0", "*^ZC,~{$1}"(i32* getelementptr inbounds ([8193 x i32], [8193 x i32]* @data, i32 0, i32 511))

  ; ALL: lw $[[BASEPTR:[0-9]+]], %got(data)(

  ; 09BIT: addiu $[[BASEPTR2:[0-9]+]], $[[BASEPTR]], 2044

  ; ALL: #APP

  ; 09BIT: lw $1, 0($[[BASEPTR2]])
  ; 12BIT: lw $1, 2044($[[BASEPTR]])
  ; 16BIT: lw $1, 2044($[[BASEPTR]])

  ; ALL: #NO_APP

  ret void
}

define void @ZC_offset_2048(i32 *%p) nounwind {
entry:
  ; ALL-LABEL: ZC_offset_2048:

  call void asm sideeffect "lw $$1, $0", "*^ZC,~{$1}"(i32* getelementptr inbounds ([8193 x i32], [8193 x i32]* @data, i32 0, i32 512))

  ; ALL: lw $[[BASEPTR:[0-9]+]], %got(data)(

  ; 09BIT: addiu $[[BASEPTR2:[0-9]+]], $[[BASEPTR]], 2048
  ; 12BIT: addiu $[[BASEPTR2:[0-9]+]], $[[BASEPTR]], 2048

  ; ALL: #APP

  ; 09BIT: lw $1, 0($[[BASEPTR2]])
  ; 12BIT: lw $1, 0($[[BASEPTR2]])
  ; 16BIT: lw $1, 2048($[[BASEPTR]])

  ; ALL: #NO_APP

  ret void
}

define void @ZC_offset_32764(i32 *%p) nounwind {
entry:
  ; ALL-LABEL: ZC_offset_32764:

  call void asm sideeffect "lw $$1, $0", "*^ZC,~{$1}"(i32* getelementptr inbounds ([8193 x i32], [8193 x i32]* @data, i32 0, i32 8191))

  ; ALL-DAG: lw $[[BASEPTR:[0-9]+]], %got(data)(

  ; 09BIT: addiu $[[BASEPTR2:[0-9]+]], $[[BASEPTR]], 32764
  ; 12BIT: addiu $[[BASEPTR2:[0-9]+]], $[[BASEPTR]], 32764

  ; ALL: #APP

  ; 09BIT: lw $1, 0($[[BASEPTR2]])
  ; 12BIT: lw $1, 0($[[BASEPTR2]])
  ; 16BIT: lw $1, 32764($[[BASEPTR]])

  ; ALL: #NO_APP

  ret void
}

define void @ZC_offset_32768(i32 *%p) nounwind {
entry:
  ; ALL-LABEL: ZC_offset_32768:

  call void asm sideeffect "lw $$1, $0", "*^ZC,~{$1}"(i32* getelementptr inbounds ([8193 x i32], [8193 x i32]* @data, i32 0, i32 8192))

  ; ALL-DAG: lw $[[BASEPTR:[0-9]+]], %got(data)(
  ; ALL-DAG: ori $[[T0:[0-9]+]], $zero, 32768

  ; 09BIT: addu $[[BASEPTR2:[0-9]+]], $[[BASEPTR]], $[[T0]]
  ; 12BIT: addu16 $[[BASEPTR2:[0-9]+]], $[[BASEPTR]], $[[T0]]
  ; 16BIT: addu $[[BASEPTR2:[0-9]+]], $[[BASEPTR]], $[[T0]]

  ; ALL: #APP
  ; ALL: lw $1, 0($[[BASEPTR2]])
  ; ALL: #NO_APP

  ret void
}