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

Rebase to upstream #67

Commits on Sep 9, 2023

  1. [SOL] Customize README.md

    jackcmay authored and dmakarov committed Sep 9, 2023
    Configuration menu
    Copy the full SHA
    7e1c8f0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    43bedfc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d5a0654 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0665840 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    978bc08 View commit details
    Browse the repository at this point in the history
  6. [SOL] symbols resolved at load time

    jackcmay authored and dmakarov committed Sep 9, 2023
    Configuration menu
    Copy the full SHA
    c27613c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    43add87 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4b11722 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7b225f8 View commit details
    Browse the repository at this point in the history
  10. [SOL] Fix undefined register error

    jackcmay authored and dmakarov committed Sep 9, 2023
    Configuration menu
    Copy the full SHA
    a33f435 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    c105756 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    87bcd3e View commit details
    Browse the repository at this point in the history
  13. [SOL] Bump stack frame size

    jackcmay authored and dmakarov committed Sep 9, 2023
    Configuration menu
    Copy the full SHA
    8dc6a92 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    b34a74d View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    1eae039 View commit details
    Browse the repository at this point in the history
  16. [SOL] Allow selectively disable compiler builtins for BPF target (anz…

    …a-xyz#4)
    
    * [BPF] Make rust allocation builtins unavailable for BPF target
    
    - the calls to rust alloc/dealloc routines need to be preserved and
    not replaced by compiler generated builtin inlined code
    dmakarov committed Sep 9, 2023
    Configuration menu
    Copy the full SHA
    4374309 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    d32a665 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    94ca806 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    e32c286 View commit details
    Browse the repository at this point in the history
  20. [SOL] Adjust BPF tests

    * [SOL][BPF] Adjust BPF tests
    
    * [SOL][BPF] Improve reporting of stack size is too large
    
    - issue only one warning for each function
    - report the function location if debug information is available
    dmakarov committed Sep 9, 2023
    Configuration menu
    Copy the full SHA
    a3c410d View commit details
    Browse the repository at this point in the history
  21. [SOL] Allow misaligned loads

    Co-authored-by: Jack May <[email protected]>
    dmakarov and jackcmay committed Sep 9, 2023
    Configuration menu
    Copy the full SHA
    74382d7 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    07420fe View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    d917252 View commit details
    Browse the repository at this point in the history
  24. [SOL] Fixes required for Solang

    * [SOL] Make lld thread-safe with llvm when used in-process
    
    Every time Solang tries to link a web-assembly file in-process, the linker
    re-inits llvm which is not thread-safe with the rest of solang.
    
    Signed-off-by: Sean Young <[email protected]>
    
    * [SOL][BPF] Enable the _ExtInt extension on the BPF Target for Solana
    
    Signed-off-by: Sean Young <[email protected]>
    seanyoung authored and dmakarov committed Sep 9, 2023
    Configuration menu
    Copy the full SHA
    70a906a View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2023

  1. [SOL] Disable debug info when solana feature flag is set

    Solana extends BPF so that structs type information is not fully
    supported in BTF.  This leads to ICE crashes and some unsupported
    relocations being emitted in binary files that linker errors on.
    For, now the debug information is simply disabled when compiling
    for Solana to avoid the errors in Debug builds.
    dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    8768feb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0bd597b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ec21e27 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    429bcd7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    577aae4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7c6e825 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b98c495 View commit details
    Browse the repository at this point in the history
  8. [SOL] Revert to R_BPF_64_64 for global data object relocations

    RBPF doesn't support R_BPF_64_ABS64 and R_BPF_64_64 correctly
    represents relocation information for global data objects, so we can
    use them without breaking the correctness of generated object files.
    dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    1c28906 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    923d024 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c3706e8 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    62572e7 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    345d811 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    d046a1b View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    c000109 View commit details
    Browse the repository at this point in the history
  15. [SOL] add support for (pseudo) atomics to SBF (anza-xyz#23)

    Lower atomic operations to their regular non-atomic equivalents. Lowering for
    all operations except atomic fence is done at DAG legalization time. Fences are
    removed at instruction emission time.
    alessandrod authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    bcfa05d View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    9d63d0a View commit details
    Browse the repository at this point in the history
  17. [SOL] Xfail unrelated tests

    dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    1e3f377 View commit details
    Browse the repository at this point in the history
  18. [SOL] Glue the insn setting $r5 to other in-reg passed args insns

    The actual parameters to a function call are passed in registers for
    the first 4 arguments, and on stack for the remaining arguments. The
    register $r5 is set to the value of the frame pointer where the actual
    parameters are stored. The instruction that copies the frame pointer
    into the register $r5 must be glued to the chain of instructions that
    sets the previous four call arguments. Otherwise, the scheduler is
    free to move the instruction across boundaries of basic blocks and
    it's potentially possible that the copy instruction is considered dead
    code, even though there's an implicit liveness associated with the
    call instruction.
    dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    d07bfeb View commit details
    Browse the repository at this point in the history
  19. [SOL] Introduce dynamic stack frames and the SBFv2 flag

    Introduce dynamic stack frames, which are currently opt-in and enabled setting cpu=sbfv2.
    When sbfv2 is used, ELF files are flagged with e_flags=EF_SBF_V2 so the runtime can detect it
    and react accordingly.
    
    Co-authored-by: Dmitri Makarov <[email protected]>
    alessandrod and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    8b1e36d View commit details
    Browse the repository at this point in the history
  20. [SOL] native support for signed division in SBF

    Adds BPF_SDIV, which is enabled only for the SBF subtarget.
    alessandrod authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    c0b3bfd View commit details
    Browse the repository at this point in the history
  21. [SOL] report exceeded stack size as a warning if dynamic frames are off

    7b107c accidentally reverted it back to an hard error.
    alessandrod authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    b8b2d2b View commit details
    Browse the repository at this point in the history
  22. [SOL] re-enable debug info and add R_BPF_64_{ABS64, ABS32, NODYLD32} …

    …relocations to lld
    
    Co-Authored-By: Richard Patel <[email protected]>
    
    [SOL] emit R_BPF_64_{ABS64, ABS32} for .debug_* sections
    jawilk authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    b17a55f View commit details
    Browse the repository at this point in the history
  23. [SOL] lld: emit correct e_flags

    Emit e_flags based on the input object files. Ensure that all input files have
    the same e_flags as different values signal different ABIs.
    alessandrod authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    2e5f948 View commit details
    Browse the repository at this point in the history
  24. [SOL] clang: add sbfv2 cpu name

    alessandrod authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    f785385 View commit details
    Browse the repository at this point in the history
  25. [SOL] fix 64 bit data relocations

    Relocate FK_Data_8 fixups as R_BPF_64_ABS64. R_BPF_64_64 is used for ldimm64
    which only makes sense in .text.
    
    Currently 64 bit values in non-text sections get chopped to 32 bits and shifted
    32 bits to the left (that is, the first 8 bytes of a ldimm64 relocation). This
    commit fixes it so that 64 bit values get written fully at the intended offset.
    
    For backwards compatibility, the new behaviour is used only if the reloc-abs64
    feature is on (required by -mcpu=sbfv2), since rbpf before
    solana-labs/rbpf#301 assumes the legacy buggy layout.
    alessandrod authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    07c9b80 View commit details
    Browse the repository at this point in the history
  26. [SOL] revert ABS64 bits of 672d5f8

    ABS64 relocs were properly implemented in fb7188b
    alessandrod authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    4dae839 View commit details
    Browse the repository at this point in the history
  27. [SOL] sbf: add static-syscalls feature

    This is a marker feature enabled by default by sbfv2. Enables higher layers to
    change syscall impl depending on whether the feature is set or not.
    alessandrod authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    5e814fd View commit details
    Browse the repository at this point in the history
  28. [SOL] Disable BTF codegen

    Richard Patel authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    882fe09 View commit details
    Browse the repository at this point in the history
  29. [SOL] lldb: add sbf{v2} targets

    jawilk authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    f163fe5 View commit details
    Browse the repository at this point in the history
  30. [SOL] Fix callx in AsmParser

    Richard Patel authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    6333ec8 View commit details
    Browse the repository at this point in the history
  31. [SOL] lldb: pretty print instructions

    jawilk authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    a082e76 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    da47437 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    da05786 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    d5df788 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    4006d04 View commit details
    Browse the repository at this point in the history
  36. [SOL] lldb: Add solana-lldb wrapper

    This adds a wrapper around the LLDB executable that resides in the same directory. Once we start to distribute LLDB in sbf-tools, the wrapper + scripts can be put into the same directory as the LLDB executable. Invoking ./solana-lldb will pre-load helper functions to print rust as well as solana types (e.g. pubkeys in base58 or auto deref of accounts) and then start the LLDB executable.
    jawilk authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    bd5061a View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    701f62b View commit details
    Browse the repository at this point in the history
  38. [SOL] Initial squash commit for new SBF LLVM back-end and related.

    - New SBF back-end subdirectory and corresponding test directories.
    - Corresponding changes in ADT, Support, MC, Object, BinaryFormat for
      new SBF architecture and EM_SBF ELF object.
    - Corresponding changes in clang to instantiate SBF for Triple::sbf
      rather than the old BPF back-end, etc.
    - Corresponding changes in lld to add SBF arch recognition, etc.
    - Corresponding changes in llvm-readelf to and opt.
    nvjle authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    44f6551 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    4c530d7 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    2d3405f View commit details
    Browse the repository at this point in the history
  41. [SOL] Reworked the SBF textual assembly syntax to match the rbpf-styl…

    …e syntax. (anza-xyz#54)
    
    - Update the syntax of every instruction in SBFInstrInfo.td (currently
      using the asm variants feature to temporarily support both).
    - Update AsmParser for the new syntax (add new operand, memory,
      instruction, and directive parse routines).
    - Add error checking for unresolved 16-bit branch relocations and
      emit error message for graceful exit (the old BPF back-end crashes)
      and corresponding lit unit test.
    - Add new lit unit tests in MC/SBF and MC/Disassembler/SBF to cover
      disassembly, object emission, and parsing of every single instruction.
      This is more extensive coverage than existed previously.
    - Remaster all CodeGen/SBF unit tests accordingly.
    - A minor TableGen patch was needed to support asm strings containing
      '|' within variant strings ('|' happens to be the variant separator).
    
    The patch is a bit more complex than it otherwise might be in that we
    currently support both syntaxes to ease the verification (e.g., being
    able to see and compare each instruction and object code side-by-side
    within each unit test). After some 'soak time' for the new functionality,
    I intend to remove the old syntax altogether and otherwise clean-up. We'll
    also remove the TableGen patch at that time.
    nvjle authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    02cd962 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    ca6fbd0 View commit details
    Browse the repository at this point in the history
  43. [SOL] Adjust tests

    dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    29af71c View commit details
    Browse the repository at this point in the history
  44. [SOL] Adjust github workflow

    dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    97736d4 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    a4b2355 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    9047690 View commit details
    Browse the repository at this point in the history
  47. [SOL] Fix SBF target in LLDB

    dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    fe12f60 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    7149309 View commit details
    Browse the repository at this point in the history
  49. [SOL] Fix bug in LLD

    Signed-off-by: Lucas Steuernagel <[email protected]>
    LucasSte authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    b0ec678 View commit details
    Browse the repository at this point in the history
  50. [SOL] Revive BTF/CO-RE crud from bitrot.

    BTF/CO-RE has been disabled for Solana since:
    anza-xyz#37
    
    This patch updates related code (and all applicable unit tests) from roughly
    a year of bitrot. This is in preparation for its possible use in the Move
    project.
    
    Additionally, a few other 14.0.2022-03-02 -> 15.0-2022-08-09 BPF patches
    were reflected in the SBF back-end (e.g., bugfixes).
    nvjle authored and dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    27a9e53 View commit details
    Browse the repository at this point in the history
  51. [SOL] Fix CI build on macOS

    dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    60e97aa View commit details
    Browse the repository at this point in the history
  52. [SOL] Generate EM_SBF binary only for sbfv2 cpu subtarget

    EM_SBF files are only accepted by new ELF parser of the RBPF.
    dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    d8d2092 View commit details
    Browse the repository at this point in the history
  53. [SOL] Add BPF target to LLDB

    dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    f0597b8 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    ce2d12d View commit details
    Browse the repository at this point in the history
  55. [SOL] Handle BPF_64_64 relocations in .debug sections as ABS64

    Because of a bug in BPF backend ABS64 relocations are incorrectly
    generated as 64_64 relocations in BPF object files. This temporary
    works around this for relocations in .debug section to generate debug
    information addresses correctly.
    dmakarov committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    f07d0da View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2023

  1. Configuration menu
    Copy the full SHA
    a53bae0 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2023

  1. [SOL] Revert 'Emit table lookup from TargetLowering::expandCTTZ()'

    This change rust-lang@ab4fc87
    breaks compilation of compiler-rt library for BPF and SBF targets.
    For now disabling it.
    dmakarov committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    038d472 View commit details
    Browse the repository at this point in the history