From owner-svn-src-head@freebsd.org Tue Jul 7 08:41:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4091F97C9; Tue, 7 Jul 2015 08:41:04 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 06F5D1062; Tue, 7 Jul 2015 08:41:03 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 028F23C398B; Tue, 7 Jul 2015 18:40:53 +1000 (AEST) Date: Tue, 7 Jul 2015 18:40:53 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Justin Hibbits cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285227 - head/sys/powerpc/powerpc In-Reply-To: <201507070237.t672bToa061000@repo.freebsd.org> Message-ID: <20150707174511.I1878@besplex.bde.org> References: <201507070237.t672bToa061000@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ItbjC+Lg c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=GS57zLzatOhM7tCpRf8A:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 08:41:04 -0000 On Tue, 7 Jul 2015, Justin Hibbits wrote: > Log: > style(9) cleanups. > > Don't use PRIxPTR, these registers are 32-bits, cast to u_long instead. > > Pointed out by: bde Thanks. This could actually cast to u_int if values are really 32 bits even when the arch is 64 bits. I don't know if that is the best way to think of them. Registers smaller than the arch width are rare. x86 has some for segment registers. These are 16 bits, and I think of them like that. The difference actually causes minor problems: when you push these registers or move them to a wider integer register, they get extended in unclear MD ways. I don't like some recent changes that pessimize the pushes of segment registers to pushs of $0 followed by a 16-bit store. This pessimizes code that is executed on every entry to the kernel, to do little more than fix printing of the registers in debuggers. Uninitialized bits should be part of the ABI, and printing routines should cast to uint16_t to remove them. Better ABIs would only use 16 bits for them, and pack them in structs, but it is convenient to use register_t for all registers, and not pack trap frames. Several bad examples of PRI* remain. Bruce