1. 14 Jan, 2022 1 commit
  2. 07 Jan, 2022 1 commit
  3. 06 Jan, 2022 7 commits
  4. 29 Dec, 2021 1 commit
  5. 23 Dec, 2021 1 commit
    • Jessica Clarke's avatar
      [Morello] Don't adjust sections for representability during relocatable link · 98f3e362
      Jessica Clarke authored
      Most of this operation relies on section VAs, which are completely
      meaningless during a relocatable link (they will be assigned, but later
      all reset back to 0), and the entire layout will be reshuffled anyway
      when linked into the final binary. Moreover, if the last section in the
      "PCC segment" ends up being an SHF_MERGE section then we end up messing
      with its size and risk rendering its size not a multiple of its element
      size. This has been seen to give errors like:
        ld.lld: error: pw.lo:(.rodata.cst32): SHF_MERGE section size (40) must be a multiple of sh_entsize (32)
      when building CheriBSD, where pw.lo is the output of ld -r'ing all the
      object files for the pw binary together and in this case is being linked
      into cheribsdbox to produce a crunched binary (like busybox in the Linux
      world). For whatever reason, this only started showing up after merging
      mid-summer CHERI LLVM into Morello LLVM, presumably due to changes in
      LLD's layout algorithms that started to expose this latent bug.
  6. 20 Dec, 2021 2 commits
  7. 16 Dec, 2021 1 commit
    • Amilendra Kodithuwakku's avatar
      [lld][ELF][Morello] Align fragment bases of exec symbols pointed by [I]RELATIVE relocs · 94e1dbac
      Amilendra Kodithuwakku authored
      The executable capabilities created by [I]RELATIVE relocations used the
      symbol value for the base, and the symbol size as the capability limit.
      This results in the executable capabilities being too narrow that they
      could not call other functions.
      Fix this by encoding fragments for these relocations in a way similar to
      how the cap relocs for executable capabilities are encoded in the static
      linking case; i.e. set the bounds to cover the .text + .ro + .rel.ro regions.
  8. 10 Dec, 2021 1 commit
  9. 09 Dec, 2021 8 commits
    • Silviu Baranga's avatar
      [Morello] Rework varargs for hybrid and purecap. · f1bea428
      Silviu Baranga authored
      For hybrid pass any argument containing capabilities
      indirectly. Callees no longer need to spill capability
      registers, and don't need to use capabilities at all
      if not reading any capability-containing arguments.
      For purecap Variadic arguments are now passed on the stack.
      Variadic calls have an extra argument (C9), pointing to the
      variadic arguments on the stack.
      The old calling convention is still the default. The
      new calling convention can be selected by passing
      -Xclang -morello-vararg=new to clang.
    • Diana Picus's avatar
      [Morello][lldb] Update checks for AArch64 XML tests · 067484c1
      Diana Picus authored
      When we're not in the descriptor ABI, we always force x29 to be the
      frame pointer, and that affects the name used for printing. Update the
      tests to match this behaviour.
    • Raphael Isemann's avatar
      [lldb] Make the ClassTemplateDecl merging logic in TypeSystemClang respect template parameters · 664ca724
      Raphael Isemann authored
      DWARF doesn't describe templates itself but only actual template instantiations.
      Because of that LLDB has to infer the parameters of the class template
      declarations from the actual instantiations when creating the internal Clang AST
      from debug info
      Because there is no dedicated DIE for the class template, LLDB also creates the
      `ClassTemplateDecl` implicitly when parsing a template instantiation. To avoid
      creating one ClassTemplateDecls for every instantiation,
      `TypeSystemClang::CreateClassTemplateDecl` will check if there is already a
      `ClassTemplateDecl` in the requested `DeclContext` and will reuse a found
      fitting declaration.
      The logic that checks if a found class template fits to an instantiation is
      currently just comparing the name of the template. So right now we map
      `template<typename T> struct S;` to an instantiation with the values `S<1, 2,
      3>` even though they clearly don't belong together.
      This causes crashes later on when for example the Itanium mangler's
      `TemplateArgManglingInfo::needExactType` method tries to find fitting the class
      template parameter that fits to an instantiation value. In the example above it
      will try to find the parameter for the value `2` but will just trigger a
      boundary check when retrieving the parameter with index 1 from the class
      There are two ways we can end up with an instantiation that doesn't fit to a
      class template with the same name:
      1. We have two TUs with two templates that have the same name and internal
      2. A forward declared template instantiation is emitted by GCC and Clang
         without an empty list of parameter values.
      This patch makes the check for whether a class template declaration can be
      reused more sophisticated by also comparing whether the parameter values can fit
      to the found class template. If we can't find a fitting class template we
      justcreate a second class template with the fitting parameters.
      Fixes rdar://76592821
      Reviewed By: kastiglione
      Differential Revision: https://reviews.llvm.org/D100662
    • Chih-Hung Hsieh's avatar
      undef FS macro for Android x86_64 · 509b187a
      Chih-Hung Hsieh authored
      * ANDROID x86_64 defined the FS macro,
        and some LLVM files have the FS variable.
      Change-Id: I8d815ce03a6403e17ae7b310a9fb0800a57fd218
    • Diana Picus's avatar
      [Morello][lldb] Update SVE register infos · 974822f9
      Diana Picus authored
      Add the capability registers to the SVE register infos, and also add
      back x29 (which used to be called 'fp' and somehow went missing).
      Also include some minor cleanups.
    • Diana Picus's avatar
      [Morello][lldb] Fix TestUseColor.test · 2cce1070
      Diana Picus authored
      s/cat -e/cat -v/
      Some systems don't have cat -e or -E. According to the cat docs, -e is
      equivalent to -vE. The -E (which prints a special character for the end
      of the line) doesn't seem to be used in the test and might be missing,
      so keep just -v.
    • Diana Picus's avatar
      [Morello][lldb] Skip SVE core tests · ffafb6bd
      Diana Picus authored
      There are at least 2 issues with these tests:
      1. We hit an assert when trying to read v0 because the register info
      from the core file expects the SVE registers to be right after the
      usual AArch64 register sets. Unfortunately, we put the capability
      registers there, and the SVE registers after, so this is not trivial
      to fix.
      2. Even if we get the v0 right, we still get some issues related to the
      precision of the floating point registers (i.e. we read values that are
      almost but not quite the expected ones). This looks very similar to the
      FreeBSD bug that was already reported for one of these tests.
      This patch introduces a new decorator, skipIfMorello, to make it easier
      for us to track such issues. For the time being we only apply it to
      2 testcases, but it would be nice to track some of the other tests that
      were skipped in a similar fashion and apply it to them as well (instead
      of skipIfLinux). Different patch though.
    • Diana Picus's avatar
      [Morello][lldb] Fix jit-loader tests · 8ff03260
      Diana Picus authored
      The tests were failing because lldb wasn't hitting any breakpoints.
      The breakpoints weren't added because lldb wasn't managing to find
      the section for __jit_debug_register_code. This turns out to be
      because the target returns 2 symbols, but the code only looks at the
      first one.
      This patch makes sure we look through all the symbols until we find
      one whose address we can get.
      I haven't really taken the time to investigate why this started
      failing just now, it might be because of how lldb gets its symbols
      or it might be an issue somewhere else in the toolchain.
  10. 07 Dec, 2021 1 commit
    • Silviu Baranga's avatar
      Fix libunwind build. · c94b1c66
      Silviu Baranga authored
      We can't always do static_cast here, so roll this back
      to using reinterpret_cast (what upstream llvm does).
  11. 23 Nov, 2021 1 commit
    • Jessica Clarke's avatar
      libunwind: Remove bogus downstream assert · ec58c15a
      Jessica Clarke authored
      This was added in 2017 in 4ae1b6a2 without justification. There is
      already an assertion upstream that UnwindCursor does not exceed
      unw_cursor_t's size and, more recently, alignment, and the stronger
      assertion that they're always equal does not hold on i386, where
      unw_cursor_t is bigger than UnwindCursor. Not to mention that the assert
      should have been written as an inline static_assert like the others, not
      with this weird helper function.
  12. 22 Nov, 2021 2 commits
  13. 19 Nov, 2021 3 commits
  14. 18 Nov, 2021 2 commits
  15. 17 Nov, 2021 1 commit
  16. 16 Nov, 2021 3 commits
  17. 15 Nov, 2021 4 commits