[Bug gas/29991] gas: MicroMIPS flag mistakenly erased after align directives
https://sourceware.org/bugzilla/show_bug.cgi?id=29991 --- Comment #6 from 刘鑫 --- (In reply to Alan Modra from comment #5) > Created attachment 14589 [details] > Simpler patch > > Please verify that the attached patch works for you. It should be OK to run > file_mips_check_options and mips_mark_labels without your define_label > logic. I moved the mips_mark_labels call after .align expression parsing as > is done with other directives. Yes, I can verify this patch works, the new patch could pass testcases I have written. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gas/29991] gas: MicroMIPS flag mistakenly erased after align directives
https://sourceware.org/bugzilla/show_bug.cgi?id=29991 --- Comment #1 from 刘鑫 --- Created attachment 14585 --> https://sourceware.org/bugzilla/attachment.cgi?id=14585&action=edit test code:align-after-label.s -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gas/29991] New: gas: MicroMIPS flag mistakenly erased after align directives
https://sourceware.org/bugzilla/show_bug.cgi?id=29991 Bug ID: 29991 Summary: gas: MicroMIPS flag mistakenly erased after align directives Product: binutils Version: 2.40 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: xin.liu at oss dot cipunited.com Target Milestone: --- Created attachment 14584 --> https://sourceware.org/bugzilla/attachment.cgi?id=14584&action=edit this is the patch file. To reproduce this behaviour, I have used the following assembly code with `-EL -mmicromips -mips32r5` ``` .set micromips seg1: .align 2 addiu $0, $0, 1 ``` The correct objdump of this would have its all sections marked with micromips, but when the align directive on line 3 is added, the code after "seg1" label won't have the micromips flag, the resulting objdump shown as following. The incorrect behaviour would be: ``` : 0: 0c004c02jal 13008 4: nop ... ``` While the correct one should be: ``` : 0: 4c02addiu zero,zero,1 2: 0c00nop ... ``` The patch attached would fix this problem by defining a new flag which would be setted when the micromips flag is set and the assembler reads label definitions, then the flag is read every time the parser reads the '.align' directive so it could correct the behaviour by set the micromips to true, the flag is cleared after the correction. There are 2 more tests added for the patch, the files are attached with the patch. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gas/29991] gas: MicroMIPS flag mistakenly erased after align directives
https://sourceware.org/bugzilla/show_bug.cgi?id=29991 刘鑫 changed: What|Removed |Added CC||xin.liu at oss dot cipunited.com -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gas/29991] gas: MicroMIPS flag mistakenly erased after align directives
https://sourceware.org/bugzilla/show_bug.cgi?id=29991 --- Comment #2 from 刘鑫 --- Created attachment 14586 --> https://sourceware.org/bugzilla/attachment.cgi?id=14586&action=edit testcase1:mips-align-after-label.d -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gas/29991] gas: MicroMIPS flag mistakenly erased after align directives
https://sourceware.org/bugzilla/show_bug.cgi?id=29991 --- Comment #3 from 刘鑫 --- Created attachment 14587 --> https://sourceware.org/bugzilla/attachment.cgi?id=14587&action=edit testcase2:micromips-align-after-label.d -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gas/29990] gas: micromips flag mistakenly erased after align directive
https://sourceware.org/bugzilla/show_bug.cgi?id=29990 --- Comment #5 from 刘鑫 --- Created attachment 14581 --> https://sourceware.org/bugzilla/attachment.cgi?id=14581&action=edit tescase2:micromips-align-after-label.d -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gas/29990] gas: micromips flag mistakenly erased after align directive
https://sourceware.org/bugzilla/show_bug.cgi?id=29990 --- Comment #6 from 刘鑫 --- Created attachment 14582 --> https://sourceware.org/bugzilla/attachment.cgi?id=14582&action=edit this is the patch file. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gas/29990] gas: micromips flag mistakenly erased after align directive
https://sourceware.org/bugzilla/show_bug.cgi?id=29990 --- Comment #3 from 刘鑫 --- Created attachment 14579 --> https://sourceware.org/bugzilla/attachment.cgi?id=14579&action=edit test code:align-after-label.s -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gas/29990] gas: micromips flag mistakenly erased after align directive
https://sourceware.org/bugzilla/show_bug.cgi?id=29990 --- Comment #7 from 刘鑫 --- Created attachment 14583 --> https://sourceware.org/bugzilla/attachment.cgi?id=14583&action=edit this is the patch file. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gas/29990] gas: micromips flag mistakenly erased after align directive
https://sourceware.org/bugzilla/show_bug.cgi?id=29990 刘鑫 changed: What|Removed |Added Summary|gas: mistakenly mark|gas: micromips flag |micromips if .align after |mistakenly erased after |label |align directive CC||xin.liu at oss dot cipunited.com Version|unspecified |2.40 --- Comment #1 from 刘鑫 --- To reproduce this behaviour, I used the following assembly code with -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gas/29990] gas: micromips flag mistakenly erased after align directive
https://sourceware.org/bugzilla/show_bug.cgi?id=29990 --- Comment #4 from 刘鑫 --- Created attachment 14580 --> https://sourceware.org/bugzilla/attachment.cgi?id=14580&action=edit tescase1:mips-align-after-label.d -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gas/29990] gas: micromips flag mistakenly erased after align directive
https://sourceware.org/bugzilla/show_bug.cgi?id=29990 --- Comment #2 from 刘鑫 --- Created attachment 14578 --> https://sourceware.org/bugzilla/attachment.cgi?id=14578&action=edit this is the patch file. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug gas/29990] New: gas: mistakenly mark micromips if .align after label
https://sourceware.org/bugzilla/show_bug.cgi?id=29990 Bug ID: 29990 Summary: gas: mistakenly mark micromips if .align after label Product: binutils Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: xin.liu at oss dot cipunited.com Target Milestone: --- -- You are receiving this mail because: You are on the CC list for the bug.