This is the mail archive of the
mailing list for the GCC project.
- From: BELBACHIR Selim <selim dot belbachir at fr dot thalesgroup dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 18 Jan 2012 17:57:55 +0100
- Subject: readonly register
I'm trying to support an 'in' instruction which reads a value on a peripheral and writes it into a $INP register.
The $INP register can be used in almost every insn as input operand (add, sub, mul ...).
I defined a builting to access the 'in' instruction.
How should I express to gcc that the $INP register can only be 'read' and must never be written?
For the moment, I encounter a problem during IRA pass where some of my 'classic' registers are reloaded into $INP (apparently because I have no register left).