[PATCH] D13977: [X86] Add elfiamcu triple support, and a workaround for PR3997

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 22 03:39:21 PDT 2015


mkuper created this revision.
mkuper added reviewers: chandlerc, t.p.northover, rafael.
mkuper added a subscriber: llvm-commits.
Herald added a subscriber: aemerson.

This patch has two parts: 
1) It adds support for "elfiamcu" triple to support the x86 Intel MCU psABI. This is something already supported by GCC trunk.

2) It introduces elfiamcu-specific code, which is a workaround for PR3997. The IAMCU psABI requires everything, including library functions to pass the first 3 parameters in-reg (note that the ABI is slightly different from -mregparm 3). Unfortunately, inreg marking for x86-32 is done by the frontend. Optimistically speaking, RTLIB function signatures ought to be simple enough for this to work. If not, we'll have to reconsider solving PR3997 more thoroughly.

Any suggestions on how to make this work better are welcome.

http://reviews.llvm.org/D13977

Files:
  include/llvm/ADT/Triple.h
  include/llvm/Target/TargetLowering.h
  lib/CodeGen/SelectionDAG/TargetLowering.cpp
  lib/Support/Triple.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86ISelLowering.h
  lib/Target/X86/X86Subtarget.h
  test/CodeGen/X86/mcu-abi.ll
  unittests/ADT/TripleTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13977.38101.patch
Type: text/x-patch
Size: 6006 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151022/fa5b307d/attachment.bin>


More information about the llvm-commits mailing list