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     .text
      7 foo:
      8 # CHECK:   jr    $1                      # encoding: [0x08,0x00,0x20,0x00]
      9     .set    at=$1
     10     jr    $at
     11     nop
     12 # CHECK:   jr    $2                      # encoding: [0x08,0x00,0x40,0x00]
     13     .set    at=$2
     14     jr    $at
     15     nop
     16 # CHECK:   jr    $3                      # encoding: [0x08,0x00,0x60,0x00]
     17     .set    at=$3
     18     jr    $at
     19     nop
     20 # CHECK:   jr    $4                      # encoding: [0x08,0x00,0x80,0x00]
     21     .set    at=$a0
     22     jr    $at
     23     nop
     24 # CHECK:   jr    $5                      # encoding: [0x08,0x00,0xa0,0x00]
     25     .set    at=$a1
     26     jr    $at
     27     nop
     28 # CHECK:   jr    $6                      # encoding: [0x08,0x00,0xc0,0x00]
     29     .set    at=$a2
     30     jr    $at
     31     nop
     32 # CHECK:   jr $7                # encoding: [0x08,0x00,0xe0,0x00]
     33     .set    at=$a3
     34     jr    $at
     35     nop
     36 # CHECK:   jr    $8                      # encoding: [0x08,0x00,0x00,0x01]
     37     .set    at=$8
     38     jr    $at
     39     nop
     40 # CHECK:   jr    $9                      # encoding: [0x08,0x00,0x20,0x01]
     41     .set    at=$9
     42     jr    $at
     43     nop
     44 # CHECK:   jr    $10                     # encoding: [0x08,0x00,0x40,0x01]
     45     .set    at=$10
     46     jr    $at
     47     nop
     48 # CHECK:   jr    $11                     # encoding: [0x08,0x00,0x60,0x01]
     49     .set    at=$11
     50     jr    $at
     51     nop
     52 # CHECK:   jr    $12                     # encoding: [0x08,0x00,0x80,0x01]
     53     .set    at=$12
     54     jr    $at
     55     nop
     56 # CHECK:   jr    $13                     # encoding: [0x08,0x00,0xa0,0x01]
     57     .set    at=$13
     58     jr    $at
     59     nop
     60 # CHECK:   jr    $14                     # encoding: [0x08,0x00,0xc0,0x01]
     61     .set    at=$14
     62     jr    $at
     63     nop
     64 # CHECK:   jr    $15                     # encoding: [0x08,0x00,0xe0,0x01]
     65     .set    at=$15
     66     jr    $at
     67     nop
     68 # CHECK:   jr    $16                     # encoding: [0x08,0x00,0x00,0x02]
     69     .set    at=$s0
     70     jr    $at
     71     nop
     72 # CHECK:   jr    $17                     # encoding: [0x08,0x00,0x20,0x02]
     73     .set    at=$s1
     74     jr    $at
     75     nop
     76 # CHECK:   jr    $18                     # encoding: [0x08,0x00,0x40,0x02]
     77     .set    at=$s2
     78     jr    $at
     79     nop
     80 # CHECK:   jr    $19                     # encoding: [0x08,0x00,0x60,0x02]
     81     .set    at=$s3
     82     jr    $at
     83     nop
     84 # CHECK:   jr    $20                     # encoding: [0x08,0x00,0x80,0x02]
     85     .set    at=$s4
     86     jr    $at
     87     nop
     88 # CHECK:   jr    $21                     # encoding: [0x08,0x00,0xa0,0x02]
     89     .set    at=$s5
     90     jr    $at
     91     nop
     92 # CHECK:   jr    $22                     # encoding: [0x08,0x00,0xc0,0x02]
     93     .set    at=$s6
     94     jr    $at
     95     nop
     96 # CHECK:   jr    $23                     # encoding: [0x08,0x00,0xe0,0x02]
     97     .set    at=$s7
     98     jr    $at
     99     nop
    100 # CHECK:   jr    $24                     # encoding: [0x08,0x00,0x00,0x03]
    101     .set    at=$24
    102     jr    $at
    103     nop
    104 # CHECK:   jr    $25                     # encoding: [0x08,0x00,0x20,0x03]
    105     .set    at=$25
    106     jr    $at
    107     nop
    108 # CHECK:   jr    $26                     # encoding: [0x08,0x00,0x40,0x03]
    109     .set    at=$26
    110     jr    $at
    111     nop
    112 # CHECK:   jr    $27                     # encoding: [0x08,0x00,0x60,0x03]
    113     .set    at=$27
    114     jr    $at
    115     nop
    116 # CHECK:   jr    $gp                     # encoding: [0x08,0x00,0x80,0x03]
    117     .set    at=$gp
    118     jr    $at
    119     nop
    120 # CHECK:   jr    $fp                     # encoding: [0x08,0x00,0xc0,0x03]
    121     .set    at=$fp
    122     jr    $at
    123     nop
    124 # CHECK:   jr    $sp                     # encoding: [0x08,0x00,0xa0,0x03]
    125     .set    at=$sp
    126     jr    $at
    127     nop
    128 # CHECK:   jr    $ra                     # encoding: [0x08,0x00,0xe0,0x03]
    129     .set    at=$ra
    130     jr    $at
    131     nop
    132