This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: [PATCHv2 1/2] In the ARC assembler we have some special flag handling for the ".t" and ".nt" flags which only really applies to ARCv2, though currently the check is performed for all architectures.
- From: Claudiu Zissulescu <Claudiu dot Zissulescu at synopsys dot com>
- To: Rinat Zelig <rinat at mellanox dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Cc: "Cupertino dot Miranda at synopsys dot com" <Cupertino dot Miranda at synopsys dot com>, "Noam Camus" <noamca at mellanox dot com>, Andrew Burgess <andrew dot burgess at embecosm dot com>
- Date: Wed, 15 Mar 2017 14:12:58 +0000
- Subject: RE: [PATCHv2 1/2] In the ARC assembler we have some special flag handling for the ".t" and ".nt" flags which only really applies to ARCv2, though currently the check is performed for all architectures.
- Authentication-results: sourceware.org; auth=none
- References: <DB6PR0501MB2615A2EECF4364A075312404C5270@DB6PR0501MB2615.eurprd05.prod.outlook.com>
Hi,
This looks good from my side. Please wait for the Nick's (or any other binutils maintainer) approval. If you need help in committing the patch I can do that for you.
Cheers,
Claudiu
> -----Original Message-----
> From: Rinat Zelig [mailto:rinat@mellanox.com]
> Sent: Wednesday, March 15, 2017 10:13 AM
> To: binutils@sourceware.org
> Cc: claudiu.zissulescu@synopsys.com; Cupertino.Miranda@synopsys.com;
> Noam Camus <noamca@mellanox.com>; Andrew Burgess
> <andrew.burgess@embecosm.com>; Rinat Zelig <rinat@mellanox.com>
> Subject: FW: [PATCHv2 1/2] In the ARC assembler we have some special flag
> handling for the ".t" and ".nt" flags which only really applies to ARCv2, though
> currently the check is performed for all architectures.
>
> Hi Claudiu,
> Thanks for the feedback.
>
> Changes at second version are:
> 1. remove extra space after dot.
> 2. use ARC_OPCODE_ARCV2 macro.
>
> Regards
> Rinat
>
> In a later commit I'll be adding a new version of the ".nt" flag for an
> ARC700 extension (NPS400) which does not require this same special
> handling.
>
> In this commit I have restricted the special flag handling to only apply if we
> are assembling for ARCv2. This is a restructuring commit, and there should
> be no user visible changes after this commit.
>
> gas/ChangeLog:
>
> * config/tc-arc.c (assemble_insn): Only handle ".t" and ".nt"
> specially for ARCv2.
>
> Signed-off-by: rinat zelig <rinat@mellanox.com>
> ---
> gas/config/tc-arc.c | 18 +++++++++++++-----
> 1 files changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c index a1fd71d..f806ca3
> 100644
> --- a/gas/config/tc-arc.c
> +++ b/gas/config/tc-arc.c
> @@ -4010,11 +4010,19 @@ assemble_insn (const struct arc_opcode
> *opcode,
> if (!strcmp (flg_operand->name, "d"))
> has_delay_slot = TRUE;
>
> - /* There is an exceptional case when we cannot insert a flag
> - just as it is. The .T flag must be handled in relation with
> - the relative address. */
> - if (!strcmp (flg_operand->name, "t")
> - || !strcmp (flg_operand->name, "nt"))
> + /* There is an exceptional case when we cannot insert a flag just as
> + it is. On ARCv2 the '.t' and '.nt' flags must be handled in
> + relation with the relative address. Unfortunately, some of the
> + ARC700 extensions (NPS400) also have a '.nt' flag that should be
> + handled in the normal way.
> +
> + Flag operands don't have an architecture field, so we can't
> + directly validate that FLAG_OPERAND is valid for the current
> + architecture, what we do instead is just validate that we're
> + assembling for an ARCv2 architecture. */
> + if ((selected_cpu.flags & ARC_OPCODE_ARCV2)
> + && (!strcmp (flg_operand->name, "t")
> + || !strcmp (flg_operand->name, "nt")))
> {
> unsigned bitYoperand = 0;
> /* FIXME! move selection bbit/brcc in arc-opc.c. */
> --
> 1.7.1