Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional investigation of Python issues in CI #269

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/llvm-project-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ jobs:
# lldb. Using this setup-python action to make 3.10 the default
# python fixes this.
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
python-version: 3.11.11
check-latest: true
- name: Install Ninja
if: runner.os != 'Linux'
uses: llvm/actions/install-ninja@main
Expand Down
44 changes: 44 additions & 0 deletions lld/ELF/Arch/AIE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class AIE final : public TargetInfo {
private:
void relocateAIE1(uint8_t *Loc, const Relocation &rel, uint64_t Val) const;
void relocateAIE2(uint8_t *Loc, const Relocation &rel, uint64_t Val) const;
void relocateAIE2P(uint8_t *Loc, const Relocation &rel, uint64_t Val) const;
};

} // end anonymous namespace
Expand Down Expand Up @@ -361,6 +362,46 @@ void AIE::relocateAIE2(uint8_t *Loc, const Relocation &rel,
return;
}
}
void AIE::relocateAIE2P(uint8_t *Loc, const Relocation &rel,
uint64_t Val) const {
if (errorHandler().verbose)
lld::outs() << "Relocation expr=" << rel.expr << " " << rel.type << "@"
<< getErrorLocation(Loc) << "\n";

// Relocation applied to debug_info
if (rel.expr == R_NONE) {
checkUInt(Loc, Val, 20, rel);
patch4bytes(Loc, Val, 19, 0, 12);
return;
}

switch (rel.type) {
// Most relocations are implemented in a file which is
// automatically generated from the processor description.
#include "AIE2P_rela.inc"
// 62: (symbol_addr_AR + addend ) : addr [19..0]@0 in w8[4]
// 64: (symbol_addr_AR + addend ) : addr [19..0]@0 in w32[1]
// with default addend 0
case 62:
case 64:
checkUInt(Loc, Val, 20, rel);
patch4bytes(Loc, Val, 19, 0, 12);
return;
// 63 : (symbol_addr_AR + addend ) : w32 [31..0]@0 in w8[4]
// 65 : (symbol_addr_AR + addend ) : w32 [31..0]@0 in w32[1]
// with default addend 0
case 63:
case 65:
checkUInt(Loc, Val, 32, rel);
patch4bytes(Loc, Val, 31, 0, 0);
return;
default:
error(getErrorLocation(Loc) +
"unimplemented relocation: " + toString(rel.type));
return;
}
}

void AIE::relocate(uint8_t *Loc, const Relocation &rel, uint64_t Val) const {
unsigned Arch = calcEFlags() & 0x3;
switch (Arch) {
Expand All @@ -372,6 +413,9 @@ void AIE::relocate(uint8_t *Loc, const Relocation &rel, uint64_t Val) const {
case 2:
relocateAIE2(Loc, rel, Val);
break;
case 3:
relocateAIE2P(Loc, rel, Val);
break;
default:
llvm_unreachable("Unknown AIE version in EFLAGS");
}
Expand Down
Loading
Loading