Displaying 3 results from an estimated 3 matches for "mainctx".
Did you mean:
mail_ctx
2010 Apr 07
2
[LLVMdev] Proposal: stack/context switching within a thread
..., {}* %prevCtx)
call void @printCo2SecondMessage()
call void @llvm.swapcontext({}* %thisCtx, {}* %prevCtx)
call void @printCo2ThirdMessage()
}
define i32 @main() nounwind {
entry:
; alloca space for the contexts.
%ctxSize = call i64 @llvm.context.size()
%p0 = alloca i8, i64 %ctxSize
%mainCtx = bitcast i8* %p0 to {}*
%p1 = alloca i8, i64 %ctxSize
%ctx1 = bitcast i8* %p1 to {}*
%p2 = alloca i8, i64 %ctxSize
%ctx2 = bitcast i8* %p2 to {}*
; Stacks for the contexts
%stack1 = alloca i8, i64 4096
%stack2 = alloca i8, i64 4096
; Create contexts for co1 and co2.
call void @...
2010 Apr 11
0
[LLVMdev] Proposal: stack/context switching within a thread
...void @printCo2SecondMessage()
call void @llvm.swapcontext({}* %thisCtx, {}* %prevCtx)
call void @printCo2ThirdMessage()
ret void
}
define i32 @main() nounwind {
entry:
; alloca space for the context descriptors.
%ctxSize = call i64 @llvm.context.size()
%p0 = alloca i8, i64 %ctxSize
%mainCtx = bitcast i8* %p0 to {}*
%p1 = alloca i8, i64 %ctxSize
%ctx1 = bitcast i8* %p1 to {}*
%p2 = alloca i8, i64 %ctxSize
%ctx2 = bitcast i8* %p2 to {}*
; Stacks for the contexts. If llvm.stackgrowsdown returns true, we need
; pointers to the highest addresses of the stack areas rather than...
2010 Apr 11
3
[LLVMdev] Proposal: stack/context switching within a thread
Kenneth Uildriks <kennethuil at gmail.com> wrote:
> As I see it, the context switching mechanism itself needs to know
> where to point the stack register when switching. The C routines take
> an initial stack pointer when creating the context, and keep track of
> it from there. If we don't actually need to interoperate with
> contexts created from the C routines, we have