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

Yufeng Zhang Yufeng.Zhang@arm.com
Tue Nov 5 17:49:00 GMT 2013


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.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20131105/ec7bee42/attachment.ksh>


More information about the Binutils mailing list