[LLVMdev] portable way to modify the FP register?

Salvador Abreu spa at di.uevora.pt
Mon Dec 13 07:56:31 PST 2010


Hi,

I'd like to know if there's a portable way of modifying the FP register, in LLVM.

Suppose foo() calls bar(); bar emits a result but remains active and needs to be able to produce more results - a bit like a coroutine.  We want bar to restore FP to what it was inside foo before transferring control back to foo (bar's stack frame is not disposed of).

We'd make sure that foo only accesses local variables via FP (SP addressing is disabled).

What we'd like to do is something like (abstracted syntax and semantics :-)
  (FP) = @llvm.frameaddress(1) ;

So, is there a portable way to change FP?

--
Salvador Abreu       --  http://www.di.uevora.pt/~spa/
Departamento de Informatica
Universidade de Evora - PORTUGAL






More information about the llvm-dev mailing list