From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id D34D63858C52 for ; Wed, 20 Jul 2022 03:20:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D34D63858C52 Received: by mail-pf1-x436.google.com with SMTP id g126so15401649pfb.3 for ; Tue, 19 Jul 2022 20:20:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=sw1cr2nzn/9uMu6zJqxZFQjsjPAy0LmA4Eoh++ZyyMk=; b=fGPuOf9ij4lpCj8aSKUID6P+5s14kGlgmKdTSCKT+ubuLBtzrbfIoiGPXh4P4QTb7N quVU7aWdZ1MX/AkGiGwxC30grdsFiF1Dyq+kpzVGRdWPFKWLtrsTxRIcpk6XkAU4/m74 x/vlOYeLwls6LI5hiR3KTCb/0C82639QQfgwHTamcIfCElE7RkyXYQQfHzOHV1gBr7Jw LChQYsM+AzD45oNd29/HwlAtVzQK4y5/1OiJ3Y44sqh7lxb0l4pK5CtNT9+CBI8cNUoO 2nOERNx6/t0vQYcBQmq2ChtmUabnr59AdR1jfxNMz0hTvhgkQsQOXC7Yg0OsuD7605Oj cp4g== X-Gm-Message-State: AJIora/fl+TzDqNNYT+HChq+ivdnSDnt5+1+0/cUWOSPCqHx59wkO725 vCI8Phg2nTuUJ152iA8DFhtLYrECG7o= X-Google-Smtp-Source: AGRyM1tX0ypR0ypOek6LRSqLIRGEN3AQ/t+tweX1HZkRKy/w/fIl3YZrmQOx3R47IOTQMvR3skGSDg== X-Received: by 2002:a63:2c90:0:b0:40c:fe76:59ef with SMTP id s138-20020a632c90000000b0040cfe7659efmr30974116pgs.288.1658287242773; Tue, 19 Jul 2022 20:20:42 -0700 (PDT) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:2073:7d00:52ba:dd91]) by smtp.gmail.com with ESMTPSA id w8-20020a170902a70800b0016bdb5a3e37sm12306659plq.250.2022.07.19.20.20.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 20:20:42 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id EDA74114331A; Wed, 20 Jul 2022 12:50:39 +0930 (ACST) Date: Wed, 20 Jul 2022 12:50:39 +0930 From: Alan Modra To: Claudiu Zissulescu Cc: binutils@sourceware.org, fbedard@synopsys.com Subject: Re: [committed 2/2] opcodes/arc: Implement style support in the disassembler Message-ID: References: <20220718112501.3284580-1-claziss@gmail.com> <20220718112501.3284580-2-claziss@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220718112501.3284580-2-claziss@gmail.com> X-Spam-Status: No, score=-3036.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2022 03:20:46 -0000 On Mon, Jul 18, 2022 at 02:25:01PM +0300, Claudiu Zissulescu via Binutils wrote: > Update the ARC disassembler to supply style information to the > disassembler output. The output formatting remains unchanged. I see lots of fails in the arc gas teststuite. Please do run the testsuite. regexp "^0x[0-9a-f]+ 21c1 006b adc.lt r1,r1,0x1$" line "0x000000c4 21c1 006b adc.lt r1,r1,1" It's this one: > - (*info->fprintf_func) (info->stream, "%#x", value); > + (*info->fprintf_styled_func) (info->stream, dis_style_immediate, > + "%" PRIx32, value); PRIx32 is wrong anyway, when "value" is an int. Fixed. diff --git a/opcodes/arc-dis.c b/opcodes/arc-dis.c index dbaa96178a8..3490bad4f66 100644 --- a/opcodes/arc-dis.c +++ b/opcodes/arc-dis.c @@ -1408,7 +1408,7 @@ print_insn_arc (bfd_vma memaddr, "%s", rname); else (*info->fprintf_styled_func) (info->stream, dis_style_immediate, - "%" PRIx32, value); + "%#x", value); } } -- Alan Modra Australia Development Lab, IBM