This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Christian Hildner <christian.hildner@hob.de> writes:Inspecting the output I found that there will be no corruption of registers. But since it may not be 100% save I will switch to the usage of output registers (as you suggested).
Falk Hueffner schrieb:
Christian Hildner <christian.hildner@hob.de> writes:I made it an input one instead.
I need a temporary general register inside the inline assemblyWhy can't you just make it an output variable?
code. The definition for a particular register is possible by for
example "eax". But how to define a general register that the
compiler is allowed to choose as it is possible with input/output
registers who are referenced by %0, %1, ... ? So simply to allow "r"
in the clobbered list and reference it by %x in the assembly code.
That will lead to wrong code, since gcc thinks you won't change it.
I am just wondering to be at least the only one that would need that feature.This is possible, but it would be nicer to allow an unspecified
general register in the clobbered list.
But since the functioinality is trivially available by another way, I don't think it's worth adding complexity to the compiler for this.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |