Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/MC/Xtensa/xtensa-invalid.s
- This file was added.
# RUN: not llvm-mc -triple xtensa < %s 2>&1 | FileCheck %s | |||||
MaskRay: llvm-mc doesn't need `<`
delete excess spaces | |||||
# Out of range immediates | |||||
LBL0: | |||||
# imm8 | |||||
addi a1, a2, 300 | |||||
# CHECK: error: expected immediate in range [-128, 127] | |||||
Not Done ReplyInline ActionsAdd locations for all diagnostics ( [[#@LINE+1]]) MaskRay: Add locations for all diagnostics ( `[[#@LINE+1]]`) | |||||
addi a1, a2, -129 | |||||
# CHECK: error: expected immediate in range [-128, 127] | |||||
saugustineUnsubmitted Not Done ReplyInline ActionsIt would be good to check instruction arguments out of order, and invalid register names. saugustine: It would be good to check instruction arguments out of order, and invalid register names. | |||||
andreisfrAuthorUnsubmitted You mean for each instruction implement extended tests with argument out of order and invalid register names? andreisfr: You mean for each instruction implement extended tests with argument out of order and invalid… | |||||
saugustineUnsubmitted Probably just once for each format, but yes. saugustine: Probably just once for each format, but yes. | |||||
andreisfrAuthorUnsubmitted I added more tests for different instruction formats. andreisfr: I added more tests for different instruction formats. | |||||
# imm8_sh8 | |||||
addmi a1, a2, 33 | |||||
# CHECK: error: expected immediate in range [-32768, 32512], first 8 bits should be zero | |||||
# Invalid number of operands | |||||
addi a1, a2 # CHECK: :[[@LINE]]:1: error: too few operands for instruction | |||||
addi a1, a2, 4, 4 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction | |||||
Not Done ReplyInline Actions[[#LINE]] is legacy syntax. Use [[#@LINE]]. Fix this everywhere. MaskRay: `[[#LINE]]` is legacy syntax. Use `[[#@LINE]]`. Fix this everywhere. | |||||
# Invalid mnemonics | |||||
aaa a10, a12 # CHECK: :[[@LINE]]:1: error: unrecognized instruction mnemonic | |||||
# Invalid register names | |||||
addi a101, sp, 10 # CHECK: :[[@LINE]]:6: error: invalid operand for instruction | |||||
or r2, sp, a3 # CHECK: :[[@LINE]]:4: error: invalid operand for instruction | |||||
# Invalid operand types | |||||
and sp, a2, 10 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction | |||||
addi sp, a1, a2 # CHECK: :[[@LINE]]:14: error: expected immediate in range [-128, 127] |
llvm-mc doesn't need <
delete excess spaces