[v1] LoongArch: Run overflow testcases only on LoongArch target
Checks
Commit Message
---
.../ld-loongarch-elf/ld-loongarch-elf.exp | 27 ++++++++++---------
1 file changed, 14 insertions(+), 13 deletions(-)
Comments
On Mon, Feb 26, 2024 at 11:17 PM mengqinggang <mengqinggang@loongson.cn> wrote:
>
> ---
> .../ld-loongarch-elf/ld-loongarch-elf.exp | 27 ++++++++++---------
> 1 file changed, 14 insertions(+), 13 deletions(-)
>
> diff --git a/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp b/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp
> index 3a8629a07df..27310fe1275 100644
> --- a/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp
> +++ b/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp
> @@ -133,18 +133,19 @@ if [istarget "loongarch64-*-*"] {
> run_dump_test "desc-norelax"
> run_dump_test "desc-relax"
> }
> +
> + run_dump_test "max_imm_b16"
> + run_dump_test "max_imm_b21"
> + run_dump_test "max_imm_b26"
> + run_dump_test "max_imm_pcrel20"
> + run_dump_test "overflow_b16"
> + run_dump_test "overflow_b21"
> + run_dump_test "overflow_b26"
> + run_dump_test "overflow_pcrel20"
> + run_dump_test "underflow_b16"
> + run_dump_test "underflow_b21"
> + run_dump_test "underflow_b26"
> + run_dump_test "underflow_pcrel20"
> + run_dump_test "pie_discard"
> }
>
> -run_dump_test "max_imm_b16"
> -run_dump_test "max_imm_b21"
> -run_dump_test "max_imm_b26"
> -run_dump_test "max_imm_pcrel20"
> -run_dump_test "overflow_b16"
> -run_dump_test "overflow_b21"
> -run_dump_test "overflow_b26"
> -run_dump_test "overflow_pcrel20"
> -run_dump_test "underflow_b16"
> -run_dump_test "underflow_b21"
> -run_dump_test "underflow_b26"
> -run_dump_test "underflow_pcrel20"
> -run_dump_test "pie_discard"
> --
> 2.36.0
>
Combining these tests in one file would be much nicer (e.g.
https://github.com/MaskRay/llvm-project/blob/main/lld/test/ELF/systemz-reloc-disp12.s)
I wish that someone will implement
https://sourceware.org/bugzilla/show_bug.cgi?id=28602
("binutils/testsuite/lib/binutils-common.exp: Support free-form shell
commands and check patterns")
It takes some effort to implement this new framework and integrate it
into DejaGnu, but the long term benefit will be huge.
Thanks, I will have a try.
在 2024/2/28 上午2:40, Fangrui Song 写道:
> On Mon, Feb 26, 2024 at 11:17 PM mengqinggang <mengqinggang@loongson.cn> wrote:
>> ---
>> .../ld-loongarch-elf/ld-loongarch-elf.exp | 27 ++++++++++---------
>> 1 file changed, 14 insertions(+), 13 deletions(-)
>>
>> diff --git a/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp b/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp
>> index 3a8629a07df..27310fe1275 100644
>> --- a/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp
>> +++ b/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp
>> @@ -133,18 +133,19 @@ if [istarget "loongarch64-*-*"] {
>> run_dump_test "desc-norelax"
>> run_dump_test "desc-relax"
>> }
>> +
>> + run_dump_test "max_imm_b16"
>> + run_dump_test "max_imm_b21"
>> + run_dump_test "max_imm_b26"
>> + run_dump_test "max_imm_pcrel20"
>> + run_dump_test "overflow_b16"
>> + run_dump_test "overflow_b21"
>> + run_dump_test "overflow_b26"
>> + run_dump_test "overflow_pcrel20"
>> + run_dump_test "underflow_b16"
>> + run_dump_test "underflow_b21"
>> + run_dump_test "underflow_b26"
>> + run_dump_test "underflow_pcrel20"
>> + run_dump_test "pie_discard"
>> }
>>
>> -run_dump_test "max_imm_b16"
>> -run_dump_test "max_imm_b21"
>> -run_dump_test "max_imm_b26"
>> -run_dump_test "max_imm_pcrel20"
>> -run_dump_test "overflow_b16"
>> -run_dump_test "overflow_b21"
>> -run_dump_test "overflow_b26"
>> -run_dump_test "overflow_pcrel20"
>> -run_dump_test "underflow_b16"
>> -run_dump_test "underflow_b21"
>> -run_dump_test "underflow_b26"
>> -run_dump_test "underflow_pcrel20"
>> -run_dump_test "pie_discard"
>> --
>> 2.36.0
>>
> Combining these tests in one file would be much nicer (e.g.
> https://github.com/MaskRay/llvm-project/blob/main/lld/test/ELF/systemz-reloc-disp12.s)
> I wish that someone will implement
> https://sourceware.org/bugzilla/show_bug.cgi?id=28602
> ("binutils/testsuite/lib/binutils-common.exp: Support free-form shell
> commands and check patterns")
>
> It takes some effort to implement this new framework and integrate it
> into DejaGnu, but the long term benefit will be huge.
@@ -133,18 +133,19 @@ if [istarget "loongarch64-*-*"] {
run_dump_test "desc-norelax"
run_dump_test "desc-relax"
}
+
+ run_dump_test "max_imm_b16"
+ run_dump_test "max_imm_b21"
+ run_dump_test "max_imm_b26"
+ run_dump_test "max_imm_pcrel20"
+ run_dump_test "overflow_b16"
+ run_dump_test "overflow_b21"
+ run_dump_test "overflow_b26"
+ run_dump_test "overflow_pcrel20"
+ run_dump_test "underflow_b16"
+ run_dump_test "underflow_b21"
+ run_dump_test "underflow_b26"
+ run_dump_test "underflow_pcrel20"
+ run_dump_test "pie_discard"
}
-run_dump_test "max_imm_b16"
-run_dump_test "max_imm_b21"
-run_dump_test "max_imm_b26"
-run_dump_test "max_imm_pcrel20"
-run_dump_test "overflow_b16"
-run_dump_test "overflow_b21"
-run_dump_test "overflow_b26"
-run_dump_test "overflow_pcrel20"
-run_dump_test "underflow_b16"
-run_dump_test "underflow_b21"
-run_dump_test "underflow_b26"
-run_dump_test "underflow_pcrel20"
-run_dump_test "pie_discard"