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
# RUN: llvm-mc -arch=amdgcn -mcpu=gfx1010 -disassemble -show-encoding < %s | FileCheck %s

#===------------------------------------------------------------------------===#
# scratch_load
#===------------------------------------------------------------------------===#

# CHECK: scratch_load_dword v1, v255, off offset:-1 glc dlc ; encoding: [0xff,0x5f,0x31,0xdc,0xff,0x00,0x7d,0x01]
0xff 0x5f 0x31 0xdc 0xff 0x00 0x7d 0x01

# CHECK: scratch_load_dword v5, v255, off offset:-1 glc slc ; encoding: [0xff,0x4f,0x33,0xdc,0xff,0x00,0x7d,0x05]
0xff 0x4f 0x33 0xdc 0xff 0x00 0x7d 0x05

# CHECK: scratch_load_dword v0, v1, off offset:-2048 glc slc dlc ; encoding: [0x00,0x58,0x33,0xdc,0x01,0x00,0x7d,0x00]
0x00 0x58 0x33 0xdc 0x01 0x00 0x7d 0x00

# CHECK: scratch_load_dword v255, off, s105 offset:2047 dlc ; encoding: [0xff,0x57,0x30,0xdc,0x00,0x00,0x69,0xff]
0xff 0x57 0x30 0xdc 0x00 0x00 0x69 0xff

# CHECK: scratch_load_dword v255, v2, off ; encoding: [0x00,0x40,0x30,0xdc,0x02,0x00,0x7d,0xff]
0x00 0x40 0x30 0xdc 0x02 0x00 0x7d 0xff

# CHECK: scratch_load_dword v5, v0, off dlc ; encoding: [0x00,0x50,0x30,0xdc,0x00,0x00,0x7d,0x05]
0x00 0x50 0x30 0xdc 0x00 0x00 0x7d 0x05

# CHECK: scratch_load_dword v5, v3, off slc ; encoding: [0x00,0x40,0x32,0xdc,0x03,0x00,0x7d,0x05]
0x00 0x40 0x32 0xdc 0x03 0x00 0x7d 0x05

# CHECK: scratch_load_dword v5, v255, off slc dlc ; encoding: [0x00,0x50,0x32,0xdc,0xff,0x00,0x7d,0x05]
0x00 0x50 0x32 0xdc 0xff 0x00 0x7d 0x05

# CHECK: scratch_load_dword v255, off, s2 offset:1 ; encoding: [0x01,0x40,0x30,0xdc,0x00,0x00,0x02,0xff]
0x01 0x40 0x30 0xdc 0x00 0x00 0x02 0xff

#===------------------------------------------------------------------------===#
# scratch_store
#===------------------------------------------------------------------------===#

# CHECK: scratch_store_dword off, v2, s3 offset:-1 ; encoding: [0xff,0x4f,0x70,0xdc,0x00,0x02,0x03,0x00]
0xff,0x4f,0x70,0xdc,0x00,0x02,0x03,0x00

# CHECK: scratch_store_dword off, v255, s3 offset:-1 ; encoding: [0xff,0x4f,0x70,0xdc,0x00,0xff,0x03,0x00]
0xff,0x4f,0x70,0xdc,0x00,0xff,0x03,0x00

# CHECK: scratch_store_dword off, v2, s105 offset:-1 ; encoding: [0xff,0x4f,0x70,0xdc,0x00,0x02,0x69,0x00]
0xff,0x4f,0x70,0xdc,0x00,0x02,0x69,0x00

# CHECK: scratch_store_dword off, v2, vcc_lo offset:-1 ; encoding: [0xff,0x4f,0x70,0xdc,0x00,0x02,0x6a,0x00]
0xff,0x4f,0x70,0xdc,0x00,0x02,0x6a,0x00

# CHECK: scratch_store_dword off, v2, vcc_hi offset:-1 ; encoding: [0xff,0x4f,0x70,0xdc,0x00,0x02,0x6b,0x00]
0xff,0x4f,0x70,0xdc,0x00,0x02,0x6b,0x00

# CHECK: scratch_store_dword off, v2, ttmp15 offset:-1 ; encoding: [0xff,0x4f,0x70,0xdc,0x00,0x02,0x7b,0x00]
0xff,0x4f,0x70,0xdc,0x00,0x02,0x7b,0x00

# CHECK: scratch_store_dword v0, v2, off offset:-1 ; encoding: [0xff,0x4f,0x70,0xdc,0x00,0x02,0x7d,0x00]
0xff,0x4f,0x70,0xdc,0x00,0x02,0x7d,0x00

# CHECK: scratch_store_dword off, v2, s3 ; encoding: [0x00,0x40,0x70,0xdc,0x00,0x02,0x03,0x00]
0x00,0x40,0x70,0xdc,0x00,0x02,0x03,0x00

# CHECK: scratch_store_dword off, v2, s3 offset:2047 ; encoding: [0xff,0x47,0x70,0xdc,0x00,0x02,0x03,0x00]
0xff,0x47,0x70,0xdc,0x00,0x02,0x03,0x00

# CHECK: scratch_store_dword off, v2, s3 offset:-2048 ; encoding: [0x00,0x48,0x70,0xdc,0x00,0x02,0x03,0x00]
0x00,0x48,0x70,0xdc,0x00,0x02,0x03,0x00

# CHECK: scratch_store_dword off, v2, s3 offset:-1 glc ; encoding: [0xff,0x4f,0x71,0xdc,0x00,0x02,0x03,0x00]
0xff,0x4f,0x71,0xdc,0x00,0x02,0x03,0x00

# CHECK: scratch_store_dword off, v2, s3 offset:-1 slc ; encoding: [0xff,0x4f,0x72,0xdc,0x00,0x02,0x03,0x00]
0xff,0x4f,0x72,0xdc,0x00,0x02,0x03,0x00

# CHECK: scratch_store_dword off, v2, s3 offset:-1 dlc ; encoding: [0xff,0x5f,0x70,0xdc,0x00,0x02,0x03,0x00]
0xff,0x5f,0x70,0xdc,0x00,0x02,0x03,0x00