From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Klein To: law@cygnus.com Cc: gcc@gcc.gnu.org Subject: Re: HARD_REGNO_MODE_OK on PA-RISC (revisited) Date: Tue, 31 Aug 1999 23:20:00 -0000 Message-ID: <4.1.19990827171727.00c5a960@garfield.dis.com> References: <4.1.19990827070612.00c4bc00@garfield.dis.com> <9017.935791187@upchuck.cygnus.com> X-SW-Source: 1999-08n/msg00951.html Message-ID: <19990831232000.9VbJZiv0T0S-mMrKYX45umVo-m7oHzQb0nCtsKvMX7w@z> At 03:59 PM 8/27/99 -0600, Jeffrey A Law wrote: >My queue is over 200 patches deep. And unfortunately MPE isn't anywhere near >the top of the list. Simply a matter of priorities. OK. I'll keep tracking what you've got (thank heaven I ported CVS to MPE). Let me know when you want me to repost them and I'll do so. >:-) I did something similar already. We're still beating on it internally >before we contribute it. For sake of argument, here's mine. I reformatted it a bit to understand it better. The only real changes are to handle the long double: struct rtx_def * function_arg(cum, mode, type, named) const CUMULATIVE_ARGS *cum; enum machine_mode mode; tree type; int named; { rtx reg = 0; int basereg1 = 0; int basereg2 = 0; /* * See if there is at least one argument register still available. */ if (4 >= cum->words + FUNCTION_ARG_SIZE (mode, type)) { if (!TARGET_PORTABLE_RUNTIME || type == 0 || !FLOAT_MODE_P (mode) || TARGET_SOFT_FLOAT || cum->nargs_prototype > 0) { if (FUNCTION_ARG_SIZE (mode, type) > 2) { /* * We're dealing with an argument greater than 2 words. * It must be passed in the frame by reference. */ return 0; } if (FUNCTION_ARG_SIZE (mode, type) > 1) { /* * This is a multi-word parameter. If this is either a direct * call or the portable runtime and we're dealing with the * hardware FPU, place the argument in the argument into the * correct FARG, otherwise put it in a general register. */ if ((!cum->indirect || TARGET_PORTABLE_RUNTIME) && (mode) == DFmode && !TARGET_SOFT_FLOAT) basereg1 = (cum->words ? 38 : 34); else basereg1 = (cum->words ? 23 : 25); } else { /* * This is a single-word parameter. If this is either a direct * call or the portable runtime and we're dealing with the * hardware FPU, place the argument into the correct FARG, * otherwise put it into a general register. */ if ((!cum->indirect || TARGET_PORTABLE_RUNTIME) && (mode) == SFmode && !TARGET_SOFT_FLOAT) basereg1 = (32 + 2 * cum->words); else basereg1 = (27 - cum->words - FUNCTION_ARG_SIZE(mode, type)); } /* * Generate the REG rtx for the current parameter. */ reg = gen_rtx_REG (mode, basereg1); } else { /* * We need to place the argument in both floating args as well * as the general args. */ if (FUNCTION_ARG_SIZE (mode, type) > 2) { /* * We're dealing with an argument greater than 2 words. * It must be passed in the frame by reference. */ return 0; } if (FUNCTION_ARG_SIZE (mode, type) > 1) { basereg1 = (cum->words ? 38 : 34); basereg2 = (cum->words ? 23 : 25); } else { basereg1 = (32 + 2 * cum->words); basereg2 = (27 - cum->words - FUNCTION_ARG_SIZE (mode, type)); } reg = gen_rtx_PARALLEL (mode, gen_rtvec(2, gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_REG (mode, basereg1), const0_rtx), gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_REG (mode, basereg2), const0_rtx))); } } return reg; } /DIS/GNU/src/egcs-ss/gcc/config/pa(134): -- Mark Klein DIS International, Ltd. http://www.dis.com 415-892-8400 PGP Public Key Available