This is an archive of the discontinued LLVM Phabricator instance.

[MSP430] Generate EABI-compliant libcalls
ClosedPublic

Authored by awygle on Apr 30 2017, 12:23 AM.

Details

Summary

Updates the MSP430 target to generate EABI-compatible libcall names. As a byproduct, adjusts the hardware multiplier options available in the MSP430 target, adds support for promotion of the ISD::MUL operation for 8-bit integers, and correctly marks R11 as used by call instructions.

Diff Detail

Event Timeline

awygle created this revision.Apr 30 2017, 12:23 AM
awygle updated this revision to Diff 97215.Apr 30 2017, 12:26 AM

Updated patch to add tests

awygle updated this revision to Diff 97399.May 1 2017, 11:39 PM

Updated to add support for the compiler helper function API, allowing use of mspabi libcalls which take two 64-bit operands.

pftbest edited edge metadata.May 5 2017, 2:33 PM

this code produces a lot of warnings:

lib/Target/MSP430/MSP430ISelLowering.cpp:176:72: warning: missing field 'CC' initializer
      [-Wmissing-field-initializers]
    { RTLIB::FPROUND_F64_F32,   "__mspabi_cvtdf",   ISD::SETCC_INVALID },
                                                                       ^
awygle updated this revision to Diff 98033.May 5 2017, 3:58 PM

Fixed the warnings - remnants of an older approach to the helper function ABI. Thanks.

Looks good to me. Will do more tests on a real hardware

Sorry, I didn't notice this earlier, your previous revision (97399) had hwmult tests, but latest revision (98033) doesn't have them anymore.

Also MSP430_BUILTIN has the same id (93) as AMDGPU_HS

awygle updated this revision to Diff 98582.May 10 2017, 9:54 PM

Fixed up the patch and bumped the calling convention version number to avoid conflict with new AMDGPU calling convention.

Sorry for the errors.

pftbest accepted this revision.May 11 2017, 12:40 PM

LGTM, thank you @awygle

This revision is now accepted and ready to land.May 11 2017, 12:40 PM
This revision was automatically updated to reflect the committed changes.
lib/Target/MSP430/MSP430InstrInfo.td