d89.p-eriksson@linus.ida.liu.se (Peter Eriksson) (01/07/90)
I am a bit confused with the macro HARD_REGNO_NREGS in the tm-{machine}.h header file. I'm trying to write a machine description for the Prime 50-series computers, but I'm not sure how this macro is supposed to work. Perhaps someone can help me with it? The Prime has 8 general registers, 2 floating point registers that can be used as 1 TFmode or 2 SFmode or DFmode. And two "base" registers, XB (general) and SB (stack base). I've written the macro like this: #define HARD_REGNO_NREGS(REGNO,MODE) \ ((REGNO) < 8 ? ((GET_MODE_SIZE(MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) : ((REGNO) == 8 && (MODE) == TFmode ? 2 : 1)) However, I'm not sure this is correct. I have tried looking at the machine descriptions for other CPU:s but... /* Peter Eriksson (InterNet: d89.p-eriksson@linus.ida.liu.se) */