This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 0/2] Fix ISA mode bit handling for .insn annotations
- From: Faraz Shahbazker <fshahbazker at wavecomp dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Cc: Faraz Shahbazker <fshahbazker at wavecomp dot com>, Paul Hua <paul dot hua dot gm at gmail dot com>
- Date: Mon, 5 Aug 2019 23:38:45 +0000
- Subject: [PATCH 0/2] Fix ISA mode bit handling for .insn annotations
- Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=wavecomp.com;dmarc=pass action=none header.from=wavecomp.com;dkim=pass header.d=wavecomp.com;arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eIuvZXJrMv9kKR4BxA1pAX1UI1A9Q5o2PYZJHFFqM/4=; b=QHaWOiTzudPVKdKlB1ld1yQTdHyub9ssit5DABjnX8F4lti/1tloGqMBV+7MjDFUXcICPCLTgfS30miH/MGlu0CXZ6gs8IarfPoPjZSxxjRlaIHq79wC8YopPM87icRJKI1JhP3mzIxV7VZE5rLJ0lxE52TewvPEr/hrS7qEr7kEjwLVuUoVhn4vZg2g91MgmZzvH4KHhIXGglZpSZHeh+dA2/mJUfgHJ6kLwOrSKrA1tRLTLFM6nx7+ytB8KTNXZqnOIl48Te9Af6oInM7qCdJEU5jRy28KA3ml7Np7v2XqtQR+9UreGeylTdbzT39MentAAcIaC9GVVcTASpQb0Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AUBcAp7CEIneS+yvpd71kCts3oVOhaR/ln2e0BERshnBfaWi6T8M6/lhI9BqVnzTx37s5GIIRZGbShzt1rA7uVoCGGmOQU8ZqgNHVqAM0/h9ZsvykMTUSBroo2ISjhezkER07cOK43vKpLTx2SBEF2vyEJ+iE1tJ9Jqc2n9tdYt4p8KTS8MA109n9TI8RmdLXwnuVE8on1yUMMKccIfhvg9+aQioDc17xA/26erTC+zEyQqZJVmM/9BGabVIptbpgG8tpGTkpT1gVv7bKaUGfosGnoBotU7zzDV8oCzMM5xMay0GNVyX5FFGuKRgn7QW5S6AuwO17NL66KnyUXUmng==
Hi,
This series of patches fixes the propagation of ISA mode bit in microMIPS symbols declared with the .insn annotation. Currently implicit alignment in case of a .insn followed by .hword causes the ISA mode bit for the preceding label to be reset, although the type of label remains ST_MICROMIPS. This situation does not arise in generated assembly but is possible in hand-written assembly.
Patch #1 ensures that the existing ISA mode bit is carried forward across alignment. This causes misalignment checks to fail simply because the calculation of the target address for error messages assumes that the ISA mode bit is never set. Patch #2 corrects those error messages to dis-regard the ISA bit.
Regards,
Faraz Shahbazker (2):
MIPS/gas: Retain ISA mode bit for labels with .insn annotation
MIPS/gas: Fix misaligned address errors to disregard ISA mode bit
gas/config/tc-mips.c | 34 ++++++++++++++++++++++++++--------
gas/testsuite/gas/mips/insn-isa-mode.d | 16 ++++++++++++++++
gas/testsuite/gas/mips/insn-isa-mode.s | 14 ++++++++++++++
gas/testsuite/gas/mips/mips.exp | 1 +
4 files changed, 57 insertions(+), 8 deletions(-)
create mode 100644 gas/testsuite/gas/mips/insn-isa-mode.d
create mode 100644 gas/testsuite/gas/mips/insn-isa-mode.s
--
2.9.5