Specifics of `BASE_REG_CLASS` macro?
Maxim Blinov
maxim.a.blinov@gmail.com
Fri Mar 31 15:21:00 GMT 2017
Hi,
I am configuring a GCC backend for my CPU architecture. However, I am
uncertain as to what I should define the `BASE_REG_CLASS` macro to.
> Macro: BASE_REG_CLASS
>
> A macro whose definition is the name of the class to which a valid
> base register must belong. A base register is one used in an address
> which is the register value plus a displacement.
So, I understand that this macro should return a class of registers
which may appear in instructions of the following form:
`move *(%reg + $offset), %reg`
My architecture only permits register dereferencing with no offset,
apart from the stack register. My questions are:
Should I consequently define the BASE_REG_CLASS macro to return the
stack pointer register class, and second...
What is the consequence of having no general registers be capable of
being dereferenced with an immediate offset, in terms of the
implementation-specific code that I would need to add, alongside the
standard assortment of machine description files?
More information about the Gcc-help
mailing list