Multiple names for gcc inline assembly constraints?
Eric Sedlar
esedlar@yahoo.com
Thu Dec 20 18:34:00 GMT 2007
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
More information about the Gcc-help
mailing list