[llvm] r175576 - [ms-inline asm] Force the use of a base pointer if the MachineFunction includes

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Aug 7 16:46:47 PDT 2013


On Aug 7, 2013, at 4:40 PM, Reid Kleckner <rnk at google.com> wrote:

> In retrospect, I don't think this is right, since it miscompiles LLVM's own cpuid call in Host.cpp:
> http://llvm.org/bugs/show_bug.cgi?id=16830
> 
> Chad, can you (or anyone else) elaborate on the conditions under which the frame pointer might not be used to reference the local variable?

When the function prolog needs to realign the stack, the frame pointer is used to hold the original incoming stack pointer which isn’t aligned. This means that the frame pointer can’t be used to access local objects.

When the function contains dynamic allocas, the stack pointer can’t be used to access local objects.

/jakob





More information about the llvm-commits mailing list