[all-commits] [llvm/llvm-project] fa1b6e: [X86] Fix i128 argument passing under SysV ABI

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Aug 21 02:44:52 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fa1b6e6b34eb6382c451f3a06a7c52d7ac6ada1d
      https://github.com/llvm/llvm-project/commit/fa1b6e6b34eb6382c451f3a06a7c52d7ac6ada1d
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-08-21 (Mon, 21 Aug 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M llvm/lib/Target/X86/X86CallingConv.td
    M llvm/test/CodeGen/X86/addcarry.ll
    M llvm/test/CodeGen/X86/i128-abi.ll
    M llvm/test/CodeGen/X86/sadd_sat_vec.ll
    M llvm/test/CodeGen/X86/ssub_sat_vec.ll
    M llvm/test/CodeGen/X86/subcarry.ll
    M llvm/test/CodeGen/X86/uadd_sat_vec.ll
    M llvm/test/CodeGen/X86/usub_sat_vec.ll

  Log Message:
  -----------
  [X86] Fix i128 argument passing under SysV ABI

The x86_64 SysV ABI specifies that __int128 is passed either in
two registers (if available) or in a 16 byte aligned stack slot.
GCC implements this behavior. However, if only one free register
is available, LLVM will instead pass one half of the i128 in a
register, and the other on the stack.

Make sure that either both are passed in registers or both on the
stack.

Fixes https://github.com/llvm/llvm-project/issues/41784.
The patch is basically what craig.topper proposed to do there.

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




More information about the All-commits mailing list