This is an archive of the discontinued LLVM Phabricator instance.

[mips] Add runtime options to enable/disable generation of madd.fmt, msub.fmt
ClosedPublic

Authored by smaksimovic on May 22 2017, 3:19 AM.

Details

Summary

Added options to clang are -mmadd4 and -mno-madd4, used to enable or disable generation
of madd.fmt and similar instructions respectively, as per GCC.

Diff Detail

Event Timeline

smaksimovic created this revision.May 22 2017, 3:19 AM
sdardis requested changes to this revision.May 31 2017, 9:10 AM

This also requires that __mips_no_madd4 is defined when the -mnomadd4 option is in use.

This revision now requires changes to proceed.May 31 2017, 9:10 AM
smaksimovic edited edge metadata.

Changed feature name from madd4 to nomadd4 to reflect the change from the dependency.
Added macro definition when +nomadd4 is present.

sdardis accepted this revision.Jun 6 2017, 4:56 AM

The new define also requires a test in test/Preprocessor/init.c - test that by default the new define isn't present, and in some case, when supplied with the -mno-madd4 that it is present.

LGTM with that change.

This revision is now accepted and ready to land.Jun 6 2017, 4:56 AM

Provided define checks, one when the target feature is present, other when the feature isn't provided at all (default).

This revision was automatically updated to reflect the committed changes.