This is an archive of the discontinued LLVM Phabricator instance.

[MSP430][Clang] Remove support for -mmcu=msp430
ClosedPublic

Authored by jozefl on Aug 18 2021, 7:09 AM.

Details

Summary

The -mmcu= option accepts a generic MCU named "msp430", which sets the
CPU to msp430 and disables hardware multiply support.

The current purpose of accepting this value is to allow -mmcu= to be
used as an alias for -mcpu=, however there are some downsides to doing
this. -mmcu= provides additional features that will interfere
with the expected behavior if the user tries to to use it as an alias
for -mcpu=.

-mmcu=msp430 will conflict with -mhwmult=, since the "msp430" MCU is
defined to have no hardware multiply support, so the user will not be
able to set an explicit hardware multiply version.

-mmcu=msp430 will put "-Tmsp430.ld" on the linker command line, however
TI's support files do not provide a linker script with this name and so
the user would have to explicitly create it.

If the patch is acceptable, I would appreciate it if someone would apply
it for me, as I do not have commit access.

Thanks,
Jozef

Diff Detail

Event Timeline

jozefl requested review of this revision.Aug 18 2021, 7:09 AM
jozefl created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptAug 18 2021, 7:09 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
jozefl added a reviewer: asl.Aug 18 2021, 7:10 AM
jozefl added a comment.Sep 1 2021, 8:22 AM

Pinging for review.

Thanks,
Jozef

Pinging for review.

Thanks,
Jozef

asl accepted this revision.Sep 28 2021, 10:45 AM

LGTM, thanks!

This revision is now accepted and ready to land.Sep 28 2021, 10:45 AM
This revision was automatically updated to reflect the committed changes.