Updating MSP430 calling convention

Youssefi, Anna via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 08:34:48 PDT 2015


Dear LLVM Folks,
Attached please find a patch for the MSP430 LLVM target.  This is my first patch submission and I will be continuing to work on bringing the MSP LLVM target to working condition.  MSP430-GCC has updated its calling convention.  In addition to the LLVM lit target tests, these changes have been tested by assembling, linking and running tests with the current MSP430-GCC framework.
This patch contains the following changes to update the MSP430 calling convention to conform to MSP430 EABI:

1)      Pass args in R12-R15

2)      Return args in R12-R15

3)      Store on stack and pass in registers starting with least significant word

4)      32-bit argument may be split between register (R15) and stack if no args placed on stack yet

5)      Register 'holes' may be back-filled (but only by arguments that fit entirely in regs, no split args once first arg placed on stack)

6)      Only R4 through R10 are callee-saved registers; R11 is updated to be caller-save
I have attempted to follow the Developer's Policy.  Please let me know if anything is lacking.
Thank you,
Anna Youssefi
Texas Instruments, Codegen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151014/a3b4d97c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MSP430_calling_convention_update.diff
Type: application/octet-stream
Size: 38872 bytes
Desc: MSP430_calling_convention_update.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151014/a3b4d97c/attachment-0001.obj>


More information about the llvm-commits mailing list