summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/RISCV/function-call-invalid.s
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/MC/RISCV/function-call-invalid.s')
-rw-r--r--llvm/test/MC/RISCV/function-call-invalid.s11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/MC/RISCV/function-call-invalid.s b/llvm/test/MC/RISCV/function-call-invalid.s
new file mode 100644
index 00000000000..14532495e3f
--- /dev/null
+++ b/llvm/test/MC/RISCV/function-call-invalid.s
@@ -0,0 +1,11 @@
+# RUN: not llvm-mc -triple riscv32 < %s 2>&1 | FileCheck %s
+
+call 1234 # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
+call %pcrel_hi(1234) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
+call %pcrel_lo(1234) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
+call %pcrel_hi(foo) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
+call %pcrel_lo(foo) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
+call %hi(1234) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
+call %lo(1234) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
+call %hi(foo) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
+call %lo(foo) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
OpenPOWER on IntegriCloud