Land the long talked about "type system rewrite" patch. This
[llvm/stm8.git] / test / MC / MBlaze / mblaze_shift.s
bloba25502b35094be513e4accf3fe80390fc63924dc
1 # RUN: llvm-mc -triple mblaze-unknown-unknown -show-encoding %s | FileCheck %s
3 # Test to make sure that all of the TYPE-A instructions supported by
4 # the Microblaze can be parsed by the assembly parser.
6 # TYPE A: OPCODE RD RA RB FLAGS
7 # BINARY: 000000 00000 00000 00000 00000000000
9 # CHECK: bsrl
10 # BINARY: 010001 00001 00010 00011 00000000000
11 # CHECK: encoding: [0x44,0x22,0x18,0x00]
12 bsrl r1, r2, r3
14 # CHECK: bsra
15 # BINARY: 010001 00001 00010 00011 01000000000
16 # CHECK: encoding: [0x44,0x22,0x1a,0x00]
17 bsra r1, r2, r3
19 # CHECK: bsll
20 # BINARY: 010001 00001 00010 00011 10000000000
21 # CHECK: encoding: [0x44,0x22,0x1c,0x00]
22 bsll r1, r2, r3
24 # CHECK: bsrli
25 # BINARY: 011001 00001 00010 0000000000000000
26 # CHECK: encoding: [0x64,0x22,0x00,0x00]
27 bsrli r1, r2, 0
29 # CHECK: bsrai
30 # BINARY: 011001 00001 00010 0000001000000000
31 # CHECK: encoding: [0x64,0x22,0x02,0x00]
32 bsrai r1, r2, 0
34 # CHECK: bslli
35 # BINARY: 011001 00001 00010 0000010000000000
36 # CHECK: encoding: [0x64,0x22,0x04,0x00]
37 bslli r1, r2, 0
39 # CHECK: sra
40 # BINARY: 100100 00001 00010 00000 00000000001
41 # CHECK: encoding: [0x90,0x22,0x00,0x01]
42 sra r1, r2
44 # CHECK: srl
45 # BINARY: 100100 00001 00010 00000 00001000001
46 # CHECK: encoding: [0x90,0x22,0x00,0x41]
47 srl r1, r2