Hi Wilco, > On 8 Feb 2019, at 15:49, Wilco Dijkstra <wilco.dijks...@arm.com> wrote: > > Hi Olivier, > >> Below is a description of a very annoying bug we are witnessing >> on ARM. > ... >> compiled with -Og -mapcs > > Do you know -mapcs has been deprecated for more than 4 years now? > Is there a reason you are still using it? It was deprecated since -mapcs > is both extremely inefficient and buggy. I would strongly suggest to stop > using this option completely in all your software.
Sorry, I had -mapcs-frame in mind. The investigation I described was conducted with the default settings of the VxWorks port (no particular option) and thought it might be of greater potential interest if exposed with a bare eabi compiler. The conditions of interest are guarded with IS_NESTED (arm_current_func_type ()) && ((TARGET_APCS_FRAME && frame_pointer_needed && TARGET_ARM) Turns out that the arm-eabi code with -mapcs-frame is very slightly different than the vxworks one, which I missed on the first reading. Let me double check again ... > It's useful to create a bug report with the details, however it might not be > worth fixing if the issue cannot be reproduced without -mapcs. -mapcs > was never meant to support a static chain, especially not spills of the > static chain. Understood. I'll start by examining the differences between the vxworks and the eabi+aapcs-frame configurations more closely, and I'll report back. Thanks for your feedback!