From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21864 invoked by alias); 17 Feb 2005 04:43:27 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 21581 invoked from network); 17 Feb 2005 04:43:12 -0000 Received: from unknown (HELO sccrmhc11.comcast.net) (204.127.202.59) by sourceware.org with SMTP; 17 Feb 2005 04:43:12 -0000 Received: from lucon.org ([24.6.212.230]) by comcast.net (sccrmhc14) with ESMTP id <20050217044312014004khfce>; Thu, 17 Feb 2005 04:43:12 +0000 Received: by lucon.org (Postfix, from userid 1000) id 77E5865604; Wed, 16 Feb 2005 20:43:11 -0800 (PST) Date: Thu, 17 Feb 2005 13:05:00 -0000 From: "H. J. Lu" To: James E Wilson Cc: binutils@sources.redhat.com Subject: Re: PATCH: Disable hint in B unit for Montecito Message-ID: <20050217044311.GA26612@lucon.org> References: <20050216170229.GA16645@lucon.org> <1108597856.27293.70.camel@aretha.corp.specifixinc.com> <20050217020214.GA24401@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050217020214.GA24401@lucon.org> User-Agent: Mutt/1.4.1i X-SW-Source: 2005-02/txt/msg00391.txt.bz2 On Wed, Feb 16, 2005 at 06:02:14PM -0800, H. J. Lu wrote: > On Wed, Feb 16, 2005 at 03:50:56PM -0800, James E Wilson wrote: > > On Wed, 2005-02-16 at 09:02, H. J. Lu wrote: > > > + else if (strcmp (idesc->name, "hint") == 0) > > > + { > > > + if (required_unit == IA64_UNIT_B > > > + && md.hint_b != hint_b_ok) > > > + insn_unit = IA64_UNIT_I; > > > + else > > > + insn_unit = required_unit; > > > + } > > > > It isn't OK to change units like this. This will lead to assembler > > errors when explicit mode is used. This example for instance > > .explicit > > { .bbb > > hint @pause > > hint @pause > > hint @pause > > } > > gives me > > aretha$ ./as-new tmp.s > > tmp.s: Assembler messages: > > tmp.s:3: Error: `hint.i' does not fit into BBB template > > which may be confusing to the end user. > > > [...] > > Since b is always at the end of a template, or followed by another b, > > there are no unit changes we can make here. The only thing we can do is > > emit a warning/error, same as in md_assemble, and then emit the hint.b > > instruction that the user asked for. > > > > I don't know if this effects the linux kernel compilation. If it does, > > then we might need to make this a warning instead of an error by > > default. > > It shouldn't be a problem. We can change the kernel if needed. > Unfortunately, it is trickier than I thought. With 2.6 kernel, my old change works OK. My new change doesn't work. Jim, do you have any suggestions? H.J. ---- [hjl@gnu-2 hint-2]$ cat 2.s .global del_timer_sync# del_timer_sync: hint @pause ;; .mib nop 0 cmp.ne p14, p15 = r32, r17 (p14) br.cond.dpnt foo hint @pause ;; [hjl@gnu-2 hint-2]$ /export/build/linux/binutils-branch/build-ia64-linux/gas/as-new -o 2.o 2.s [hjl@gnu-2 hint-2]$ gcc -c 2.s 2.s: Assembler messages: 2.s:10: Error: hint in B unit can't be used [hjl@gnu-2 hint-2]$ /export/build/linux/binutils-branch/build-ia64-linux/gas/as-new -o 2.o 2.s [hjl@gnu-2 hint-2]$ objdump -d 2.o 2.o: file format elf64-ia64-little Disassembly of section .text: 0000000000000000 : 0: 0a 00 00 80 01 00 [MMI] hint.m 0x0;; 6: 00 00 00 02 00 e0 nop.m 0x0 c: 01 8a 38 e0 cmp.eq p15,p14=r32,r17 10: d6 01 00 00 c0 10 [BBB] (p14) br.cond.dpnt.few 10 16: 00 00 00 00 10 00 nop.b 0x0 1c: 00 00 00 20 nop.b 0x0 20: 0d 00 00 00 01 00 [MFI] nop.m 0x0 26: 00 00 00 02 00 00 nop.f 0x0 2c: 00 00 06 00 hint.i 0x0;; [hjl@gnu-2 hint-2]$ gcc -c 2.s -Wa,-mhint.b=ok [hjl@gnu-2 hint-2]$ objdump -d 2.o 2.o: file format elf64-ia64-little Disassembly of section .text: 0000000000000000 : 0: 0a 00 00 80 01 00 [MMI] hint.m 0x0;; 6: 00 00 00 02 00 e0 nop.m 0x0 c: 01 8a 38 e0 cmp.eq p15,p14=r32,r17 10: d7 01 00 00 c0 10 [BBB] (p14) br.cond.dpnt.few 10 16: 00 00 00 02 10 00 hint.b 0x0 1c: 00 00 00 20 nop.b 0x0;; H.J.