Home | History | Annotate | Download | only in Mips
      1 # RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | \
      2 # RUN: FileCheck %s
      3 # Check that the assembler can handle the documented syntax
      4 # for ".set at" and set the correct value.
      5 
      6 # CHECK: .section __TEXT,__text,regular,pure_instructions
      7     .text
      8 foo:
      9 # CHECK:   jr    $1                      # encoding: [0x08,0x00,0x20,0x00]
     10     .set    at=$1
     11     jr    $at
     12     nop
     13 # CHECK:   jr    $2                      # encoding: [0x08,0x00,0x40,0x00]
     14     .set    at=$2
     15     jr    $at
     16     nop
     17 # CHECK:   jr    $3                      # encoding: [0x08,0x00,0x60,0x00]
     18     .set    at=$3
     19     jr    $at
     20     nop
     21 # CHECK:   jr    $4                      # encoding: [0x08,0x00,0x80,0x00]
     22     .set    at=$a0
     23     jr    $at
     24     nop
     25 # CHECK:   jr    $5                      # encoding: [0x08,0x00,0xa0,0x00]
     26     .set    at=$a1
     27     jr    $at
     28     nop
     29 # CHECK:   jr    $6                      # encoding: [0x08,0x00,0xc0,0x00]
     30     .set    at=$a2
     31     jr    $at
     32     nop
     33 # CHECK:   jr $7                # encoding: [0x08,0x00,0xe0,0x00]
     34     .set    at=$a3
     35     jr    $at
     36     nop
     37 # CHECK:   jr    $8                      # encoding: [0x08,0x00,0x00,0x01]
     38     .set    at=$8
     39     jr    $at
     40     nop
     41 # CHECK:   jr    $9                      # encoding: [0x08,0x00,0x20,0x01]
     42     .set    at=$9
     43     jr    $at
     44     nop
     45 # CHECK:   jr    $10                     # encoding: [0x08,0x00,0x40,0x01]
     46     .set    at=$10
     47     jr    $at
     48     nop
     49 # CHECK:   jr    $11                     # encoding: [0x08,0x00,0x60,0x01]
     50     .set    at=$11
     51     jr    $at
     52     nop
     53 # CHECK:   jr    $12                     # encoding: [0x08,0x00,0x80,0x01]
     54     .set    at=$12
     55     jr    $at
     56     nop
     57 # CHECK:   jr    $13                     # encoding: [0x08,0x00,0xa0,0x01]
     58     .set    at=$13
     59     jr    $at
     60     nop
     61 # CHECK:   jr    $14                     # encoding: [0x08,0x00,0xc0,0x01]
     62     .set    at=$14
     63     jr    $at
     64     nop
     65 # CHECK:   jr    $15                     # encoding: [0x08,0x00,0xe0,0x01]
     66     .set    at=$15
     67     jr    $at
     68     nop
     69 # CHECK:   jr    $16                     # encoding: [0x08,0x00,0x00,0x02]
     70     .set    at=$s0
     71     jr    $at
     72     nop
     73 # CHECK:   jr    $17                     # encoding: [0x08,0x00,0x20,0x02]
     74     .set    at=$s1
     75     jr    $at
     76     nop
     77 # CHECK:   jr    $18                     # encoding: [0x08,0x00,0x40,0x02]
     78     .set    at=$s2
     79     jr    $at
     80     nop
     81 # CHECK:   jr    $19                     # encoding: [0x08,0x00,0x60,0x02]
     82     .set    at=$s3
     83     jr    $at
     84     nop
     85 # CHECK:   jr    $20                     # encoding: [0x08,0x00,0x80,0x02]
     86     .set    at=$s4
     87     jr    $at
     88     nop
     89 # CHECK:   jr    $21                     # encoding: [0x08,0x00,0xa0,0x02]
     90     .set    at=$s5
     91     jr    $at
     92     nop
     93 # CHECK:   jr    $22                     # encoding: [0x08,0x00,0xc0,0x02]
     94     .set    at=$s6
     95     jr    $at
     96     nop
     97 # CHECK:   jr    $23                     # encoding: [0x08,0x00,0xe0,0x02]
     98     .set    at=$s7
     99     jr    $at
    100     nop
    101 # CHECK:   jr    $24                     # encoding: [0x08,0x00,0x00,0x03]
    102     .set    at=$24
    103     jr    $at
    104     nop
    105 # CHECK:   jr    $25                     # encoding: [0x08,0x00,0x20,0x03]
    106     .set    at=$25
    107     jr    $at
    108     nop
    109 # CHECK:   jr    $26                     # encoding: [0x08,0x00,0x40,0x03]
    110     .set    at=$26
    111     jr    $at
    112     nop
    113 # CHECK:   jr    $27                     # encoding: [0x08,0x00,0x60,0x03]
    114     .set    at=$27
    115     jr    $at
    116     nop
    117 # CHECK:   jr    $gp                     # encoding: [0x08,0x00,0x80,0x03]
    118     .set    at=$gp
    119     jr    $at
    120     nop
    121 # CHECK:   jr    $fp                     # encoding: [0x08,0x00,0xc0,0x03]
    122     .set    at=$fp
    123     jr    $at
    124     nop
    125 # CHECK:   jr    $sp                     # encoding: [0x08,0x00,0xa0,0x03]
    126     .set    at=$sp
    127     jr    $at
    128     nop
    129 # CHECK:   jr    $ra                     # encoding: [0x08,0x00,0xe0,0x03]
    130     .set    at=$ra
    131     jr    $at
    132     nop
    133