This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, AArch64] Improve diagnostics on ldp/stp with invalid immediate offset


Hi,

This patch improves diagnostics on ldp/stp with invalid immediate offset from

test.s:2: Error: address writeback expected at operand 3 -- `ldp x0,x1,[x2,#4]' test.s:3: Error: unexpected address writeback at operand 3 -- `ldp x0,x1,[x2,#4]!' test.s:4: Error: unexpected address writeback at operand 3 -- `ldp x0,x1,[x2],#4'

to

test.s:2: Error: immediate value should be a multiple of 8 at operand 3 -- `ldp x0,x1,[x2,#4]' test.s:3: Error: immediate value should be a multiple of 8 at operand 3 -- `ldp x0,x1,[x2,#4]!' test.s:4: Error: immediate value should be a multiple of 8 at operand 3 -- `ldp x0,x1,[x2],#4'

The fix is done by using a lower-priority error code for writeback check, so that the higher-priority error of unaligned immediate offset can be exposed to gas.

OK for the trunk and 2.24?

Thanks,
Yufeng

opcodes/

	* aarch64-opc.c (set_syntax_error): New function.
	(operand_general_constraint_met_p): Replace set_other_error
	with set_syntax_error.

gas/testsuite/

	* gas/aarch64/diagnostic.s: Add tests of ldp/stp.
	* gas/aarch64/diagnostic.l: Update.

Attachment: patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]