[llvm-dev] Mapping InlineAsm parameters to ConstraintInfoVector elements

Evgenii Stepanov via llvm-dev llvm-dev at lists.llvm.org
Fri Mar 16 15:42:55 PDT 2018


Could you provide an example where MSan checks an output parameter?

On Fri, Mar 16, 2018 at 9:53 AM, Alexander Potapenko via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Hi all,
>
> I'm trying to figure out which parameters of a given InlineAsm instruction
> are its inputs, and which are the outputs (rationale: make sure MSan
> doesn't check the output parameters of an asm() statement).
>
> As far as I understand, this information is only available through the
> ConstraintInfoVector for the InlineAsm. However there's no exact match
> between the constraints and the InlineAsm params. In addition to clobber
> constraints, which should be safe to ignore, there can be multiple
> occurrences  of a single parameter having different constraints. Also, for
> InlineAsm instructions returning non-void values there's one additional
> constraint, but it's unclear whether it always goes first.
>
> My current implementation is quite ad-hoc, so I'm wondering if there's any
> code that already does what I'm trying to achieve.
>
> Thanks in advance,
> Alexander
>
> --
> Alexander Potapenko
> Software Engineer
>
> Google Germany GmbH
> Erika-Mann-Straße, 33
> 80636 München
>
> Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
> Registergericht und -nummer: Hamburg, HRB 86891
> Sitz der Gesellschaft: Hamburg
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list