File: micromips-shift-instructions.s

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (63 lines) | stat: -rw-r--r-- 3,442 bytes parent folder | download | duplicates (30)
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
# RUN: llvm-mc %s -triple=mipsel -show-encoding -mcpu=mips32r2 -mattr=micromips | FileCheck -check-prefix=CHECK-EL %s
# RUN: llvm-mc %s -triple=mips -show-encoding -mcpu=mips32r2 -mattr=micromips | FileCheck -check-prefix=CHECK-EB %s
# Check that the assembler can handle the documented syntax
# for shift instructions.
#------------------------------------------------------------------------------
# Shift Instructions
#------------------------------------------------------------------------------
# Little endian
#------------------------------------------------------------------------------
# CHECK-EL: sll    $4, $3, 7      # encoding: [0x83,0x00,0x00,0x38]
# CHECK-EL: sllv   $2, $3, $5     # encoding: [0x65,0x00,0x10,0x10]
# CHECK-EL: sra    $4, $3, 7      # encoding: [0x83,0x00,0x80,0x38]
# CHECK-EL: srav   $2, $3, $5     # encoding: [0x65,0x00,0x90,0x10]
# CHECK-EL: srl    $4, $3, 7      # encoding: [0x83,0x00,0x40,0x38]
# CHECK-EL: srlv   $2, $3, $5     # encoding: [0x65,0x00,0x50,0x10]
# CHECK-EL: rotr   $9, $6, 7      # encoding: [0x26,0x01,0xc0,0x38]
# CHECK-EL: rotrv  $9, $6, $7     # encoding: [0xc7,0x00,0xd0,0x48]
# CHECK-EL: sllv   $2, $3, $5     # encoding: [0x65,0x00,0x10,0x10]
# CHECK-EL: srav   $2, $3, $5     # encoding: [0x65,0x00,0x90,0x10]
# CHECK-EL: srlv   $2, $3, $5     # encoding: [0x65,0x00,0x50,0x10]
# CHECK-EL: sllv   $2, $2, $3     # encoding: [0x43,0x00,0x10,0x10]
# CHECK-EL: srav   $2, $2, $3     # encoding: [0x43,0x00,0x90,0x10]
# CHECK-EL: srlv   $2, $2, $3     # encoding: [0x43,0x00,0x50,0x10]
# CHECK-EL: sll    $3, $3, 7      # encoding: [0x63,0x00,0x00,0x38]
# CHECK-EL: sra    $3, $3, 7      # encoding: [0x63,0x00,0x80,0x38]
# CHECK-EL: srl    $3, $3, 7      # encoding: [0x63,0x00,0x40,0x38]
#------------------------------------------------------------------------------
# Big endian
#------------------------------------------------------------------------------
# CHECK-EB: sll $4, $3, 7         # encoding: [0x00,0x83,0x38,0x00]
# CHECK-EB: sllv  $2, $3, $5      # encoding: [0x00,0x65,0x10,0x10]
# CHECK-EB: sra $4, $3, 7         # encoding: [0x00,0x83,0x38,0x80]
# CHECK-EB: srav  $2, $3, $5      # encoding: [0x00,0x65,0x10,0x90]
# CHECK-EB: srl $4, $3, 7         # encoding: [0x00,0x83,0x38,0x40]
# CHECK-EB: srlv  $2, $3, $5      # encoding: [0x00,0x65,0x10,0x50]
# CHECK-EB: rotr  $9, $6, 7       # encoding: [0x01,0x26,0x38,0xc0]
# CHECK-EB: rotrv $9, $6, $7      # encoding: [0x00,0xc7,0x48,0xd0]
# CHECK-EB: sllv $2, $3, $5       # encoding: [0x00,0x65,0x10,0x10]
# CHECK-EB: srav $2, $3, $5       # encoding: [0x00,0x65,0x10,0x90]
# CHECK-EB: srlv $2, $3, $5       # encoding: [0x00,0x65,0x10,0x50]
# CHECK-EB: sllv $2, $2, $3       # encoding: [0x00,0x43,0x10,0x10]
# CHECK-EB: srav $2, $2, $3       # encoding: [0x00,0x43,0x10,0x90]
# CHECK-EB: srlv $2, $2, $3       # encoding: [0x00,0x43,0x10,0x50]
# CHECK-EB: sll $3, $3, 7         # encoding: [0x00,0x63,0x38,0x00]
# CHECK-EB: sra $3, $3, 7         # encoding: [0x00,0x63,0x38,0x80]
# CHECK-EB: srl $3, $3, 7         # encoding: [0x00,0x63,0x38,0x40]
     sll    $4, $3, 7
     sllv   $2, $3, $5
     sra    $4, $3, 7
     srav   $2, $3, $5
     srl    $4, $3, 7
     srlv   $2, $3, $5
     rotr   $9, $6, 7
     rotrv  $9, $6, $7
     sll    $2, $3, $5
     sra    $2, $3, $5
     srl    $2, $3, $5
     sll    $2, $3
     sra    $2, $3
     srl    $2, $3
     sll    $3, 7
     sra    $3, 7
     srl    $3, 7