[llvm-branch-commits] [clang] [PAC][Driver] Support ptrauth flags only on ARM64 Darwin or with pauthtest ABI (PR #113152)

2024-12-07 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay requested changes to this pull request. . https://github.com/llvm/llvm-project/pull/113152 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-co

[llvm-branch-commits] [clang] [PAC][Driver] Support ptrauth flags only on ARM64 Darwin or with pauthtest ABI (PR #113152)

2024-12-07 Thread Fangrui Song via llvm-branch-commits
@@ -543,12 +543,59 @@ static void handlePAuthABI(const Driver &D, const ArgList &DriverArgs, CC1Args.push_back("-faarch64-jump-table-hardening"); } +static void addPointerAuthFlags(const llvm::opt::ArgList &DriverArgs, MaskRay wrote: There is a lot of du

[llvm-branch-commits] [clang] [PAC][Driver] Support ptrauth flags only on ARM64 Darwin or with pauthtest ABI (PR #113152)

2024-12-07 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/113152 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [RISCV] Change linker job in Baremetal toolchain object accomodate GCCInstallation.(2/3) (PR #121830)

2025-01-06 Thread Fangrui Song via llvm-branch-commits
@@ -59,4 +97,39 @@ // RUN: | FileCheck -check-prefix=CXX-ARM-BAREMETAL-NOSYSROOT-LIBCXX %s // CXX-ARM-BAREMETAL-NOSYSROOT-LIBCXX: "-internal-isystem" "{{.*}}/Inputs/basic_arm_gcc_tree/lib/gcc/armv6m-none-eabi/8.2.1/../../../../armv6m-none-eabi/include/c++/v1" -// CXX-ARM-BA

[llvm-branch-commits] [compiler-rt] [ubsan] Runtime and driver support for local-bounds (PR #120515)

2024-12-27 Thread Fangrui Song via llvm-branch-commits
@@ -14,12 +15,17 @@ __attribute__((noinline)) void init(S *s) { __asm__ __volatile__("" : : "r"(s) : "memory"); } -__attribute__((noinline, no_sanitize("memory"))) int test(char i) { +__attribute__((noinline, no_sanitize("memory", "address", "hwaddress"))) int +test(char i)

[llvm-branch-commits] [compiler-rt] [ubsan] Runtime and driver support for local-bounds (PR #120515)

2024-12-27 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/120515 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [lld][WebAssembly] Replace config-> with ctx.arg. (PR #119835)

2024-12-27 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: Ping:) https://github.com/llvm/llvm-project/pull/119835 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [SPARC][IAS] Add IAS flag handling for ISA levels (PR #125151)

2025-02-07 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/125151 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [SPARC][IAS] Add IAS flag handling for ISA levels (PR #125151)

2025-02-07 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. We try to support very few -Wa,... options for the integrated assembler, since as you can see, the number of lines increases quite a lot. if this option is so frequently used, i think this is ok. https://github.com/llvm/llvm-project/pull/1

[llvm-branch-commits] [SPARC][IAS] Add IAS flag handling for ISA levels (PR #125151)

2025-02-07 Thread Fangrui Song via llvm-branch-commits
@@ -2842,6 +2868,12 @@ static void CollectArgsForIntegratedAssembler(Compilation &C, CmdArgs.push_back("-target-feature"); CmdArgs.push_back(MipsTargetFeature); } + if (!SparcTargetFeatures.empty()) { MaskRay wrote: `if` can be dropped https://git

[llvm-branch-commits] [ELF] Add support for CREL locations for SHT_LLVM_BB_ADDR_MAP (PR #126446)

2025-02-09 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/126446 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] release/20.x: [llvm-objcopy][ReleaseNotes] Fix prints wrong path when dump-section output path doesn't exist #125345 (PR #126607)

2025-02-10 Thread Fangrui Song via llvm-branch-commits
@@ -460,6 +460,8 @@ Changes to the LLVM tools `--localize-symbol`, `--localize-symbols`, `--skip-symbol`, `--skip-symbols`. +* llvm-objcopy now prints the correct file path in the error message when the output file specified by --dump-section cannot be opened. ---

[llvm-branch-commits] [llvm] release/20.x: [llvm-objcopy][ReleaseNotes] Fix prints wrong path when dump-section output path doesn't exist #125345 (PR #126607)

2025-02-10 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/126607 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm][AsmPrinter] Emit call graph section (PR #87576)

2025-02-01 Thread Fangrui Song via llvm-branch-commits
@@ -0,0 +1,73 @@ +; Tests that we store the type identifiers in .callgraph section of the binary. + +; RUN: llc --call-graph-section -filetype=obj -o - < %s | \ +; RUN: llvm-readelf -x .callgraph - | FileCheck %s + +target triple = "x86_64-unknown-linux-gnu" MaskR

[llvm-branch-commits] [lld] release/20.x: [ELF] Refine isExported/isPreemptible condition (PR #125334)

2025-02-02 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/125334 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [PAC][Driver] Support ptrauth flags only on ARM64 Darwin or with pauthtest ABI (PR #113152)

2024-12-17 Thread Fangrui Song via llvm-branch-commits
@@ -15,50 +16,85 @@ // RUN: -fno-ptrauth-indirect-gotos -fptrauth-indirect-gotos \ // RUN: -fno-ptrauth-init-fini -fptrauth-init-fini \ // RUN: -fno-ptrauth-init-fini-address-discrimination -fptrauth-init-fini-address-discrimination \ +// RUN: -fno-ptrauth-elf-got -fpt

[llvm-branch-commits] [clang] [PAC][Driver] Support ptrauth flags only on ARM64 Darwin or with pauthtest ABI (PR #113152)

2024-12-17 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/113152 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [lld][WebAssembly] Replace config-> with ctx.arg. (PR #119835)

2024-12-17 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/119835 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [lld][WebAssembly] Replace config-> with ctx.arg. (PR #119835)

2024-12-17 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: Updated the description. This consolidates global variables. https://github.com/llvm/llvm-project/pull/119835 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-b

[llvm-branch-commits] [lld][WebAssembly] Replace config-> with ctx.arg. (PR #119835)

2024-12-17 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/119835 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [lld][WebAssembly] Replace config-> with ctx.arg. (PR #119835)

2024-12-17 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/119835 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [lld, wasm] Replace config-> with ctx.arg. (PR #119835)

2024-12-12 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/119835 None ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [lld] [PAC][lld][AArch64][ELF] Support signed GOT with tiny code model (PR #113816)

2024-11-17 Thread Fangrui Song via llvm-branch-commits
@@ -78,6 +78,79 @@ _start: adrp x1, :got_auth:zed add x1, x1, :got_auth_lo12:zed +#--- ok-tiny.s + +# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux ok-tiny.s -o ok-tiny.o MaskRay wrote: `none` is also an OS component and is misleading when used t

[llvm-branch-commits] [lld] [PAC][lld][AArch64][ELF] Support signed GOT with tiny code model (PR #113816)

2024-11-17 Thread Fangrui Song via llvm-branch-commits
@@ -78,6 +78,79 @@ _start: adrp x1, :got_auth:zed add x1, x1, :got_auth_lo12:zed +#--- ok-tiny.s + +# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux ok-tiny.s -o ok-tiny.o + +# RUN: ld.lld ok-tiny.o a.so -pie -o external-tiny +# RUN: llvm-readelf -r -S -x .got exte

[llvm-branch-commits] [lld] [lld][LoongArch] GOT indirection to PC relative optimization. (PR #123743)

2025-01-21 Thread Fangrui Song via llvm-branch-commits
@@ -1150,6 +1152,58 @@ void LoongArch::tlsdescToLe(uint8_t *loc, const Relocation &rel, } } +// Try GOT indirection to PC relative optimization when relaxation is enabled. +// From: +// * pcalau12i $a0, %got_pc_hi20(sym_got) +// * ld.w/d$a0, $a0, %got_pc_lo12(sym_got)

[llvm-branch-commits] [lld] [lld][LoongArch] GOT indirection to PC relative optimization. (PR #123743)

2025-01-21 Thread Fangrui Song via llvm-branch-commits
@@ -1150,6 +1152,58 @@ void LoongArch::tlsdescToLe(uint8_t *loc, const Relocation &rel, } } +// Try GOT indirection to PC relative optimization when relaxation is enabled. +// From: +// * pcalau12i $a0, %got_pc_hi20(sym_got) +// * ld.w/d$a0, $a0, %got_pc_lo12(sym_got)

[llvm-branch-commits] [lld] [lld][LoongArch] GOT indirection to PC relative optimization. (PR #123743)

2025-01-21 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: Can you drop the trailing `.` in the subject? https://github.com/llvm/llvm-project/pull/123743 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [lld][WebAssembly] Replace config-> with ctx.arg. (PR #119835)

2025-01-02 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/119835 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [lld][WebAssembly] Replace config-> with ctx.arg. (PR #119835)

2025-01-02 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/119835 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [lld][WebAssembly] Replace config-> with ctx.arg. (PR #119835)

2024-12-31 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/119835 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [lld][WebAssembly] Replace config-> with ctx.arg. (PR #119835)

2024-12-31 Thread Fangrui Song via llvm-branch-commits
@@ -48,7 +48,7 @@ ConfigWrapper config; Ctx ctx; MaskRay wrote: Removed `ConfigWrapper config`. Yes, that was intended to be a follow-up, but it seems easy to fold it into this PR. https://github.com/llvm/llvm-project/pull/119835 __

[llvm-branch-commits] [lld][WebAssembly] Replace config-> with ctx.arg. (PR #119835)

2024-12-31 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/119835 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2024-12-25 Thread Fangrui Song via llvm-branch-commits
@@ -1248,6 +1248,8 @@ Sanitizers by the compiler (for example, ``-fno-sanitize-merge=bool,enum,array-bounds,local-bounds``). +- ``-fsanitize=vptr`` is not included into ``-fsanitize=undefined``. MaskRay wrote: no longer part of https://github.com/llvm/ll

[llvm-branch-commits] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2024-12-25 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/121115 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [YAML] Don't validate `Fill::Size` after error (PR #123280)

2025-01-16 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/123280 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [YAML] Don't validate `Fill::Size` after error (PR #123280)

2025-01-16 Thread Fangrui Song via llvm-branch-commits
@@ -1750,7 +1750,9 @@ void MappingTraits>::mapping( std::string MappingTraits>::validate( IO &io, std::unique_ptr &C) { if (const auto *F = dyn_cast(C.get())) { -if (F->Pattern && F->Pattern->binary_size() != 0 && !F->Size) +// Can't check the `Size`, as it's req

[llvm-branch-commits] [llvm] release/19.x: [cmake] Include GNUInstallDirs before using variables defined by it. (#83807) (PR #121410)

2024-12-31 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/121410 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [lld] [lld][LoongArch] Relax TLS LE/GD/LD (PR #123600)

2025-02-15 Thread Fangrui Song via llvm-branch-commits
@@ -0,0 +1,115 @@ +# REQUIRES: loongarch + +# RUN: llvm-mc --filetype=obj --triple=loongarch32 -mattr=+relax --defsym ELF32=1 %s -o %t.32.o +# RUN: llvm-mc --filetype=obj --triple=loongarch64 -mattr=+relax %s -o %t.64.o + +# RUN: ld.lld %t.32.o -o %t.32 +# RUN: llvm-objdump -d --

[llvm-branch-commits] [lld] [lld][LoongArch] Relax TLS LE/GD/LD (PR #123600)

2025-02-15 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay commented: @xen0n May I ask you to double check the code? It seems good and appears to be LGTMed by a colleague of the author. https://github.com/llvm/llvm-project/pull/123600 ___ llvm-branch-commits mailing list llvm-branch

[llvm-branch-commits] [lld] [lld][LoongArch] Relax TLS LE/GD/LD (PR #123600)

2025-02-15 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/123600 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %plt %gotpcrel (PR #132569)

2025-03-22 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/132569 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [SPARC][MC] Add tests for VIS family instructions (PR #130967)

2025-03-22 Thread Fangrui Song via llvm-branch-commits
@@ -1,4 +1,237 @@ -! RUN: llvm-mc %s -triple=sparcv9 -mcpu=niagara -show-encoding | FileCheck %s +! RUN: not llvm-mc %s -triple=sparcv9 -show-encoding 2>&1 | FileCheck %s --check-prefixes=NO-VIS MaskRay wrote: might want `--implicit-check-not=error:` to ensure t

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %plt %gotpcrel (PR #132569)

2025-03-22 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/132569 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [Driver] Fix link order of BareMetal toolchain object (PR #132806)

2025-04-05 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: > The linker job in BareMetal toolchain object will be used by gnuld and lld > both. GNU ld instead of gnuld. https://github.com/llvm/llvm-project/pull/132806 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org http

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %pltpcrel %gotpcrel (PR #132569)

2025-03-27 Thread Fangrui Song via llvm-branch-commits
@@ -2233,8 +2235,17 @@ ParseStatus RISCVAsmParser::parseOperandWithSpecifier(OperandVector &Operands) { SMLoc S = getLoc(); SMLoc E; - if (!parseOptionalToken(AsmToken::Percent) || - getLexer().getKind() != AsmToken::Identifier) + if (!parseOptionalToken(AsmToken::

[llvm-branch-commits] [llvm] release/20.x: Revert "[MC] Explicitly mark MCSymbol for MO_ExternalSymbol" (#133291) (PR #133348)

2025-03-27 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/133348 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %pltpcrel %gotpcrel (PR #132569)

2025-03-25 Thread Fangrui Song via llvm-branch-commits
@@ -18,6 +18,6 @@ .globl _start _start: .data - .word foo@PLT - . - .word foo@PLT - . + 1 - .word foo@PLT - . - 1 + .word %plt(foo - .) MaskRay wrote: Implemented `%pltpcrel`, while a bit complex, I am happy with the result. (As in `RISCVMCExpr::evaluateA

[llvm-branch-commits] [llvm] Backport/20.x: [LoongArch] Fix the type of tls-le symbols (PR #133027)

2025-03-25 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: LGTM. Note: test/CodeGen is probably not the best place for such tests. `test/MC/CSKY/relocation-specifier.s` contains a nice example and tests multiple relocations at the same time. https://github.com/llvm/llvm-project/pull/133027 __

[llvm-branch-commits] ELF: Remove lock from MTE global relocation handling code. (PR #135123)

2025-04-10 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/135123 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [RISCV, test] Replace -riscv-no-aliases with -M no-aliases (PR #134879)

2025-04-08 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/134879 now that llc supports `-M no-aliases` (along with llvm-mc and llvm-objdump). ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.ll

[llvm-branch-commits] [RISCV, test] Replace -riscv-no-aliases with -M no-aliases (PR #134879)

2025-04-08 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/134879 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] release/20.x: [MC, COFF] .safeseh: avoid changeSection (#132624) (PR #133591)

2025-03-29 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/133591 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-01 Thread Fangrui Song via llvm-branch-commits
@@ -169,6 +169,91 @@ enum SubsectionKind : uint8_t { SK_PPA1 = 2, SK_PPA2 = 4, }; + +// The standard System/390 convention is to name the high-order (leftmost) bit +// in a byte as bit zero. The Flags type helps to set bits in byte according +// to this numeration order. +c

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-01 Thread Fangrui Song via llvm-branch-commits
@@ -0,0 +1,73 @@ +; RUN: llc <%s --mtriple s390x-ibm-zos --filetype=obj -o - | \ +; RUN: od -Ax -tx1 -v | FileCheck --ignore-case %s +; REQUIRES: systemz-registered-target MaskRay wrote: unneeded thanks to ``` % cat llvm/test/MC/SystemZ/lit.local.cfg if not "Sy

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-01 Thread Fangrui Song via llvm-branch-commits
@@ -169,6 +169,91 @@ enum SubsectionKind : uint8_t { SK_PPA1 = 2, SK_PPA2 = 4, }; + +// The standard System/390 convention is to name the high-order (leftmost) bit +// in a byte as bit zero. The Flags type helps to set bits in byte according +// to this numeration order. +c

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-17 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay commented: LGTM. As I'm not familiar with z/OS, my review focused on its compatibility with the current MC infrastructure. (My internet access will be limited between April 20th and May 4th, which may cause delays in my response time.) Thanks for reimplementing the g

[llvm-branch-commits] [BOLT][AArch64] Add jump table support using .llvm_jump_table_info (PR #132114)

2025-04-10 Thread Fangrui Song via llvm-branch-commits
@@ -0,0 +1,236 @@ +## Check parsing of a .llvm_jump_table_info section MaskRay wrote: (Can use the llvm/utils/update_test_body.py format to make re-generation easier :) ) https://github.com/llvm/llvm-project/pull/132114 _

[llvm-branch-commits] [llvm] RISCVAsmParser: Reject call foo@invalid (PR #135509)

2025-04-13 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: > I had pushed #135324 a couple of days ago to fix the same issue. I'm happy to > land either patch. Thanks! I'll land this one (wanted to make it clear `@plt` is a legacy thing and test `call foo@3`). Let me think about the AsmBackend change. https://github.com/llvm/llvm-proje

[llvm-branch-commits] [llvm] RISCVAsmParser: Reject call foo@invalid (PR #135509)

2025-04-13 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/135509 >From 3579f7d24a771f4c02e796a2ac9b91024b3c6ce9 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 12 Apr 2025 16:27:14 -0700 Subject: [PATCH] . Created using spr 1.3.5-bogner --- llvm/test/MC/RISCV/functio

[llvm-branch-commits] [llvm] RISCVAsmParser: Reject call foo@invalid (PR #135509)

2025-04-13 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/135509 >From 3579f7d24a771f4c02e796a2ac9b91024b3c6ce9 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 12 Apr 2025 16:27:14 -0700 Subject: [PATCH] . Created using spr 1.3.5-bogner --- llvm/test/MC/RISCV/functio

[llvm-branch-commits] RISCVAsmParser: Reject call foo@invalid (PR #135509)

2025-04-12 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/135509 ... instead of silently parsing and ignoring it without leaving an error message. While here, remove an unreachable `@plt`. ___ llvm-branch-commits mailing list llv

[llvm-branch-commits] [llvm] RISCVAsmParser: Reject call foo@invalid (PR #135509)

2025-04-12 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/135509 >From 3579f7d24a771f4c02e796a2ac9b91024b3c6ce9 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 12 Apr 2025 16:27:14 -0700 Subject: [PATCH] . Created using spr 1.3.5-bogner --- llvm/test/MC/RISCV/functio

[llvm-branch-commits] [clang] [Driver] Add support for crtbegin.o, crtend.o and libgloss lib to BareMetal toolchain object (PR #121830)

2025-04-16 Thread Fangrui Song via llvm-branch-commits
@@ -1,5 +1,12 @@ // UNSUPPORTED: system-windows +// Test interaction with -fuse-ld=lld MaskRay wrote: For `-fuse-ld=lld` , testing `ld.lld` is probably not a good use of an extra RUN line. Could just modify one of the tests below from `-fuse-ld=` to `-fuse-l

[llvm-branch-commits] [clang] [Driver] Add support for crtbegin.o, crtend.o and libgloss lib to BareMetal toolchain object (PR #121830)

2025-04-16 Thread Fangrui Song via llvm-branch-commits
@@ -1,5 +1,12 @@ // UNSUPPORTED: system-windows +// Test interaction with -fuse-ld=lld MaskRay wrote: You need to ensure that there is an `ld.lld` file with `-B%S/Inputs/lld` https://github.com/llvm/llvm-project/pull/121830 ___

[llvm-branch-commits] [llvm] [BOLT][test] Fix callcont-fallthru.s after #129481 (PR #135867)

2025-04-16 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: > Hey Amir, > > Thanks for the PR. Unfortunately, it is still failing. The trick below > doesn't seem to work on my buildbot machine: > > > Link against a DSO to ensure PLT entries. > > So doing: > > ```shell > nm --synthetic callcont-fallthru.s.tmp > ``` > > won't list a `pu

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Fangrui Song via llvm-branch-commits
@@ -599,8 +600,18 @@ class MCContext { unsigned Flags, unsigned EntrySize); - MCSectionGOFF *getGOFFSection(StringRef Section, SectionKind Kind, -

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Fangrui Song via llvm-branch-commits
@@ -0,0 +1,112 @@ +; RUN: llc <%s --mtriple s390x-ibm-zos --filetype=obj -o - | \ MaskRay wrote: `llc < %s` does not need `-o -`. .ll tests in llvm/test/MC is probably not a good convention we'd recommend. Move to llvm/test/CodeGen/SystemZ, perhaps under a dire

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-05-02 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: 3 δΉ‹ https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [BOLT][test] Fix callcont-fallthru.s after #129481 (PR #135867)

2025-05-02 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/135867 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] MC: Emit symbols for R_X86_64_PLT32 relocation pointing to symbols with non-zero values. (PR #138795)

2025-05-08 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: > The alternative fix, which I think I'm now leaning towards, would be to > change how the branch-to-branch optimization handles relocations to > STT_SECTION symbols. A relocation pointing to the STT_SECTION for .text with > addend 1 would be treated as a branch to .text+5 and i

[llvm-branch-commits] [lld] release/20.x: [ELF] Refine isExported/isPreemptible condition (PR #126848)

2025-02-17 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/126848 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [Driver] Temporarily probe aarch64-linux-gnu GCC installation (PR #102039)

2025-03-10 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: > We're facing it again, with LLVM20 this time ... which indicates that the distro and boost should really fix the problem and not rely on the clang driver hacks. https://github.com/llvm/llvm-project/pull/102039 ___ llvm-branch-commits

[llvm-branch-commits] [llvm] unittests: Use EXPECT_ instead of ASSERT_ in a few tests (PR #129251)

2025-03-01 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/129251 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [Driver] Change linker job in Baremetal toolchain object accomodate GCCInstallation.(2/3) (PR #121830)

2025-03-12 Thread Fangrui Song via llvm-branch-commits
@@ -331,6 +333,32 @@ BareMetal::OrderedMultilibs BareMetal::getOrderedMultilibs() const { return llvm::reverse(Default); } +ToolChain::CXXStdlibType BareMetal::GetDefaultCXXStdlibType() const { + if (getTriple().isRISCV() && GCCInstallation.isValid()) +return ToolChain

[llvm-branch-commits] [lld] [lld][LoongArch] Relax call36/tail36: R_LARCH_CALL36 (PR #123576)

2025-02-13 Thread Fangrui Song via llvm-branch-commits
@@ -830,6 +832,37 @@ static void relaxPCHi20Lo12(Ctx &ctx, const InputSection &sec, size_t i, remove = 4; } +// Relax code sequence. +// From: +// pcaddu18i $ra, %call36(foo) +// jirl $ra, $ra, 0 +// To: +// b/bl foo +static void relaxCall36(Ctx &ctx, const InputSecti

[llvm-branch-commits] [lld] [lld][LoongArch] Relax call36/tail36: R_LARCH_CALL36 (PR #123576)

2025-02-13 Thread Fangrui Song via llvm-branch-commits
@@ -830,6 +832,37 @@ static void relaxPCHi20Lo12(Ctx &ctx, const InputSection &sec, size_t i, remove = 4; } +// Relax code sequence. +// From: +// pcaddu18i $ra, %call36(foo) +// jirl $ra, $ra, 0 +// To: +// b/bl foo +static void relaxCall36(Ctx &ctx, const InputSecti

[llvm-branch-commits] [lld] [lld][LoongArch] Relax call36/tail36: R_LARCH_CALL36 (PR #123576)

2025-02-13 Thread Fangrui Song via llvm-branch-commits
@@ -0,0 +1,61 @@ +# REQUIRES: loongarch MaskRay wrote: omit `-2` from the name https://github.com/llvm/llvm-project/pull/123576 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm

[llvm-branch-commits] [lld] [lld][LoongArch] Relax call36/tail36: R_LARCH_CALL36 (PR #123576)

2025-02-13 Thread Fangrui Song via llvm-branch-commits
@@ -0,0 +1,135 @@ +# REQUIRES: loongarch MaskRay wrote: Needs a file-level comment explaining the purpose. See riscv-relax-call.s https://github.com/llvm/llvm-project/pull/123576 ___ llvm-branch-commits mailing list ll

[llvm-branch-commits] [lld] [lld][LoongArch] Support relaxation during IE to LE conversion (PR #123702)

2025-02-19 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/123702 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm-size] Early return with error on invalid args (PR #128447)

2025-02-23 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: A lot of utilities using LLVMOption, including clang and lld, are able to report multiple unknown option errors or other parsing errors before exiting. What the motivation behind this change? https://github.com/llvm/llvm-project/pull/128447 __

[llvm-branch-commits] [llvm-size] Fallback to defaults on error in args (PR #128447)

2025-02-24 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: The default value of `OutputFormat` is `berkeley`, so the assignment seems redundant. I see that `Radix` does need a change. Perhaps initialize the global variable instead. https://github.com/llvm/llvm-project/pull/128447 ___ llvm-bran

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-04 Thread Fangrui Song via llvm-branch-commits
@@ -19,7 +19,7 @@ ; CHECK:.quad L#PPA2-CELQSTRT * A(PPA2-CELQSTRT) ; CHECK: L#PPA1_void_test_0: ; CHECK:.long L#PPA2-L#PPA1_void_test_0 * Offset to PPA2 -; CHECK:.section"B_IDRL" +; CHECK:.section".idrl" MaskRay

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %plt %gotpcrel (PR #132569)

2025-03-22 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/132569 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %plt %gotpcrel (PR #132569)

2025-03-22 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/132569 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %plt %gotpcrel (PR #132569)

2025-03-22 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/132569 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %plt %gotpcrel (PR #132569)

2025-03-22 Thread Fangrui Song via llvm-branch-commits
@@ -18,6 +18,6 @@ .globl _start _start: .data - .word foo@PLT - . - .word foo@PLT - . + 1 - .word foo@PLT - . - 1 + .word %plt(foo - .) MaskRay wrote: The core principle is that relocation specifiers must operate on the full expression, not just a part of

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %plt %gotpcrel (PR #132569)

2025-03-22 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/132569 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %plt %gotpcrel (PR #132569)

2025-03-22 Thread Fangrui Song via llvm-branch-commits
@@ -1194,18 +1194,34 @@ const MCExpr *TargetLoweringObjectFileELF::lowerRelativeReference( MCSymbolRefExpr::create(TM.getSymbol(RHS), getContext()), getContext()); MaskRay wrote: `lowerRelativeReference` uses MCSymbolRefExpr. It seems legacy (probably sho

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %plt %gotpcrel (PR #132569)

2025-03-22 Thread Fangrui Song via llvm-branch-commits
@@ -18,6 +18,6 @@ .globl _start _start: .data - .word foo@PLT - . - .word foo@PLT - . + 1 - .word foo@PLT - . - 1 + .word %plt(foo - .) MaskRay wrote: It's challenging to use an inherent PC-relative specifier (e.g. `%pltpcrel`; which I actually thought ab

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %plt %gotpcrel (PR #132569)

2025-03-22 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/132569 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %plt %gotpcrel (PR #132569)

2025-03-22 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/132569 clang -fexperimental-relative-c++-abi-vtables might generate @plt and @gotpcrel specifiers in data directives. The syntax is not used in humand-written assembly code, and is not supported by GNU assembler. Note:

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %pltpcrel %gotpcrel (PR #132569)

2025-03-23 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/132569 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %plt %gotpcrel (PR #132569)

2025-03-23 Thread Fangrui Song via llvm-branch-commits
@@ -18,6 +18,6 @@ .globl _start _start: .data - .word foo@PLT - . - .word foo@PLT - . + 1 - .word foo@PLT - . - 1 + .word %plt(foo - .) MaskRay wrote: The IR doesn't model the current location (DOT). Instead, It computes `SymA-SymB+offset`. `SymB` might n

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %pltpcrel %gotpcrel (PR #132569)

2025-03-23 Thread Fangrui Song via llvm-branch-commits
@@ -2289,25 +2314,6 @@ bool TargetLoweringObjectFileWasm::shouldPutJumpTableInFunctionSection( return false; } -const MCExpr *TargetLoweringObjectFileWasm::lowerRelativeReference( MaskRay wrote: I'll pre-commit this. wasm and xcoff did cargo culting and ad

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %pltpcrel %gotpcrel (PR #132569)

2025-03-23 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/132569 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %pltpcrel %gotpcrel (PR #132569)

2025-03-23 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/132569 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [Driver] Fix link order of BareMetal toolchain object (PR #132806)

2025-03-25 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/132806 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %pltpcrel %gotpcrel (PR #132569)

2025-03-29 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/132569 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %pltpcrel %gotpcrel (PR #132569)

2025-03-29 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/132569 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-02 Thread Fangrui Song via llvm-branch-commits
@@ -169,6 +169,91 @@ enum SubsectionKind : uint8_t { SK_PPA1 = 2, SK_PPA2 = 4, }; + +// The standard System/390 convention is to name the high-order (leftmost) bit +// in a byte as bit zero. The Flags type helps to set bits in byte according +// to this numeration order. +c

<    2   3   4   5   6   7   8   >