brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 566a240 Raw
39 lines · plain
1# RUN: not llvm-mc --filetype=obj --triple=loongarch64 --mattr=-relax %s -o /dev/null 2>&1 | FileCheck %s --check-prefixes=ERR,NORELAX --implicit-check-not=error:2# RUN: not llvm-mc --filetype=obj --triple=loongarch64 --mattr=+relax %s -o /dev/null 2>&1 | FileCheck %s --check-prefixes=ERR,RELAX --implicit-check-not=error:3 4a:5  nop6b:7  la.pcrel $t0, a8c:9  nop10d:11 12.data13## Positive subsection numbers14## With relaxation, report an error as c-b is not an assemble-time constant.15# RELAX: :[[#@LINE+1]]:14: error: cannot evaluate subsection number16.subsection c-b17# RELAX: :[[#@LINE+1]]:14: error: cannot evaluate subsection number18.subsection d-b19# RELAX: :[[#@LINE+1]]:14: error: cannot evaluate subsection number20.subsection c-a21 22.subsection b-a23.subsection d-c24 25## Negative subsection numbers26# NORELAX: :[[#@LINE+2]]:14: error: subsection number -8 is not within [0,2147483647]27# RELAX:   :[[#@LINE+1]]:14: error: cannot evaluate subsection number28.subsection b-c29# NORELAX: :[[#@LINE+2]]:14: error: subsection number -12 is not within [0,2147483647]30# RELAX:   :[[#@LINE+1]]:14: error: cannot evaluate subsection number31.subsection b-d32# NORELAX: :[[#@LINE+2]]:14: error: subsection number -12 is not within [0,2147483647]33# RELAX:   :[[#@LINE+1]]:14: error: cannot evaluate subsection number34.subsection a-c35# ERR:     :[[#@LINE+1]]:14: error: subsection number -4 is not within [0,2147483647]36.subsection a-b37# ERR:     :[[#@LINE+1]]:14: error: subsection number -4 is not within [0,2147483647]38.subsection c-d39