diff options
author | Lulu Cai <cailulu@loongson.cn> | 2025-05-19 11:05:22 +0800 |
---|---|---|
committer | cailulu <cailulu@loongson.cn> | 2025-05-22 09:26:17 +0800 |
commit | 12b4fc15e7261c2557175b3d5bda64da79718359 (patch) | |
tree | 908c8371b7d70ef262f5e5cf9bd636240925645a | |
parent | 0eb4f036e4e99c23a421fc3a5e98f9a146b27d33 (diff) | |
download | binutils-12b4fc15e7261c2557175b3d5bda64da79718359.zip binutils-12b4fc15e7261c2557175b3d5bda64da79718359.tar.gz binutils-12b4fc15e7261c2557175b3d5bda64da79718359.tar.bz2 |
LoongArch: Warning about incorrect 3rd argument of .align
344b1e0f5f7 Introduced range-check 3rd argument of .align, incorrect
value are not converted silently. added warning message to fix regression.
-rw-r--r-- | gas/testsuite/gas/loongarch/relax_align.d | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/loongarch/relax_align.l | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/loongarch/relax_align.s | 6 |
3 files changed, 13 insertions, 2 deletions
diff --git a/gas/testsuite/gas/loongarch/relax_align.d b/gas/testsuite/gas/loongarch/relax_align.d index fc1fd03..a92df37 100644 --- a/gas/testsuite/gas/loongarch/relax_align.d +++ b/gas/testsuite/gas/loongarch/relax_align.d @@ -1,6 +1,7 @@ #as: #objdump: -dr #skip: loongarch32-*-* +#warning_output: relax_align.l .*:[ ]+file format .* @@ -44,3 +45,8 @@ Disassembly of section .text: [ ]+68:[ ]+03400000[ ]+nop [ ]+6c:[ ]+03400000[ ]+nop [ ]+70:[ ]+4c000020[ ]+ret +[ ]+74:[ ]+03400000[ ]+nop +[ ]+74: R_LARCH_ALIGN[ ]+\*ABS\*\+0xc +[ ]+78:[ ]+03400000[ ]+nop +[ ]+7c:[ ]+03400000[ ]+nop +[ ]+80:[ ]+4c000020[ ]+ret diff --git a/gas/testsuite/gas/loongarch/relax_align.l b/gas/testsuite/gas/loongarch/relax_align.l new file mode 100644 index 0000000..e33fa86 --- /dev/null +++ b/gas/testsuite/gas/loongarch/relax_align.l @@ -0,0 +1,3 @@ +.*Assembler messages: +.*: Warning: ignoring out of range alignment maximum +.*: Warning: ignoring out of range alignment maximum diff --git a/gas/testsuite/gas/loongarch/relax_align.s b/gas/testsuite/gas/loongarch/relax_align.s index 4f4867f..079f549 100644 --- a/gas/testsuite/gas/loongarch/relax_align.s +++ b/gas/testsuite/gas/loongarch/relax_align.s @@ -1,5 +1,4 @@ -# If max < -0x80000000, max becomes a positive number because type conversion -# (bfd_signed_vma -> unsigned int). +# Range of max: 0<= max <= 0xffffffff .text .L1: ret @@ -13,6 +12,9 @@ ret .align 4, , 12 ret + .align 4, , 0xffffffff + ret +# ignore out of range alignment maxumum .align 4, , -1 ret .align 4, , -0x80000000 |