| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # RUN: llvm-mc --disassemble %s -triple=mipsel-unknown-linux-gnu \ | ||
| # RUN: -mcpu=mips32r5 -mattr=+virt | FileCheck %s | ||
|
|
||
| 0x00 0x28 0x64 0x40 # CHECK: mfgc0 $4, $5, 0 | ||
| 0x02 0x28 0x64 0x40 # CHECK: mfgc0 $4, $5, 2 | ||
| 0x00 0x2a 0x64 0x40 # CHECK: mtgc0 $4, $5, 0 | ||
| 0x02 0x22 0x65 0x40 # CHECK: mtgc0 $5, $4, 2 | ||
| 0x00 0x2c 0x64 0x40 # CHECK: mfhgc0 $4, $5, 0 | ||
| 0x04 0x2c 0x64 0x40 # CHECK: mfhgc0 $4, $5, 4 | ||
| 0x00 0x2e 0x64 0x40 # CHECK: mthgc0 $4, $5, 0 | ||
| 0x04 0x2e 0x64 0x40 # CHECK: mthgc0 $4, $5, 4 | ||
| 0x28 0x00 0x00 0x42 # CHECK: hypcall | ||
| 0x28 0x50 0x00 0x42 # CHECK: hypcall 10 | ||
| 0x0b 0x00 0x00 0x42 # CHECK: tlbginv | ||
| 0x0c 0x00 0x00 0x42 # CHECK: tlbginvf | ||
| 0x10 0x00 0x00 0x42 # CHECK: tlbgp | ||
| 0x09 0x00 0x00 0x42 # CHECK: tlbgr | ||
| 0x0a 0x00 0x00 0x42 # CHECK: tlbgwi | ||
| 0x0e 0x00 0x00 0x42 # CHECK: tlbgwr |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # RUN: llvm-mc --disassemble %s -triple=mips-unknown-linux-gnu \ | ||
| # RUN: -mcpu=mips32r5 -mattr=+virt | FileCheck %s | ||
|
|
||
| 0x40 0x64 0x28 0x00 # CHECK: mfgc0 $4, $5, 0 | ||
| 0x40 0x64 0x28 0x02 # CHECK: mfgc0 $4, $5, 2 | ||
| 0x40 0x64 0x2a 0x00 # CHECK: mtgc0 $4, $5, 0 | ||
| 0x40 0x65 0x22 0x02 # CHECK: mtgc0 $5, $4, 2 | ||
| 0x40 0x64 0x2c 0x00 # CHECK: mfhgc0 $4, $5, 0 | ||
| 0x40 0x64 0x2c 0x04 # CHECK: mfhgc0 $4, $5, 4 | ||
| 0x40 0x64 0x2e 0x00 # CHECK: mthgc0 $4, $5, 0 | ||
| 0x40 0x64 0x2e 0x04 # CHECK: mthgc0 $4, $5, 4 | ||
| 0x42 0x00 0x00 0x28 # CHECK: hypcall | ||
| 0x42 0x00 0x50 0x28 # CHECK: hypcall 10 | ||
| 0x42 0x00 0x00 0x0b # CHECK: tlbginv | ||
| 0x42 0x00 0x00 0x0c # CHECK: tlbginvf | ||
| 0x42 0x00 0x00 0x10 # CHECK: tlbgp | ||
| 0x42 0x00 0x00 0x09 # CHECK: tlbgr | ||
| 0x42 0x00 0x00 0x0a # CHECK: tlbgwi | ||
| 0x42 0x00 0x00 0x0e # CHECK: tlbgwr |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # RUN: llvm-mc --disassemble %s -triple=mips64el-unknown-linux-gnu \ | ||
| # RUN: -mcpu=mips64r5 -mattr=+virt | FileCheck %s | ||
|
|
||
| 0x00 0x29 0x64 0x40 # CHECK: dmfgc0 $4, $5, 0 | ||
| 0x04 0x29 0x64 0x40 # CHECK: dmfgc0 $4, $5, 4 | ||
| 0x00 0x23 0x65 0x40 # CHECK: dmtgc0 $5, $4, 0 | ||
| 0x04 0x2b 0x64 0x40 # CHECK: dmtgc0 $4, $5, 4 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # RUN: llvm-mc --disassemble %s -triple=mips64-unknown-linux-gnu \ | ||
| # RUN: -mcpu=mips64r5 -mattr=+virt | FileCheck %s | ||
|
|
||
| 0x40 0x64 0x29 0x00 # CHECK: dmfgc0 $4, $5, 0 | ||
| 0x40 0x64 0x29 0x04 # CHECK: dmfgc0 $4, $5, 4 | ||
| 0x40 0x65 0x23 0x00 # CHECK: dmtgc0 $5, $4, 0 | ||
| 0x40 0x64 0x2b 0x04 # CHECK: dmtgc0 $4, $5, 4 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # RUN: llvm-mc --disassemble %s -triple=mipsel-unknown-linux-gnu \ | ||
| # RUN: -mcpu=mips32r5 -mattr=+micromips,+virt | FileCheck %s | ||
|
|
||
| 0x85 0x00 0xfc 0x04 # CHECK: mfgc0 $4, $5, 0 | ||
| 0x85 0x00 0xfc 0x14 # CHECK: mfgc0 $4, $5, 2 | ||
| 0xa4 0x00 0xfc 0x06 # CHECK: mtgc0 $5, $4, 0 | ||
| 0xa4 0x00 0xfc 0x16 # CHECK: mtgc0 $5, $4, 2 | ||
| 0x85 0x00 0xf4 0x04 # CHECK: mfhgc0 $4, $5, 0 | ||
| 0x85 0x00 0xf4 0x14 # CHECK: mfhgc0 $4, $5, 2 | ||
| 0xa4 0x00 0xf4 0x06 # CHECK: mthgc0 $5, $4, 0 | ||
| 0xa4 0x00 0xf4 0x16 # CHECK: mthgc0 $5, $4, 2 | ||
| 0x00 0x00 0x7c 0xc3 # CHECK: hypcall | ||
| 0x0a 0x00 0x7c 0xc3 # CHECK: hypcall 10 | ||
| 0x00 0x00 0x7c 0x41 # CHECK: tlbginv | ||
| 0x00 0x00 0x7c 0x51 # CHECK: tlbginvf | ||
| 0x00 0x00 0x7c 0x01 # CHECK: tlbgp | ||
| 0x00 0x00 0x7c 0x11 # CHECK: tlbgr | ||
| 0x00 0x00 0x7c 0x21 # CHECK: tlbgwi | ||
| 0x00 0x00 0x7c 0x31 # CHECK: tlbgwr |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # RUN: llvm-mc --disassemble %s -triple=mips-unknown-linux-gnu \ | ||
| # RUN: -mcpu=mips32r5 -mattr=+micromips,+virt | FileCheck %s | ||
|
|
||
| 0x00 0x85 0x04 0xfc # CHECK: mfgc0 $4, $5, 0 | ||
| 0x00 0x85 0x14 0xfc # CHECK: mfgc0 $4, $5, 2 | ||
| 0x00 0xa4 0x06 0xfc # CHECK: mtgc0 $5, $4, 0 | ||
| 0x00 0xa4 0x16 0xfc # CHECK: mtgc0 $5, $4, 2 | ||
| 0x00 0x85 0x04 0xf4 # CHECK: mfhgc0 $4, $5, 0 | ||
| 0x00 0x85 0x14 0xf4 # CHECK: mfhgc0 $4, $5, 2 | ||
| 0x00 0xa4 0x06 0xf4 # CHECK: mthgc0 $5, $4, 0 | ||
| 0x00 0xa4 0x16 0xf4 # CHECK: mthgc0 $5, $4, 2 | ||
| 0x00 0x00 0xc3 0x7c # CHECK: hypcall | ||
| 0x00 0x0a 0xc3 0x7c # CHECK: hypcall 10 | ||
| 0x00 0x00 0x41 0x7c # CHECK: tlbginv | ||
| 0x00 0x00 0x51 0x7c # CHECK: tlbginvf | ||
| 0x00 0x00 0x01 0x7c # CHECK: tlbgp | ||
| 0x00 0x00 0x11 0x7c # CHECK: tlbgr | ||
| 0x00 0x00 0x21 0x7c # CHECK: tlbgwi | ||
| 0x00 0x00 0x31 0x7c # CHECK: tlbgwr |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| # Instructions that are invalid. | ||
| # | ||
| # RUN: not llvm-mc %s -arch=mips -mcpu=mips32r5 -mattr=+virt 2>%t1 | ||
| # RUN: FileCheck %s < %t1 | ||
| # RUN: not llvm-mc %s -arch=mips64 -mcpu=mips64r5 -mattr=+virt 2>%t1 | ||
| # RUN: FileCheck %s < %t1 | ||
| # RUN: not llvm-mc %s -arch=mips -mcpu=mips32r5 -mattr=+micromips,+virt 2>%t1 | ||
| # RUN: FileCheck %s < %t1 | ||
|
|
||
| mfgc0 # CHECK: :[[@LINE]]:3: error: too few operands for instruction | ||
| mfgc0 0 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| mfgc0 $4 # CHECK: :[[@LINE]]:3: error: too few operands for instruction | ||
| mfgc0 0, $4 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| mfgc0 0, $4, $5 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| mfgc0 $4, 0, $5 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction | ||
| mfgc0 $4, $5, 8 # CHECK: :[[@LINE]]:17: error: expected 3-bit unsigned immediate | ||
| mfgc0 $4, $5, -1 # CHECK: :[[@LINE]]:17: error: expected 3-bit unsigned immediate | ||
| mfgc0 $4, $5, 0($4) # CHECK: :[[@LINE]]:18: error: invalid operand for instruction | ||
| mtgc0 # CHECK: :[[@LINE]]:3: error: too few operands for instruction | ||
| mtgc0 0 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| mtgc0 $4 # CHECK: :[[@LINE]]:3: error: too few operands for instruction | ||
| mtgc0 0, $4 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| mtgc0 0, $4, $5 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| mtgc0 $4, 0, $5 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction | ||
| mtgc0 $4, $5, 8 # CHECK: :[[@LINE]]:17: error: expected 3-bit unsigned immediate | ||
| mtgc0 $4, $5, -1 # CHECK: :[[@LINE]]:17: error: expected 3-bit unsigned immediate | ||
| mtgc0 $4, $5, 0($4) # CHECK: :[[@LINE]]:18: error: invalid operand for instruction | ||
| mfhgc0 # CHECK: :[[@LINE]]:3: error: too few operands for instruction | ||
| mfhgc0 0 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| mfhgc0 $4 # CHECK: :[[@LINE]]:3: error: too few operands for instruction | ||
| mfhgc0 0, $4 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| mfhgc0 0, $4, $5 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| mfhgc0 $4, 0, $5 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction | ||
| mfhgc0 $4, $5, 8 # CHECK: :[[@LINE]]:18: error: expected 3-bit unsigned immediate | ||
| mfhgc0 $4, $5, -1 # CHECK: :[[@LINE]]:18: error: expected 3-bit unsigned immediate | ||
| mfhgc0 $4, $5, 0($4) # CHECK: :[[@LINE]]:19: error: invalid operand for instruction | ||
| mthgc0 # CHECK: :[[@LINE]]:3: error: too few operands for instruction | ||
| mthgc0 0 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| mthgc0 $4 # CHECK: :[[@LINE]]:3: error: too few operands for instruction | ||
| mthgc0 0, $4 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| mthgc0 0, $4, $5 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| mthgc0 $4, 0, $5 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction | ||
| mthgc0 $4, $5, 8 # CHECK: :[[@LINE]]:18: error: expected 3-bit unsigned immediate | ||
| mthgc0 $4, $5, -1 # CHECK: :[[@LINE]]:18: error: expected 3-bit unsigned immediate | ||
| mthgc0 $4, $5, 0($4) # CHECK: :[[@LINE]]:19: error: invalid operand for instruction | ||
| hypcall $4 # CHECK: :[[@LINE]]:11: error: expected 10-bit unsigned immediate | ||
| hypcall 0, $4 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction | ||
| hypcall 0, $4, $5 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction | ||
| hypcall $4, 0, $5 # CHECK: :[[@LINE]]:11: error: expected 10-bit unsigned immediate | ||
| hypcall $4, $5, 8 # CHECK: :[[@LINE]]:11: error: expected 10-bit unsigned immediate | ||
| hypcall $4, $5, -1 # CHECK: :[[@LINE]]:11: error: expected 10-bit unsigned immediate | ||
| hypcall $4, $5, 0($4) # CHECK: :[[@LINE]]:11: error: expected 10-bit unsigned immediate | ||
| hypcall 2048 # CHECK: :[[@LINE]]:11: error: expected 10-bit unsigned immediate | ||
| hypcall -1 # CHECK: :[[@LINE]]:11: error: expected 10-bit unsigned immediate | ||
| hypcall 0($4) # CHECK: :[[@LINE]]:12: error: unexpected token in argument list | ||
| tlbginv 0 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction | ||
| tlbginv $4 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction | ||
| tlbginv 0, $4 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction | ||
| tlbginv 0, $4, $5 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction | ||
| tlbginv $4, 0, $5 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction | ||
| tlbginv $4, $5, 8 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction | ||
| tlbginv $4, $5, -1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction | ||
| tlbginv $4, $5, 0($4) # CHECK: :[[@LINE]]:11: error: invalid operand for instruction | ||
| tlbginvf 0 # CHECK: :[[@LINE]]:12: error: invalid operand for instruction | ||
| tlbginvf $4 # CHECK: :[[@LINE]]:12: error: invalid operand for instruction | ||
| tlbginvf 0, $4 # CHECK: :[[@LINE]]:12: error: invalid operand for instruction | ||
| tlbginvf 0, $4, $5 # CHECK: :[[@LINE]]:12: error: invalid operand for instruction | ||
| tlbginvf $4, 0, $5 # CHECK: :[[@LINE]]:12: error: invalid operand for instruction | ||
| tlbginvf $4, $5, 8 # CHECK: :[[@LINE]]:12: error: invalid operand for instruction | ||
| tlbginvf $4, $5, -1 # CHECK: :[[@LINE]]:12: error: invalid operand for instruction | ||
| tlbginvf $4, $5, 0($4) # CHECK: :[[@LINE]]:12: error: invalid operand for instruction | ||
| tlbgp 0 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| tlbgp $4 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| tlbgp 0, $4 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| tlbgp 0, $4, $5 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| tlbgp $4, 0, $5 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| tlbgp $4, $5, 8 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| tlbgp $4, $5, -1 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| tlbgp $4, $5, 0($4) # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| tlbgr 0 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| tlbgr $4 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| tlbgr 0, $4 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| tlbgr 0, $4, $5 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| tlbgr $4, 0, $5 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| tlbgr $4, $5, 8 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| tlbgr $4, $5, -1 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| tlbgr $4, $5, 0($4) # CHECK: :[[@LINE]]:9: error: invalid operand for instruction | ||
| tlbgwi 0 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| tlbgwi $4 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| tlbgwi 0, $4 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| tlbgwi 0, $4, $5 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| tlbgwi $4, 0, $5 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| tlbgwi $4, $5, 8 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| tlbgwi $4, $5, -1 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| tlbgwi $4, $5, 0($4) # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| tlbgwr 0 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| tlbgwr $4 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| tlbgwr 0, $4 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| tlbgwr 0, $4, $5 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| tlbgwr $4, 0, $5 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| tlbgwr $4, $5, 8 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| tlbgwr $4, $5, -1 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| tlbgwr $4, $5, 0($4) # CHECK: :[[@LINE]]:10: error: invalid operand for instruction |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Instructions that are invalid. | ||
| # | ||
| # RUN: not llvm-mc %s -arch=mips -mcpu=mips64r5 -mattr=+virt 2>%t1 | ||
| # RUN: FileCheck %s < %t1 | ||
|
|
||
| dmfgc0 # CHECK: :[[@LINE]]:3: error: too few operands for instruction | ||
| dmfgc0 0 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| dmfgc0 $4 # CHECK: :[[@LINE]]:3: error: too few operands for instruction | ||
| dmfgc0 0, $4 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| dmfgc0 0, $4, $5 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| dmfgc0 $4, 0, $5 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction | ||
| dmfgc0 $4, $5, 8 # CHECK: :[[@LINE]]:18: error: expected 3-bit unsigned immediate | ||
| dmfgc0 $4, $5, -1 # CHECK: :[[@LINE]]:18: error: expected 3-bit unsigned immediate | ||
| dmfgc0 $4, $5, 0($4) # CHECK: :[[@LINE]]:19: error: invalid operand for instruction | ||
| dmtgc0 # CHECK: :[[@LINE]]:3: error: too few operands for instruction | ||
| dmtgc0 0 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| dmtgc0 $4 # CHECK: :[[@LINE]]:3: error: too few operands for instruction | ||
| dmtgc0 0, $4 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| dmtgc0 0, $4, $5 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction | ||
| dmtgc0 $4, 0, $5 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction | ||
| dmtgc0 $4, $5, 8 # CHECK: :[[@LINE]]:18: error: expected 3-bit unsigned immediate | ||
| dmtgc0 $4, $5, -1 # CHECK: :[[@LINE]]:18: error: expected 3-bit unsigned immediate | ||
| dmtgc0 $4, $5, 0($4) # CHECK: :[[@LINE]]:19: error: invalid operand for instruction |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # RUN: llvm-mc %s -arch=mips -mcpu=mips32r5 -mattr=+virt | \ | ||
| # RUN: FileCheck %s -check-prefix=CHECK-ASM | ||
| # | ||
| # RUN: llvm-mc %s -arch=mips -mcpu=mips32r5 -filetype=obj -o - -mattr=+virt | \ | ||
| # RUN: llvm-readobj -mips-abi-flags - | \ | ||
| # RUN: FileCheck %s -check-prefix=CHECK-OBJ | ||
|
|
||
| # CHECK-ASM: .module novirt | ||
|
|
||
| # Check that MIPS.abiflags has no VZ flag. | ||
| # CHECK-OBJ: MIPS ABI Flags { | ||
| # CHECK-OBJ: ASEs [ (0x0) | ||
| # CHECK-OBJ-NOT: ASEs [ (0x100) | ||
| # CHECK-OBJ-NOT: VZ (0x100) | ||
| # CHECK-OBJ: } | ||
|
|
||
| .module novirt | ||
|
|
||
| # FIXME: Test should include gnu_attributes directive when implemented. | ||
| # An explicit .gnu_attribute must be checked against the effective | ||
| # command line options and any inconsistencies reported via a warning. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # RUN: llvm-mc %s -triple=mips-unknown-linux-gnu -mcpu=mips32r5 | \ | ||
| # RUN: FileCheck %s -check-prefix=CHECK-ASM | ||
| # | ||
| # RUN: llvm-mc %s -triple=mips-unknown-linux-gnu -mcpu=mips32r5 \ | ||
| # RUN: -filetype=obj -o - | \ | ||
| # RUN: llvm-readobj -mips-abi-flags - | \ | ||
| # RUN: FileCheck %s -check-prefix=CHECK-OBJ | ||
|
|
||
| # CHECK-ASM: .module virt | ||
|
|
||
| # Check if the MIPS.abiflags section was correctly emitted: | ||
| # CHECK-OBJ: MIPS ABI Flags { | ||
| # CHECK-OBJ: ASEs [ (0x100) | ||
| # CHECK-OBJ: VZ (0x100) | ||
| # CHECK-OBJ: } | ||
|
|
||
| .module virt | ||
| hypcall | ||
|
|
||
| # FIXME: Test should include gnu_attributes directive when implemented. | ||
| # An explicit .gnu_attribute must be checked against the effective | ||
| # command line options and any inconsistencies reported via a warning. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # RUN: not llvm-mc %s -triple=mips-unknown-linux-gnu -show-encoding \ | ||
| # RUN: -mcpu=mips32r5 -mattr=+virt 2>%t1 | ||
| # RUN: FileCheck %s < %t1 | ||
| # RUN: not llvm-mc %s -triple=mips64-unknown-linux-gnu -show-encoding \ | ||
| # RUN: -mcpu=mips64r5 -mattr=+virt 2>%t1 | ||
| # RUN: FileCheck %s < %t1 | ||
|
|
||
| .set novirt | ||
| hypcall # CHECK: instruction requires a CPU feature not currently enabled |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # RUN: llvm-mc %s -show-encoding -triple=mips-unknown-linux-gnu \ | ||
| # RUN: -mcpu=mips32r5 | FileCheck %s | ||
| # RUN: llvm-mc %s -show-encoding -triple=mips64-unknown-linux-gnu \ | ||
| # RUN: -mcpu=mips64r5 | FileCheck %s | ||
|
|
||
| .set virt | ||
| hypcall # CHECK: hypcall # encoding: [0x42,0x00,0x00,0x28] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # RUN: llvm-mc %s -triple=mips-unknown-linux-gnu -show-encoding \ | ||
| # RUN: -mcpu=mips32r5 -mattr=+micromips,+virt | FileCheck %s | ||
|
|
||
| mfgc0 $4, $5 # CHECK: mfgc0 $4, $5, 0 # encoding: [0x00,0x85,0x04,0xfc] | ||
| mfgc0 $4, $5, 2 # CHECK: mfgc0 $4, $5, 2 # encoding: [0x00,0x85,0x14,0xfc] | ||
| mtgc0 $5, $4 # CHECK: mtgc0 $5, $4, 0 # encoding: [0x00,0xa4,0x06,0xfc] | ||
| mtgc0 $5, $4, 2 # CHECK: mtgc0 $5, $4, 2 # encoding: [0x00,0xa4,0x16,0xfc] | ||
| mthgc0 $5, $4 # CHECK: mthgc0 $5, $4, 0 # encoding: [0x00,0xa4,0x06,0xf4] | ||
| mthgc0 $5, $4, 1 # CHECK: mthgc0 $5, $4, 1 # encoding: [0x00,0xa4,0x0e,0xf4] | ||
| mfhgc0 $5, $4 # CHECK: mfhgc0 $5, $4, 0 # encoding: [0x00,0xa4,0x04,0xf4] | ||
| mfhgc0 $5, $4, 7 # CHECK: mfhgc0 $5, $4, 7 # encoding: [0x00,0xa4,0x3c,0xf4] | ||
| hypcall # CHECK: hypcall # encoding: [0x00,0x00,0xc3,0x7c] | ||
| hypcall 10 # CHECK: hypcall 10 # encoding: [0x00,0x0a,0xc3,0x7c] | ||
| tlbginv # CHECK: tlbginv # encoding: [0x00,0x00,0x41,0x7c] | ||
| tlbginvf # CHECK: tlbginvf # encoding: [0x00,0x00,0x51,0x7c] | ||
| tlbgp # CHECK: tlbgp # encoding: [0x00,0x00,0x01,0x7c] | ||
| tlbgr # CHECK: tlbgr # encoding: [0x00,0x00,0x11,0x7c] | ||
| tlbgwi # CHECK: tlbgwi # encoding: [0x00,0x00,0x21,0x7c] | ||
| tlbgwr # CHECK: tlbgwr # encoding: [0x00,0x00,0x31,0x7c] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # RUN: llvm-mc %s -triple=mips-unknown-linux-gnu -show-encoding \ | ||
| # RUN: -mcpu=mips32r5 -mattr=+virt | FileCheck %s | ||
| # RUN: llvm-mc %s -triple=mips64-unknown-linux-gnu -show-encoding \ | ||
| # RUN: -mcpu=mips64r5 -mattr=+virt | FileCheck %s | ||
|
|
||
| mfgc0 $4, $5 # CHECK: mfgc0 $4, $5, 0 # encoding: [0x40,0x64,0x28,0x00] | ||
| mfgc0 $4, $5, 2 # CHECK: mfgc0 $4, $5, 2 # encoding: [0x40,0x64,0x28,0x02] | ||
| mtgc0 $4, $5 # CHECK: mtgc0 $4, $5, 0 # encoding: [0x40,0x64,0x2a,0x00] | ||
| mtgc0 $5, $4, 2 # CHECK: mtgc0 $5, $4, 2 # encoding: [0x40,0x65,0x22,0x02] | ||
| mthgc0 $5, $4 # CHECK: mthgc0 $5, $4, 0 # encoding: [0x40,0x65,0x26,0x00] | ||
| mthgc0 $5, $4, 1 # CHECK: mthgc0 $5, $4, 1 # encoding: [0x40,0x65,0x26,0x01] | ||
| mfhgc0 $5, $4 # CHECK: mfhgc0 $5, $4, 0 # encoding: [0x40,0x65,0x24,0x00] | ||
| mfhgc0 $5, $4, 7 # CHECK: mfhgc0 $5, $4, 7 # encoding: [0x40,0x65,0x24,0x07] | ||
| hypcall # CHECK: hypcall # encoding: [0x42,0x00,0x00,0x28] | ||
| hypcall 10 # CHECK: hypcall 10 # encoding: [0x42,0x00,0x50,0x28] | ||
| tlbginv # CHECK: tlbginv # encoding: [0x42,0x00,0x00,0x0b] | ||
| tlbginvf # CHECK: tlbginvf # encoding: [0x42,0x00,0x00,0x0c] | ||
| tlbgp # CHECK: tlbgp # encoding: [0x42,0x00,0x00,0x10] | ||
| tlbgr # CHECK: tlbgr # encoding: [0x42,0x00,0x00,0x09] | ||
| tlbgwi # CHECK: tlbgwi # encoding: [0x42,0x00,0x00,0x0a] | ||
| tlbgwr # CHECK: tlbgwr # encoding: [0x42,0x00,0x00,0x0e] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # RUN: llvm-mc %s -triple=mips64-unknown-linux-gnu -show-encoding \ | ||
| # RUN: -mcpu=mips64r5 -mattr=+virt | FileCheck %s | ||
|
|
||
| dmfgc0 $4,$5 # CHECK: dmfgc0 $4, $5, 0 # encoding: [0x40,0x64,0x29,0x00] | ||
| dmfgc0 $4,$5,4 # CHECK: dmfgc0 $4, $5, 4 # encoding: [0x40,0x64,0x29,0x04] | ||
| dmtgc0 $4,$5 # CHECK: dmtgc0 $4, $5, 0 # encoding: [0x40,0x64,0x2b,0x00] | ||
| dmtgc0 $4,$5,4 # CHECK: dmtgc0 $4, $5, 4 # encoding: [0x40,0x64,0x2b,0x04] |