Home
last modified time | relevance | path

Searched full:addend (Results 1 – 25 of 564) sorted by relevance

12345678910>>...23

/external/llvm-project/llvm/test/tools/obj2yaml/ELF/
Drelocation-addend.yaml1 ## Test how obj2yaml emits relocation addend descriptions.
6 ## Check how obj2yaml dumps an addend with an arbitrary positive value.
8 # RUN: yaml2obj --docnum=1 %s -o %t1 -D ADDEND=1
14 # ELF64-NEXT: Addend: [[ADDEND]]
16 ## Check how obj2yaml dumps an addend with an arbitrary negative value.
18 # RUN: yaml2obj --docnum=1 %s -o %t2 -D ADDEND=-1
21 ## Check how obj2yaml dumps an addend with the value INT64_MAX.
22 # RUN: yaml2obj --docnum=1 %s -o %t3 -D ADDEND=9223372036854775807
25 ## Check how obj2yaml dumps an addend with the value INT64_MIN.
26 # RUN: yaml2obj --docnum=1 %s -o %t4 -D ADDEND=-9223372036854775808
[all …]
/external/llvm-project/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/
DRuntimeDyldMachOAArch64.h33 /// Extract the addend encoded in the instruction / memory location.
38 int64_t Addend = 0; in decodeAddend() local
83 Addend = *reinterpret_cast<support::ulittle32_t *>(LocalAddress); in decodeAddend()
85 Addend = *reinterpret_cast<support::ulittle64_t *>(LocalAddress); in decodeAddend()
94 // Get the 26 bit addend encoded in the branch instruction and sign-extend in decodeAddend()
97 Addend = (*p & 0x03FFFFFF) << 2; in decodeAddend()
98 Addend = SignExtend64(Addend, 28); in decodeAddend()
107 // Get the 21 bit addend encoded in the adrp instruction and sign-extend in decodeAddend()
110 Addend = ((*p & 0x60000000) >> 29) | ((*p & 0x01FFFFE0) >> 3) << 12; in decodeAddend()
111 Addend = SignExtend64(Addend, 33); in decodeAddend()
[all …]
DRuntimeDyldELFMips.cpp18 resolveMIPSO32Relocation(Section, RE.Offset, Value, RE.RelType, RE.Addend); in resolveRelocation()
20 resolveMIPSN32Relocation(Section, RE.Offset, Value, RE.RelType, RE.Addend, in resolveRelocation()
23 resolveMIPSN64Relocation(Section, RE.Offset, Value, RE.RelType, RE.Addend, in resolveRelocation()
31 uint64_t Addend) { in evaluateRelocation() argument
35 Addend, RE.SymOffset, RE.SectionID); in evaluateRelocation()
110 int64_t Addend, uint64_t SymOffset, SID SectionID) { in evaluateMIPS64Relocation() argument
117 << format("%x", Type) << " Addend: 0x" in evaluateMIPS64Relocation()
118 << format("%llx", Addend) in evaluateMIPS64Relocation()
132 return Value + Addend; in evaluateMIPS64Relocation()
134 return ((Value + Addend) >> 2) & 0x3ffffff; in evaluateMIPS64Relocation()
[all …]
DRuntimeDyldCOFFAArch64.h101 uint64_t Offset, uint64_t RelType, uint64_t Addend, in generateRelocationStub() argument
109 OriginalRelValueRef.Addend = Addend; in generateRelocationStub()
128 const RelocationEntry RE(SectionID, Offset, RelType, Addend); in generateRelocationStub()
134 Addend = 0; in generateRelocationStub()
138 return std::make_tuple(Offset, RelType, Addend); in generateRelocationStub()
167 // Determine the Addend used to adjust the relocation value. in processRelocationRef()
168 uint64_t Addend = 0; in processRelocationRef() local
196 Addend = read32le(Displacement); in processRelocationRef()
200 Addend = (orig & 0x03FFFFFF) << 2; in processRelocationRef()
203 std::tie(Offset, RelType, Addend) = generateRelocationStub( in processRelocationRef()
[all …]
DRuntimeDyldCOFFX86_64.h50 void write32BitOffset(uint8_t *Target, int64_t Addend, uint64_t Delta) { in write32BitOffset() argument
51 uint64_t Result = Addend + Delta; in write32BitOffset()
84 // the symbol resides (RE.Addend provides additional information about the
104 uint64_t Result = Value + RE.Addend; in resolveRelocation()
120 write32BitOffset(Target, RE.Addend, Value - ImageBase); in resolveRelocation()
126 writeBytesUnaligned(Value + RE.Addend, Target, 8); in resolveRelocation()
131 assert(static_cast<int64_t>(RE.Addend) <= INT32_MAX && "Relocation overflow"); in resolveRelocation()
132 assert(static_cast<int64_t>(RE.Addend) >= INT32_MIN && "Relocation underflow"); in resolveRelocation()
133 writeBytesUnaligned(RE.Addend, Target, 4); in resolveRelocation()
145 uint64_t Offset, uint64_t RelType, uint64_t Addend, in generateRelocationStub() argument
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/
DRuntimeDyldMachOAArch64.h33 /// Extract the addend encoded in the instruction / memory location.
38 int64_t Addend = 0; in decodeAddend() local
83 Addend = *reinterpret_cast<support::ulittle32_t *>(LocalAddress); in decodeAddend()
85 Addend = *reinterpret_cast<support::ulittle64_t *>(LocalAddress); in decodeAddend()
94 // Get the 26 bit addend encoded in the branch instruction and sign-extend in decodeAddend()
97 Addend = (*p & 0x03FFFFFF) << 2; in decodeAddend()
98 Addend = SignExtend64(Addend, 28); in decodeAddend()
107 // Get the 21 bit addend encoded in the adrp instruction and sign-extend in decodeAddend()
110 Addend = ((*p & 0x60000000) >> 29) | ((*p & 0x01FFFFE0) >> 3) << 12; in decodeAddend()
111 Addend = SignExtend64(Addend, 33); in decodeAddend()
[all …]
DRuntimeDyldCOFFAArch64.h100 uint64_t Offset, uint64_t RelType, uint64_t Addend, in generateRelocationStub() argument
108 OriginalRelValueRef.Addend = Addend; in generateRelocationStub()
127 const RelocationEntry RE(SectionID, Offset, RelType, Addend); in generateRelocationStub()
133 Addend = 0; in generateRelocationStub()
137 return std::make_tuple(Offset, RelType, Addend); in generateRelocationStub()
166 // Determine the Addend used to adjust the relocation value. in processRelocationRef()
167 uint64_t Addend = 0; in processRelocationRef() local
177 Addend = read32le(Displacement); in processRelocationRef()
181 Addend = (orig & 0x03FFFFFF) << 2; in processRelocationRef()
184 std::tie(Offset, RelType, Addend) = generateRelocationStub( in processRelocationRef()
[all …]
DRuntimeDyldELFMips.cpp18 resolveMIPSO32Relocation(Section, RE.Offset, Value, RE.RelType, RE.Addend); in resolveRelocation()
20 resolveMIPSN32Relocation(Section, RE.Offset, Value, RE.RelType, RE.Addend, in resolveRelocation()
23 resolveMIPSN64Relocation(Section, RE.Offset, Value, RE.RelType, RE.Addend, in resolveRelocation()
31 uint64_t Addend) { in evaluateRelocation() argument
35 Addend, RE.SymOffset, RE.SectionID); in evaluateRelocation()
110 int64_t Addend, uint64_t SymOffset, SID SectionID) { in evaluateMIPS64Relocation() argument
117 << format("%x", Type) << " Addend: 0x" in evaluateMIPS64Relocation()
118 << format("%llx", Addend) in evaluateMIPS64Relocation()
132 return Value + Addend; in evaluateMIPS64Relocation()
134 return ((Value + Addend) >> 2) & 0x3ffffff; in evaluateMIPS64Relocation()
[all …]
DRuntimeDyldCOFFX86_64.h50 void write32BitOffset(uint8_t *Target, int64_t Addend, uint64_t Delta) { in write32BitOffset() argument
51 uint64_t Result = Addend + Delta; in write32BitOffset()
83 // the symbol resides (RE.Addend provides additional information about the
103 uint64_t Result = Value + RE.Addend; in resolveRelocation()
120 write32BitOffset(Target, RE.Addend, Value - ImageBase); in resolveRelocation()
126 writeBytesUnaligned(Value + RE.Addend, Target, 8); in resolveRelocation()
131 assert(static_cast<int64_t>(RE.Addend) <= INT32_MAX && "Relocation overflow"); in resolveRelocation()
132 assert(static_cast<int64_t>(RE.Addend) >= INT32_MIN && "Relocation underflow"); in resolveRelocation()
133 writeBytesUnaligned(RE.Addend, Target, 4); in resolveRelocation()
145 uint64_t Offset, uint64_t RelType, uint64_t Addend, in generateRelocationStub() argument
[all …]
DRuntimeDyldCOFFThumb.h82 // Determine the Addend used to adjust the relocation value. in processRelocationRef()
83 uint64_t Addend = 0; in processRelocationRef() local
92 Addend = readBytesUnaligned(Displacement, 4); in processRelocationRef()
104 << TargetName << " Addend " << Addend << "\n"); in processRelocationRef()
128 SectionID, Offset, RelType, Addend, TargetSectionID, in processRelocationRef()
135 RelocationEntry(SectionID, Offset, RelType, Addend, TargetSectionID, in processRelocationRef()
148 getSymbolOffset(*Symbol) + Addend); in processRelocationRef()
154 SectionID, Offset, RelType, Addend, TargetSectionID, in processRelocationRef()
164 getSymbolOffset(*Symbol) + Addend, true, 0); in processRelocationRef()
189 : Sections[RE.Sections.SectionA].getLoadAddressWithOffset(RE.Addend); in resolveRelocation()
[all …]
/external/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/
DRuntimeDyldMachOAArch64.h34 /// Extract the addend encoded in the instruction / memory location.
39 int64_t Addend = 0; in decodeAddend() local
64 Addend = *reinterpret_cast<support::ulittle32_t *>(LocalAddress); in decodeAddend()
66 Addend = *reinterpret_cast<support::ulittle64_t *>(LocalAddress); in decodeAddend()
73 // Get the 26 bit addend encoded in the branch instruction and sign-extend in decodeAddend()
76 Addend = (*p & 0x03FFFFFF) << 2; in decodeAddend()
77 Addend = SignExtend64(Addend, 28); in decodeAddend()
86 // Get the 21 bit addend encoded in the adrp instruction and sign-extend in decodeAddend()
89 Addend = ((*p & 0x60000000) >> 29) | ((*p & 0x01FFFFE0) >> 3) << 12; in decodeAddend()
90 Addend = SignExtend64(Addend, 33); in decodeAddend()
[all …]
DRuntimeDyldCOFFThumb.h60 // Determine the Addend used to adjust the relocation value. in processRelocationRef()
61 uint64_t Addend = 0; in processRelocationRef() local
70 Addend = readBytesUnaligned(Displacement, 4); in processRelocationRef()
82 << " Addend " << Addend << "\n"); in processRelocationRef()
103 RelocationEntry(SectionID, Offset, RelType, Addend, TargetSectionID, in processRelocationRef()
116 getSymbolOffset(*Symbol) + Addend); in processRelocationRef()
122 RelocationEntry(SectionID, Offset, RelType, Addend, TargetSectionID, in processRelocationRef()
132 getSymbolOffset(*Symbol) + Addend, true, 0); in processRelocationRef()
156 : Sections[RE.Sections.SectionA].getLoadAddressWithOffset(RE.Addend); in resolveRelocation()
172 Sections[0].getLoadAddress() + RE.Addend; in resolveRelocation()
[all …]
/external/llvm-project/llvm/test/tools/llvm-readobj/ELF/
Dreloc-addends.test17 # GNU-RELA64: Type Symbol's Value Symbol's Name + Addend
34 ## FIXME: We either should not dump an addend or should read it from a
58 ## Addend == 0.
59 - Addend: 0x0
61 ## Addend == first positive int64/uint64 == 1.
62 - Addend: 0x1
64 ## Addend == first negative int64 == -1.
65 - Addend: 0xffffffffffffffff
67 ## Addend == max possible int64 == 0x7FFFFFFFFFFFFFFF.
68 - Addend: 0x7FFFFFFFFFFFFFFF
[all …]
/external/llvm-project/llvm/lib/Object/
DRelocationResolver.cpp43 uint64_t LocData, int64_t Addend) { in resolveX86_64() argument
50 return S + Addend; in resolveX86_64()
53 return S + Addend - Offset; in resolveX86_64()
56 return (S + Addend) & 0xFFFFFFFF; in resolveX86_64()
75 uint64_t /*LocData*/, int64_t Addend) { in resolveAArch64() argument
78 return (S + Addend) & 0xFFFFFFFF; in resolveAArch64()
80 return S + Addend; in resolveAArch64()
82 return (S + Addend - Offset) & 0xFFFFFFFF; in resolveAArch64()
84 return S + Addend - Offset; in resolveAArch64()
101 uint64_t LocData, int64_t /*Addend*/) { in resolveBPF()
[all …]
/external/llvm-project/llvm/test/Analysis/BasicAA/
Dsequential-gep.ll5 define void @t1([8 x i32]* %p, i32 %addend, i32* %q) {
7 %add = add nsw nuw i32 %addend, %knownnonzero
8 %gep1 = getelementptr [8 x i32], [8 x i32]* %p, i32 2, i32 %addend
15 define void @t2([8 x i32]* %p, i32 %addend, i32* %q) {
17 %add = add nsw nuw i32 %addend, %knownnonzero
18 %gep1 = getelementptr [8 x i32], [8 x i32]* %p, i32 1, i32 %addend
25 define void @t3([8 x i32]* %p, i32 %addend, i32* %q) {
27 %add = add nsw nuw i32 %addend, %knownnonzero
35 define void @t4([8 x i32]* %p, i32 %addend, i32* %q) {
37 %add = add nsw nuw i32 %addend, %knownnonzero
[all …]
/external/llvm/lib/ExecutionEngine/RuntimeDyld/
DRuntimeDyldELF.cpp228 uint32_t Type, int64_t Addend, in resolveX86_64Relocation() argument
236 Value + Addend; in resolveX86_64Relocation()
237 DEBUG(dbgs() << "Writing " << format("%p", (Value + Addend)) << " at " in resolveX86_64Relocation()
243 Value += Addend; in resolveX86_64Relocation()
256 int64_t RealOffset = Value + Addend - FinalAddress; in resolveX86_64Relocation()
264 int64_t RealOffset = Value + Addend - FinalAddress; in resolveX86_64Relocation()
273 int64_t RealOffset = Value + Addend - FinalAddress; in resolveX86_64Relocation()
283 uint32_t Type, int32_t Addend) { in resolveX86Relocation() argument
287 Value + Addend; in resolveX86Relocation()
293 uint32_t RealOffset = Value + Addend - FinalAddress; in resolveX86Relocation()
[all …]
/external/llvm-project/llvm/lib/ExecutionEngine/RuntimeDyld/
DRuntimeDyldELF.cpp268 uint32_t Type, int64_t Addend, in resolveX86_64Relocation() argument
278 Value + Addend; in resolveX86_64Relocation()
279 LLVM_DEBUG(dbgs() << "Writing " << format("%p", (Value + Addend)) << " at " in resolveX86_64Relocation()
285 Value += Addend; in resolveX86_64Relocation()
298 int64_t RealOffset = Value + Addend - FinalAddress; in resolveX86_64Relocation()
306 int64_t RealOffset = Value + Addend - FinalAddress; in resolveX86_64Relocation()
315 int64_t RealOffset = Value + Addend - FinalAddress; in resolveX86_64Relocation()
332 int64_t GOTOffset = Value - GOTBase + Addend; in resolveX86_64Relocation()
341 uint32_t Type, int32_t Addend) { in resolveX86Relocation() argument
345 Value + Addend; in resolveX86Relocation()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/ExecutionEngine/RuntimeDyld/
DRuntimeDyldELF.cpp268 uint32_t Type, int64_t Addend, in resolveX86_64Relocation() argument
278 Value + Addend; in resolveX86_64Relocation()
279 LLVM_DEBUG(dbgs() << "Writing " << format("%p", (Value + Addend)) << " at " in resolveX86_64Relocation()
285 Value += Addend; in resolveX86_64Relocation()
298 int64_t RealOffset = Value + Addend - FinalAddress; in resolveX86_64Relocation()
306 int64_t RealOffset = Value + Addend - FinalAddress; in resolveX86_64Relocation()
315 int64_t RealOffset = Value + Addend - FinalAddress; in resolveX86_64Relocation()
332 int64_t GOTOffset = Value - GOTBase + Addend; in resolveX86_64Relocation()
341 uint32_t Type, int32_t Addend) { in resolveX86Relocation() argument
345 Value + Addend; in resolveX86Relocation()
[all …]
/external/llvm/include/llvm/Object/
DRelocVisitor.h268 // Ideally the Addend here will be the addend in the data for
284 int64_t Addend = getELFAddend(R); in visitELF_X86_64_64() local
285 return RelocToApply(Value + Addend, 8); in visitELF_X86_64_64()
288 int64_t Addend = getELFAddend(R); in visitELF_X86_64_PC32() local
290 return RelocToApply(Value + Addend - Address, 4); in visitELF_X86_64_PC32()
293 int64_t Addend = getELFAddend(R); in visitELF_X86_64_32() local
294 uint32_t Res = (Value + Addend) & 0xFFFFFFFF; in visitELF_X86_64_32()
298 int64_t Addend = getELFAddend(R); in visitELF_X86_64_32S() local
299 int32_t Res = (Value + Addend) & 0xFFFFFFFF; in visitELF_X86_64_32S()
305 int64_t Addend = getELFAddend(R); in visitELF_PPC64_ADDR32() local
[all …]
/external/llvm-project/llvm/test/tools/yaml2obj/ELF/
Drelocation-addend.yaml1 ## Here we document how yaml2obj handles relocation addend descriptions.
10 ## Addend == UINT64_MAX.
16 ## Addend == first positive integer.
22 ## Addend == 0.
28 ## Addend == first negative integer.
34 ## Addend == INT64_MIN.
37 # TEST: 0x0 R_{{.*}}_PC32 foo [[ADDEND]]
41 ## Addend == 2^64.
45 ## Addend == INT64_MIN - 1.
66 Addend: [[ADDEND]]
[all …]
/external/llvm-project/lld/test/mach-o/
Dparse-arm-relocs.yaml552 # CHECK-NOT: addend:
556 # CHECK: addend: 4
560 # CHECK-NOT: addend:
564 # CHECK: addend: 4
568 # CHECK-NOT: addend:
572 # CHECK: addend: 4
576 # CHECK-NOT: addend:
580 # CHECK: addend: 4
588 # CHECK-NOT: addend:
592 # CHECK: addend: 4
[all …]
/external/llvm-project/lld/lib/ReaderWriter/MachO/
DArchHandler_x86.cpp96 Reference::Addend *addend) override;
107 Reference::Addend *addend) override;
259 Reference::Addend *addend) { in getReferenceInfo() argument
269 *addend = fixupAddress + 4 + (int32_t)*(const little32_t *)fixupContent; in getReferenceInfo()
276 return atomFromAddress(reloc.symbol, targetAddress, target, addend); in getReferenceInfo()
283 if (auto ec = atomFromAddress(0, reloc.value, target, addend)) in getReferenceInfo()
285 *addend = targetAddress - reloc.value; in getReferenceInfo()
292 *addend = fixupAddress + 2 + (int16_t)*(const little16_t *)fixupContent; in getReferenceInfo()
299 return atomFromAddress(reloc.symbol, targetAddress, target, addend); in getReferenceInfo()
306 if (auto ec = atomFromAddress(0, reloc.value, target, addend)) in getReferenceInfo()
[all …]
DArchHandler_x86_64.cpp153 Reference::Addend *addend) override;
164 Reference::Addend *addend) override;
404 Reference::Addend *addend) { in getReferenceInfo() argument
415 *addend = *(const little32_t *)fixupContent; in getReferenceInfo()
420 *addend = (int32_t)*(const little32_t *)fixupContent + 1; in getReferenceInfo()
425 *addend = (int32_t)*(const little32_t *)fixupContent + 2; in getReferenceInfo()
430 *addend = (int32_t)*(const little32_t *)fixupContent + 4; in getReferenceInfo()
434 return atomFromAddress(reloc.symbol, targetAddress, target, addend); in getReferenceInfo()
437 return atomFromAddress(reloc.symbol, targetAddress, target, addend); in getReferenceInfo()
440 return atomFromAddress(reloc.symbol, targetAddress, target, addend); in getReferenceInfo()
[all …]
DArchHandler_arm.cpp90 Reference::Addend *addend) override;
101 Reference::Addend *addend) override;
512 // We need to undo that so it does not look like an addend. in clearThumbBit()
529 const lld::Atom **target, Reference::Addend *addend) { in getReferenceInfo() argument
543 // Instruction contains branch to addend. in getReferenceInfo()
545 *addend = fixupAddress + 4 + displacement; in getReferenceInfo()
555 return atomFromAddress(reloc.symbol, targetAddress, target, addend); in getReferenceInfo()
564 if (auto ec = atomFromAddress(0, reloc.value, target, addend)) in getReferenceInfo()
567 // to atom+addend. in getReferenceInfo()
568 *addend += (targetAddress - reloc.value); in getReferenceInfo()
[all …]
/external/llvm/test/Analysis/BasicAA/
Dsequential-gep.ll5 define void @t1([8 x i32]* %p, i32 %addend, i32* %q) {
7 %add = add nsw nuw i32 %addend, %knownnonzero
8 %gep1 = getelementptr [8 x i32], [8 x i32]* %p, i32 2, i32 %addend
15 define void @t2([8 x i32]* %p, i32 %addend, i32* %q) {
17 %add = add nsw nuw i32 %addend, %knownnonzero
18 %gep1 = getelementptr [8 x i32], [8 x i32]* %p, i32 1, i32 %addend
25 define void @t3([8 x i32]* %p, i32 %addend, i32* %q) {
27 %add = add nsw nuw i32 %addend, %knownnonzero
35 define void @t4([8 x i32]* %p, i32 %addend, i32* %q) {
37 %add = add nsw nuw i32 %addend, %knownnonzero
[all …]

12345678910>>...23