[RFC][AARCH64][GAS]Stop creating new frag for .inst directive

Renlin Li renlin.li@arm.com
Mon Mar 23 11:18:00 GMT 2015


Hi all,

I don't see any particular reasons why we call frag_align_code here.
If it's indeed have reasons to do so, I would be quite happy if somebody could explain it to me.

By removing the code to create a new frag when handling .inst directive, it fixes the error while assembling the following short code:

	.inst	0x01020304
	.if  ((. - 1b) != 4)
		.error	blah
	.endif

Previously, .inst will create a frag, and (. - 1b) expression is non-constant as they are in different frags and frag_offset_fixed_p returns false.
A error message will be produced: "Error: non-constant expression in".if"  statement"

After the change, the above code can be assembled without errors.


gas and aarch64-none-elf regression tests finish without new issues.
Okay to commit?

Regards,
Renlin Li


gas/ChangeLog:

2015-03-23  Renlin Li  <renlin.li@arm.com>

	* config/tc-aarch64.c (s_aarch64_inst): Stop creating new frag.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new.diff
Type: text/x-patch
Size: 347 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150323/e23b8048/attachment.bin>


More information about the Binutils mailing list