This is an archive of the discontinued LLVM Phabricator instance.

[asm-instrumentation] Asm instrumentation is generated by llvm now.
ClosedPublic

Authored by ygorshenin on Jun 18 2014, 5:12 AM.

Details

Reviewers
eugenis
Summary

[asm-instrumentation] Asm instrumentation is generated by llvm now.

Diff Detail

Event Timeline

ygorshenin updated this revision to Diff 10554.Jun 18 2014, 5:12 AM
ygorshenin retitled this revision from to [asm-instrumentation] Asm instrumentation is generated by llvm now..
ygorshenin updated this object.
ygorshenin edited the test plan for this revision. (Show Details)
ygorshenin added a reviewer: eugenis.
ygorshenin added a subscriber: Unknown Object (MLST).
eugenis added inline comments.Jun 18 2014, 5:55 AM
lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp
177–179

Small and Large variants seem to have a lot of common code.
Would it be possible to factor out the common parts, or maybe even merge the two functions? AFAIU, the only real difference between them should be the presents of a slow path check in Small.

259

This does not take load/store alignment into account.
It's a good first approximation, but please add a FIXME.

337

Why is stack realigned only on 64 bits?

test/Instrumentation/AddressSanitizer/X86/asm_attr.ll
15–16

@PLT here and below?

test/Instrumentation/AddressSanitizer/X86/asm_mov.ll
17

Might want to match jump label with
je [[A:.*]]
...
[[A]]:

PTAL

lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp
177–179

I've checked Small and Large variants side-by-side and looks like after merge the code would be messy due to a lot of branches. I'd prefer to leave both variants as is.

259

Done.

337

Done.

test/Instrumentation/AddressSanitizer/X86/asm_attr.ll
15–16

Done.

test/Instrumentation/AddressSanitizer/X86/asm_mov.ll
17

Good point, thanks!

eugenis edited edge metadata.Jul 7 2014, 6:26 AM

asm_mov.ll test is now failing - looks like

cld
emms

sequence was moved a bit.

ygorshenin updated this revision to Diff 11117.Jul 7 2014, 6:38 AM
ygorshenin edited edge metadata.

Fix.

Sorry, test is fixed. PTAL.

eugenis accepted this revision.Jul 7 2014, 7:08 AM
eugenis edited edge metadata.

Committed in r212455.

This revision is now accepted and ready to land.Jul 7 2014, 7:08 AM
eugenis closed this revision.Jul 7 2014, 7:08 AM