Lines Matching defs:PC
354 static uint64_t encodeValueX86(uint64_t Type, uint64_t Value, uint64_t PC) {
362 Value -= PC;
368 static uint64_t encodeValueAArch64(uint64_t Type, uint64_t Value, uint64_t PC) {
379 Value -= PC;
382 Value -= PC;
383 assert(isInt<28>(Value) && "only PC +/- 128MB is allowed for direct call");
389 Value -= PC;
391 "only PC +/- 128MB is allowed for direct branch");
400 static uint64_t encodeValueRISCV(uint64_t Type, uint64_t Value, uint64_t PC) {
410 static uint64_t extractValueX86(uint64_t Type, uint64_t Contents, uint64_t PC) {
419 uint64_t PC) {
429 return static_cast<int64_t>(PC) + SignExtend64<16>(Contents & 0xffff);
431 return static_cast<int64_t>(PC) + SignExtend64<32>(Contents & 0xffffffff);
433 return static_cast<int64_t>(PC) + Contents;
439 return static_cast<int64_t>(PC) + SignExtend64<28>(Contents << 2);
443 return static_cast<int64_t>(PC) + SignExtend64<16>(Contents >> 3);
447 return static_cast<int64_t>(PC) + SignExtend64<21>(Contents >> 3);
463 return static_cast<int64_t>(PC) + SignExtend64<21>(Contents);
466 Contents = static_cast<int64_t>(PC) + SignExtend64<33>(Contents << 12);
551 uint64_t PC) {
836 uint64_t Relocation::encodeValue(uint64_t Type, uint64_t Value, uint64_t PC) {
841 return encodeValueAArch64(Type, Value, PC);
843 return encodeValueRISCV(Type, Value, PC);
845 return encodeValueX86(Type, Value, PC);
850 uint64_t PC) {
855 return extractValueAArch64(Type, Contents, PC);
857 return extractValueRISCV(Type, Contents, PC);
859 return extractValueX86(Type, Contents, PC);