Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!snorkelwacker!bloom-beacon!eru!luth!sunic!liuida!isy!news From: d89.p-eriksson@linus.ida.liu.se (Peter Eriksson) Newsgroups: gnu.gcc Subject: HARD_REGNO_NREGS (help needed) Message-ID: <1990Jan7.011434.19259@isy.liu.se> Date: 7 Jan 90 01:14:34 GMT Sender: news@isy.liu.se (Lord of the News) Reply-To: d89.p-eriksson@linus.ida.liu.se Distribution: gnu Organization: Dept of EE, University of Linkoping Lines: 18 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) */