This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen]: fix error message for "=r" asm constraint
ClosedPublic

Authored by glider on Aug 29 2019, 8:05 AM.

Details

Summary

Nico Weber reported that the following code:

char buf[9];
asm("" : "=r" (buf));

yields the "impossible constraint in asm: can't store struct into a register"
error message, although |buf| is not a struct (see
http://crbug.com/999160).

Make the error message more generic and add a test for it.
Also make sure other tests in x86_64-PR42672.c check for the full error
message.

Event Timeline

glider created this revision.Aug 29 2019, 8:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 29 2019, 8:05 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
glider updated this revision to Diff 217887.Aug 29 2019, 8:10 AM

clang-format

thakis accepted this revision.Aug 29 2019, 8:12 AM
This revision is now accepted and ready to land.Aug 29 2019, 8:12 AM
glider updated this revision to Diff 218037.Aug 30 2019, 1:52 AM

Minor comment fix.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2019, 1:58 AM