This is an archive of the discontinued LLVM Phabricator instance.

[asan-asm-instrumentation] Added comment describing how asm instrumentation works.
ClosedPublic

Authored by ygorshenin on Oct 24 2014, 5:40 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

ygorshenin updated this revision to Diff 15406.Oct 24 2014, 5:40 AM
ygorshenin retitled this revision from to [asan-asm-instrumentation] Added comment describing how asm instrumentation works..
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 accepted this revision.Oct 24 2014, 10:16 AM
eugenis edited edge metadata.
eugenis added inline comments.
lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp
46 ↗(On Diff #15406)

That's not how the code works, is it? We look at the opcode to find the access size.

68 ↗(On Diff #15406)

Why not do LEA MemOp, RDI and use the same register for AddressReg and ShadowReg, spilling 1 register instead of 2?

93 ↗(On Diff #15406)

This is not really about leaf functions, but rather about the -fno-omit-frame-pointer setting, the presence of dynamic allocas, etc. It just happens.

This revision is now accepted and ready to land.Oct 24 2014, 10:16 AM

Many thanks!

lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp
46 ↗(On Diff #15406)

Done.

68 ↗(On Diff #15406)

Because we need to spill RDI and a one more register for AddressReg/ShadowReg, so 2 registers in total.

93 ↗(On Diff #15406)

Done.

ygorshenin closed this revision.Oct 27 2014, 1:49 AM
ygorshenin updated this revision to Diff 15476.

Closed by commit rL220670 (authored by @ygorshenin).