[all-commits] [llvm/llvm-project] c94c8d: [AVR][clang] Fix wrong calling convention in funct...

Ben Shi via All-commits all-commits at lists.llvm.org
Mon Jun 28 21:29:48 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c94c8d8b5d999c97ea424b35a1cb540d2a1d3bc6
      https://github.com/llvm/llvm-project/commit/c94c8d8b5d999c97ea424b35a1cb540d2a1d3bc6
  Author: Ben Shi <powerman1st at 163.com>
  Date:   2021-06-29 (Tue, 29 Jun 2021)

  Changed paths:
    M clang/lib/CodeGen/TargetInfo.cpp
    A clang/test/CodeGen/avr/struct.c

  Log Message:
  -----------
  [AVR][clang] Fix wrong calling convention in functions return struct type

According to AVR ABI (https://gcc.gnu.org/wiki/avr-gcc), returned struct value
within size 1-8 bytes should be returned directly (via register r18-r25), while
larger ones should be returned via an implicit struct pointer argument.

Reviewed By: dylanmckay

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




More information about the All-commits mailing list