Skip to content

Commit ba00d9f

Browse files
wangleiattstellar
authored andcommitted
[LoongArch] Pre-commit test for llvm#133225
Reviewed By: SixWeining Pull Request: llvm#133224 (cherry picked from commit 725a7b6)
1 parent f07f968 commit ba00d9f

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Diff for: llvm/test/MC/LoongArch/Relocations/relocations.s

+25
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# RUN: llvm-mc --filetype=obj --triple=loongarch64 < %s \
44
# RUN: | llvm-readobj -r - | FileCheck --check-prefix=RELOC %s
55

6+
# RUN: not llvm-mc --triple=loongarch64 --defsym=FIXME=1 < %s 2>&1 \
7+
# RUN: | FileCheck --check-prefix=ERROR %s
8+
69
## Check prefixes:
710
## RELOC - Check the relocation in the object.
811
## FIXUP - Check the fixup on the instruction.
@@ -308,3 +311,25 @@ pcaddi $t1, %desc_pcrel_20(foo)
308311
# RELOC: R_LARCH_TLS_DESC_PCREL20_S2 foo 0x0
309312
# INSTR: pcaddi $t1, %desc_pcrel_20(foo)
310313
# FIXUP: fixup A - offset: 0, value: %desc_pcrel_20(foo), kind: FK_NONE
314+
315+
.ifdef FIXME
316+
317+
fld.s $ft1, $a0, %pc_lo12(foo)
318+
# ERROR: :[[#@LINE-1]]:18: error: immediate must be an integer in the range [-2048, 2047]
319+
320+
fst.d $ft1, $a0, %pc_lo12(foo)
321+
# ERROR: :[[#@LINE-1]]:18: error: immediate must be an integer in the range [-2048, 2047]
322+
323+
vld $vr9, $a0, %pc_lo12(foo)
324+
# ERROR: :[[#@LINE-1]]:16: error: immediate must be an integer in the range [-2048, 2047]
325+
326+
vst $vr9, $a0, %pc_lo12(foo)
327+
# ERROR: :[[#@LINE-1]]:16: error: immediate must be an integer in the range [-2048, 2047]
328+
329+
xvld $xr9, $a0, %pc_lo12(foo)
330+
# ERROR: :[[#@LINE-1]]:17: error: immediate must be an integer in the range [-2048, 2047]
331+
332+
xvst $xr9, $a0, %pc_lo12(foo)
333+
# ERROR: :[[#@LINE-1]]:17: error: immediate must be an integer in the range [-2048, 2047]
334+
335+
.endif

0 commit comments

Comments
 (0)