builtin assembler constraints
Sat Feb 9 05:43:00 GMT 2013
2013/2/9 Grobman Alexander-R53196 <R53196@freescale.com>:
> I'm trying to incorporate new PPC instructions into a C code. These instructions use limited set of GPRs as operands i.e. only even registers can be used as a source,
> Is there way to specify that in the asm() statement?
If you can express the new PPC instructions with existing rtx,
you should be able to design patterns in your machine description file
and GCC will match it. Otherwise, you can create your own
'unspec' or 'unspec_volatile' rtx pattern and generate them on demand
(e.g. when users call a builtin function that is provided by yourself).
I think that is a better strategy than using asm() statement.
For even number registers, I guess their usage is for DImode or DFmode operand.
In that case, you can use HARD_REGNO_MODE_OK to restrict register number.
More information about the Gcc-help