From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ediCU-0005Ld-ND for qemu-devel@nongnu.org; Mon, 22 Jan 2018 14:56:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ediCR-0000qo-Kt for qemu-devel@nongnu.org; Mon, 22 Jan 2018 14:56:14 -0500 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:35015) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ediCR-0000qT-EP for qemu-devel@nongnu.org; Mon, 22 Jan 2018 14:56:11 -0500 Received: by mail-pg0-x244.google.com with SMTP id o13so2765886pgs.2 for ; Mon, 22 Jan 2018 11:56:11 -0800 (PST) References: <20180117161435.28981-1-richard.henderson@linaro.org> <20180117161435.28981-2-richard.henderson@linaro.org> <87fu6xk8nf.fsf@linaro.org> From: Richard Henderson Message-ID: Date: Mon, 22 Jan 2018 11:56:07 -0800 MIME-Version: 1.0 In-Reply-To: <87fu6xk8nf.fsf@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v10.5 01/20] tcg: Allow multiple word entries into the constant pool List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Alex_Benn=c3=a9e?= , Peter Maydell Cc: QEMU Developers On 01/22/2018 11:15 AM, Alex Bennée wrote: >>> typedef struct TCGLabelPoolData { >>> struct TCGLabelPoolData *next; >>> - tcg_target_ulong data; >>> tcg_insn_unit *label; >>> - intptr_t addend; >>> - int type; >>> + int addend : 32; >>> + int rtype : 16; >>> + int nlong : 16; >>> + tcg_target_ulong data[]; >>> } TCGLabelPoolData; >>> >> >> Seems a bit odd to use bitfields for 32 and 16 bit values, but whatever. >> (My default reaction to bitfields is "be suspicious" :-)) > > I'm guessing this is the same reason as the softfloat re-factor. By > manually forcing stuff into a bitfield the compiler does a better job of > passing multiple structure elements in a single register? > > It would be nice if the compiler could spot this itself though. You're probably right that I could just use int16_t etc. r~