From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Tue, 18 Jul 2017 13:08:44 -0400 Subject: [U-Boot] [PATCH] arm: mach-keystone: Fixes issue with return values in inline assembly In-Reply-To: <20170717180202.13072-1-afd@ti.com> References: <20170717180202.13072-1-afd@ti.com> Message-ID: <20170718170844.GW14320@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Jul 17, 2017 at 01:02:02PM -0500, Andrew F. Davis wrote: > From: "Srinivas, Madan" > > The inline assembly functions in mon.c assume that the caller will > check for the return value in r0 according to regular ARM calling > conventions. > > However, this assumption breaks down if the compiler inlines the > functions. The caller is then under no obligation to use r0 for the > result. > > To fix this disconnect, we must explicitly move the return value > from the smc/bl call to the variable that the function returns. > > Signed-off-by: Madan Srinivas Reviewed-by: Tom Rini -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: