Home | History | Annotate | Download | only in Instrumentation

Lines Matching refs:Shadow

133 // These flags allow to change the shadow mapping.
134 // The shadow mapping looks like
135 // Shadow = (Mem >> scale) + (1 << offset_log)
137 cl::desc("scale of asan shadow mapping"), cl::Hidden, cl::init(0));
139 cl::desc("offset of asan shadow mapping"), cl::Hidden, cl::init(-1));
196 /// This struct defines the shadow mapping using the rule:
197 /// shadow = (mem >> Scale) ADD-or-OR Offset.
214 // OR-ing shadow offset if more efficient (at least on x86),
215 // but on ppc64 we have to use add since the shadow offset is not neccesary
275 Value *memToShadow(Value *Shadow, IRBuilder<> &IRB);
364 // compiler hoists the load of the shadow value somewhere too high.
546 Value *AddressSanitizer::memToShadow(Value *Shadow, IRBuilder<> &IRB) {
547 // Shadow >> scale
548 Shadow = IRB.CreateLShr(Shadow, Mapping.Scale);
550 return Shadow;
551 // (Shadow >> scale) | offset
553 return IRB.CreateOr(Shadow, ConstantInt::get(IntptrTy, Mapping.Offset));
555 return IRB.CreateAdd(Shadow, ConstantInt::get(IntptrTy, Mapping.Offset));
1088 // the shadow memory.
1193 static void PoisonShadowPartialRightRedzone(uint8_t *Shadow,
1199 i+= ShadowGranularity, Shadow++) {
1201 *Shadow = 0; // fully addressable
1203 *Shadow = Magic; // unaddressable
1205 *Shadow = Size - i; // first Size-i bytes are addressable