[all-commits] [llvm/llvm-project] e67686: [Mips] Fix clang crashes when compiling a variadic...

yingopq via All-commits all-commits at lists.llvm.org
Tue Apr 15 19:56:28 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e676866368a84c88aad90e138268e00a1c56a230
      https://github.com/llvm/llvm-project/commit/e676866368a84c88aad90e138268e00a1c56a230
  Author: yingopq <115543042+yingopq at users.noreply.github.com>
  Date:   2025-04-16 (Wed, 16 Apr 2025)

  Changed paths:
    M llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
    M llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h
    M llvm/lib/Target/Mips/MipsCallLowering.cpp
    M llvm/lib/Target/Mips/MipsCallingConv.td
    M llvm/lib/Target/Mips/MipsISelLowering.cpp
    A llvm/test/CodeGen/Mips/vararg.ll

  Log Message:
  -----------
  [Mips] Fix clang crashes when compiling a variadic function while targeting mips3 (#130558)

issue reason:
Because mips3 has the feature 'FeatureGP64Bit', when target mips3
process function `writeVarArgRegs`, the result of `getGPRSizeInBytes` is
8 and the result of `GetVarArgRegs` is `Mips::A0, Mips::A1, Mips::A2,
Mips::A3`. This would generate `gpr64 = COPY $a1` which should be `gpr64
= COPY $a1_64`.

Also when process `CC_Mips_FixedArg`, mips would CCDelegateTo
    `CC_MipsO32_FP`. In fact, it should CCDelegateTo `CC_MipsN`.

Fix #98716.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list