Page MenuHomePhabricator

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

Authored by glider on Thu, Aug 29, 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.

Diff Detail

Repository
rL LLVM

Event Timeline

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

clang-format

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

Minor comment fix.

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