Page MenuHomePhabricator

Enable the %s modifier in inline asm template string
ClosedPublic

Authored by nemanjai on Feb 3 2016, 3:58 AM.

Details

Summary

It appears that there is code in glibc that uses this modifier so LLVM should handle it.
Honestly, I could not locate any documentation specifying the semantics of this modifier so I implemented it to have the same behaviour that I observed from GCC. Perhaps if one of the reviewers has this information, you can offer what needs to be done to the operand when the %s modifier is in the template.

Diff Detail

Repository
rL LLVM

Event Timeline

nemanjai updated this revision to Diff 46758.Feb 3 2016, 3:58 AM
nemanjai retitled this revision from to Enable the %s modifier in inline asm template string.
nemanjai updated this object.
nemanjai added reviewers: echristo, kbarton, wschmidt.
nemanjai set the repository for this revision to rL LLVM.
nemanjai added a subscriber: llvm-commits.
wschmidt accepted this revision.Feb 3 2016, 6:00 AM
wschmidt edited edge metadata.

Yes, that's the correct behavior, as can be seen at https://gcc.gnu.org/ml/gcc-patches/2016-01/msg01937.html. Note that GCC produces a warning if the wrong operand type is used, but I don't see that as a necessity for something that's deprecated anyway. This patch LGTM.

This revision is now accepted and ready to land.Feb 3 2016, 6:00 AM
nemanjai closed this revision.Feb 4 2016, 8:22 AM

Committed revision 259798.