search for: stackaddr

Displaying 2 results from an estimated 2 matches for "stackaddr".

Did you mean: stack_addr
2013 Oct 10
3
[LLVMdev] A new builtin: __builtin_stack_pointer()
...n.cpp +++ b/lib/CodeGen/CGBuiltin.cpp @@ -736,6 +736,11 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD, Value *F = CGM.getIntrinsic(Intrinsic::frameaddress); return RValue::get(Builder.CreateCall(F, Depth)); } + case Builtin::BI__builtin_stack_pointer: { + Value *StackAddr = + Builder.CreateCall(CGM.getIntrinsic(Intrinsic::stacksave)); + return RValue::get(StackAddr); + } case Builtin::BI__builtin_extract_return_addr: { Value *Address = EmitScalarExpr(E->getArg(0)); Value *Result = getTargetHooks().decodeReturnAddress(*this, Address);
2016 May 10
4
Atomic LL/SC loops in llvm
...cient to prevent that problem. (But how long is a little while?) If you fail to adhere to the requirements, there's two kinds of issues it might cause. Firstly, it could cause the loop to deterministically never terminate, even when there's nobody else contending on the atomic. E.g. ll <stackaddr>; spill to stack; sc <stackaddr>. On some CPUs, the spill to a nearby stack address will clear the reservation. This issue is what motivated the recent ARM changes for -O0. Or, apparently on some Alpha CPUs, taking a branch deterministically kills the reservation. More insidiously, with t...