From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v3 1/2] xen/arm: Start to implement an ARM decoder instruction Date: Wed, 31 Jul 2013 17:39:30 +0100 Message-ID: <51F93DC2.1030606@linaro.org> References: <1375282195-21653-1-git-send-email-julien.grall@linaro.org> <1375282195-21653-2-git-send-email-julien.grall@linaro.org> <1375284879.7382.106.camel@kazak.uk.xensource.com> <51F938E2.5000902@linaro.org> <1375287993.7382.115.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1375287993.7382.115.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, patches@linaro.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 07/31/2013 05:26 PM, Ian Campbell wrote: > On Wed, 2013-07-31 at 17:18 +0100, Julien Grall wrote: > > >>>> + switch ( opB & 0x3 ) >>>> + { >>>> + case 0: >>>> + dabt->size = 2; >>>> + break; >>>> + case 1: >>>> + dabt->size = 1; >>> >>> ->sign is uninitialised for these two cases? >>> >>> Actually, for many of them I think? >> >> I plan to zeroed the ISS field (ie sign, reg...) by default. See TODO in >> decode_instruction. Do I still need to set sign to 0? > > Well, you need to at least do one or the other! > > Even if you are zeroing the iss be default I think it would be useful > from a documentation/clarity perspective to set it explicitly to zero. There is only few functions which deal with signed-register. So if we add a line "dabt->sign = 0" it's less clear. What about a helper? update_dabt(struct hsr_dabt *dabt, uint16_t reg, uint8_t size, bool_t sign) -- Julien