[all-commits] [llvm/llvm-project] fd84b1: [M68k] Add new calling convention M68k_RTD

Min-Yih Hsu via All-commits all-commits at lists.llvm.org
Sun Oct 15 16:14:59 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fd84b1a99dfe37d4212be8afba2a93209679bc7f
      https://github.com/llvm/llvm-project/commit/fd84b1a99dfe37d4212be8afba2a93209679bc7f
  Author: Min-Yih Hsu <minyihh at uci.edu>
  Date:   2023-10-15 (Sun, 15 Oct 2023)

  Changed paths:
    M llvm/include/llvm/AsmParser/LLToken.h
    M llvm/include/llvm/IR/CallingConv.h
    M llvm/lib/AsmParser/LLLexer.cpp
    M llvm/lib/AsmParser/LLParser.cpp
    M llvm/lib/IR/AsmWriter.cpp
    M llvm/lib/Target/M68k/M68kExpandPseudo.cpp
    M llvm/lib/Target/M68k/M68kISelLowering.cpp
    A llvm/test/CodeGen/M68k/CConv/rtd-call.ll
    A llvm/test/CodeGen/M68k/CConv/rtd-ret.ll

  Log Message:
  -----------
  [M68k] Add new calling convention M68k_RTD

`M68k_RTD` is really similar to X86's stdcall, in which callee pops the
arguments from stack. In LLVM IR it can be written as `m68k_rtdcc`.
This patch also improves how ExpandPseudo Pass handles popping stack at
function returns in the absent of the RTD instruction.

Differential Revision: https://reviews.llvm.org/D149864


  Commit: 42b707e5b438be538e3560429d0b4afcd7ca05be
      https://github.com/llvm/llvm-project/commit/42b707e5b438be538e3560429d0b4afcd7ca05be
  Author: Min-Yih Hsu <minyihh at uci.edu>
  Date:   2023-10-15 (Sun, 15 Oct 2023)

  Changed paths:
    M llvm/include/llvm/BinaryFormat/Dwarf.def
    M llvm/lib/DebugInfo/DWARF/DWARFTypePrinter.cpp
    A llvm/test/DebugInfo/M68k/calling-convention.ll
    A llvm/test/DebugInfo/M68k/lit.local.cfg

  Log Message:
  -----------
  [DWARF][M68k] Add new DW_CC for the new M68kRTD calling convention

Add `DW_CC_M68kRTD` to model the new `llvm::CallingConv::M68kRTD`.

Differential Revision: https://reviews.llvm.org/D152587


  Commit: fd4f96290ac99bf8b9284d3b32743cac0bb135ea
      https://github.com/llvm/llvm-project/commit/fd4f96290ac99bf8b9284d3b32743cac0bb135ea
  Author: Min-Yih Hsu <minyihh at uci.edu>
  Date:   2023-10-15 (Sun, 15 Oct 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang-c/Index.h
    M clang/include/clang/Basic/Attr.td
    M clang/include/clang/Basic/AttrDocs.td
    M clang/include/clang/Basic/LangOptions.h
    M clang/include/clang/Basic/Specifiers.h
    M clang/include/clang/Driver/Options.td
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/ItaniumMangle.cpp
    M clang/lib/AST/Type.cpp
    M clang/lib/AST/TypePrinter.cpp
    M clang/lib/Basic/Targets/M68k.cpp
    M clang/lib/Basic/Targets/M68k.h
    M clang/lib/CodeGen/CGCall.cpp
    M clang/lib/CodeGen/CGDebugInfo.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Sema/SemaDeclAttr.cpp
    M clang/lib/Sema/SemaType.cpp
    M clang/test/CodeGen/mrtd.c
    M clang/test/CodeGenCXX/default_calling_conv.cpp
    A clang/test/CodeGenCXX/m68k-rtdcall.cpp
    A clang/test/Sema/m68k-rtdcall.c
    A clang/test/SemaCXX/m68k-rtdcall.cpp
    M clang/tools/libclang/CXType.cpp

  Log Message:
  -----------
  [Clang][M68k] Add Clang support for the new M68k_RTD CC

This patch adds `CC_M68kRTD`, which will be used on function if either
`__attribute__((m68k_rtd))` is presented or `-mrtd` flag is given.

Differential Revision: https://reviews.llvm.org/D149867


Compare: https://github.com/llvm/llvm-project/compare/7f881a2abe2c...fd4f96290ac9


More information about the All-commits mailing list