[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/29991] New: gas: MicroMIPS flag mistakenly erased after align d
From: |
xin.liu at oss dot cipunited.com |
Subject: |
[Bug gas/29991] New: gas: MicroMIPS flag mistakenly erased after align directives |
Date: |
Thu, 12 Jan 2023 11:10:04 +0000 |
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:
```
00000000 <seg1>:
0: 0c004c02 jal 13008 <seg1+0x13008>
4: 00000000 nop
...
```
While the correct one should be:
```
00000000 <seg1>:
0: 4c02 addiu zero,zero,1
2: 0c00 nop
...
```
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] New: gas: MicroMIPS flag mistakenly erased after align directives,
xin.liu at oss dot cipunited.com <=
- [Bug gas/29991] gas: MicroMIPS flag mistakenly erased after align directives, xin.liu at oss dot cipunited.com, 2023/01/12
- [Bug gas/29991] gas: MicroMIPS flag mistakenly erased after align directives, xin.liu at oss dot cipunited.com, 2023/01/12
- [Bug gas/29991] gas: MicroMIPS flag mistakenly erased after align directives, xin.liu at oss dot cipunited.com, 2023/01/12
- [Bug gas/29991] gas: MicroMIPS flag mistakenly erased after align directives, xin.liu at oss dot cipunited.com, 2023/01/12
- [Bug gas/29991] gas: MicroMIPS flag mistakenly erased after align directives, amodra at gmail dot com, 2023/01/12
- [Bug gas/29991] gas: MicroMIPS flag mistakenly erased after align directives, amodra at gmail dot com, 2023/01/13
- [Bug gas/29991] gas: MicroMIPS flag mistakenly erased after align directives, xin.liu at oss dot cipunited.com, 2023/01/13
- [Bug gas/29991] gas: MicroMIPS flag mistakenly erased after align directives, cvs-commit at gcc dot gnu.org, 2023/01/16
- [Bug gas/29991] gas: MicroMIPS flag mistakenly erased after align directives, amodra at gmail dot com, 2023/01/19