|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] remove dead code from arm/decode.c
Hi Stefano, On 10/12/16 01:31, Stefano Stabellini wrote: The rt variable can only be 0 or 7, no need to check if it's 15. Be careful, Coverity may point to dead code but it does not mean that deleting it is the right thing to do. The code which lead to this conclusion may be invalid. In this case, the dead code is happening because the rt variable has been miscalculated (see below). Looking at the encoding of Thumb2 instruction (see encoding T2 for LDRB A8.8.70 in ARM DDI 0406C.c), this check is correct. However, the line 44 "rt = (hw2 >> 12) & 7" will not retrieve the correct register as it should be encoded with 4 bits. So the code should have been rt = (hw2 >> 12) & 0xf; Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |