From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 20 Jan 2015 11:56:52 +0100 Subject: [U-Boot] printf and R9 in ARM architecture In-Reply-To: References: Message-ID: <201501201156.52291.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday, January 20, 2015 at 07:12:35 AM, Da Shi Cao wrote: > In standalone applications, it seems that the execution of printf > function in U-Boot is dependent on the value of register R9, which is > setup in app_startup. But r9 can be used by your program at the > decision of gcc compilation which is not aware of this dependence. > This is especially the case if +O2 is used! +CC the experts who probably broke it ;-) Shouldn't you compile your standalone application with something like -ffixed-r9 ? Best regards, Marek Vasut