This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Multiple names for gcc inline assembly constraints?
- From: Eric Sedlar <esedlar at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 20 Dec 2007 10:34:44 -0800 (PST)
- Subject: Multiple names for gcc inline assembly constraints?
As per the GCC manual:
As of GCC version 3.1, one may write `[NAME]' instead of the operand
number for a matching constraint. For example:
asm ("cmoveq %1,%2,%[result]"
: [result] "=r"(result)
: "r" (test), "r"(new), "[result]"(old));
Is
it possible to define multiple [NAME]s for the same constraint? This
would be useful for documentation purposes in the code so that a particular
register re-used for multiple purposes inside a single assembly block
could have a different symbolic name for each purpose it is used for.
Thanks,
Eric