This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Adding new register
- From: "Petar Penchev" <ptr at melexis dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 05 Jan 2005 14:04:38 +0200
- Subject: Adding new register
- Organization: Melexis
Hello All,
The GCC port I am working on now supports two versions of a same CPU core.
The differences were only few instructions.
Then a new regoster had been added to the second version of CPU. The main
problem is that this register is 40 bits wide and th CPU has PUSH and POP
instructions for it, as well as some move instructions. It is also
availible in 32,16 and 8 bit mode, however PUSH / POP instructions store /
load 40 bits. I in defined my_target-modes.def new mode EDI with following
line
INT_MODE(EDI,5);. I have defined 'pushedi' and 'popedi' patterns but I
still cann't make GCC to push/pop this register. GCC uses it as a one
level stack.
What else should I do to make GCC to store/load this 40 bit register
to/from stack ?
Regards
--
Petar Penchev
Software engineer