Skip to content

Commit 1a3d5da

Browse files
committed
Merge remote-tracking branch 'official/main' into users/meinersbur/flang_runtime_split-headers
2 parents 446dbbf + 0cda970 commit 1a3d5da

File tree

4 files changed

+5
-16
lines changed

4 files changed

+5
-16
lines changed

clang/test/AST/ByteCode/builtin-bit-cast-bitfields.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -verify=expected,both -std=c++2a -fsyntax-only -fexperimental-new-constant-interpreter %s
1+
// RUN: %clang_cc1 -verify=expected,both -std=c++2a -fsyntax-only -triple x86_64-linux-gnu -fexperimental-new-constant-interpreter %s
22
// RUN: %clang_cc1 -verify=expected,both -std=c++2a -fsyntax-only -triple armv8 -fexperimental-new-constant-interpreter %s
33
// RUN: %clang_cc1 -verify=expected,both -std=c++2a -fsyntax-only -triple aarch64_be-linux-gnu -fexperimental-new-constant-interpreter %s
44
// RUN: %clang_cc1 -verify=expected,both -std=c++2a -fsyntax-only -fexperimental-new-constant-interpreter -triple powerpc64le-unknown-unknown -mabi=ieeelongdouble %s

lld/ELF/Arch/RISCV.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ RelExpr RISCV::getRelExpr(const RelType type, const Symbol &s,
267267
case R_RISCV_HI20:
268268
case R_RISCV_LO12_I:
269269
case R_RISCV_LO12_S:
270-
case R_RISCV_RVC_LUI:
271270
return R_ABS;
272271
case R_RISCV_ADD8:
273272
case R_RISCV_ADD16:
@@ -373,19 +372,6 @@ void RISCV::relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const {
373372
return;
374373
}
375374

376-
case R_RISCV_RVC_LUI: {
377-
int64_t imm = SignExtend64(val + 0x800, bits) >> 12;
378-
checkInt(ctx, loc, imm, 6, rel);
379-
if (imm == 0) { // `c.lui rd, 0` is illegal, convert to `c.li rd, 0`
380-
write16le(loc, (read16le(loc) & 0x0F83) | 0x4000);
381-
} else {
382-
uint16_t imm17 = extractBits(val + 0x800, 17, 17) << 12;
383-
uint16_t imm16_12 = extractBits(val + 0x800, 16, 12) << 2;
384-
write16le(loc, (read16le(loc) & 0xEF83) | imm17 | imm16_12);
385-
}
386-
return;
387-
}
388-
389375
case R_RISCV_JAL: {
390376
checkInt(ctx, loc, val, 21, rel);
391377
checkAlignment(ctx, loc, val, 2, rel);

lld/docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ ELF Improvements
3939
Breaking changes
4040
----------------
4141

42+
* Removed support for the (deprecated) `R_RISCV_RVC_LUI` relocation. This
43+
was a binutils-internal relocation used during relaxation, and was not
44+
emitted by compilers/assemblers.
45+
4246
COFF Improvements
4347
-----------------
4448
* ``/includeglob`` has been implemented to match the behavior of ``--undefined-glob`` available for ELF.

llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ ELF_RELOC(R_RISCV_GOT32_PCREL, 41)
4545
ELF_RELOC(R_RISCV_ALIGN, 43)
4646
ELF_RELOC(R_RISCV_RVC_BRANCH, 44)
4747
ELF_RELOC(R_RISCV_RVC_JUMP, 45)
48-
ELF_RELOC(R_RISCV_RVC_LUI, 46)
4948
ELF_RELOC(R_RISCV_RELAX, 51)
5049
ELF_RELOC(R_RISCV_SUB6, 52)
5150
ELF_RELOC(R_RISCV_SET6, 53)

0 commit comments

Comments
 (0)