[PATCH] D14300: MSP430 calling convention updates

Meador Inge via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 26 07:29:22 PST 2015


meadori added a comment.

This patch looks good to me with respect to the MSP430 ABI.  I did find one other change that needs to be made.  Now that R11 is not preserved by the callee it should be marked as clobbered by the call instructions:

  --- a/lib/Target/MSP430/MSP430InstrInfo.td
  +++ b/lib/Target/MSP430/MSP430InstrInfo.td
  @@ -207,7 +207,7 @@ let isCall = 1 in
     // a use to prevent stack-pointer assignments that appear immediately
     // before calls from potentially appearing dead. Uses for argument
     // registers are added manually.
  -  let Defs = [R12, R13, R14, R15, SR],
  +  let Defs = [R11, R12, R13, R14, R15, SR],
         Uses = [SP] in {
       def CALLi     : II16i<0x0,
                             (outs), (ins i16imm:$dst),

With that change I was able to run some simple programs compiled with Clang/LLVM against the GDB simulator.


http://reviews.llvm.org/D14300





More information about the llvm-commits mailing list