This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: altivec patches
- To: Aldy Hernandez <aldyh at redhat dot com>
- Subject: Re: altivec patches
- From: Dale Johannesen <dalej at apple dot com>
- Date: Tue, 6 Nov 2001 17:00:26 -0800
- Cc: Dale Johannesen <dalej at apple dot com>, Geoff Keating <geoffk at redhat dot com>, gcc-patches at gcc dot gnu dot org
On Tuesday, November 6, 2001, at 03:04 PM, Aldy Hernandez wrote:
> *************** extern int rs6000_debug_arg;
> --- 766,779 ----
> 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, \
> 18, 17, 16, 15, 14, 13, 12, \
> 64, 66, 65, \
> ! 73, 1, 2, 67, 76, \
> ! /* AltiVec registers. */ \
> ! 77, 78, \
> ! 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, \
> ! 79, \
> ! 96, 95, 94, 93, 92, 91, \
> ! 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97 \
> ! }
This needs an entry for vrsave. (If you leave it out, you can get
a crash in reload on code that has nothing to do with Altivec; trust
me on this one:)
> /* 1 if N is a possible register number for function argument passing.
> On RS/6000, these are r3-r10 and fp1-fp13. */
> #define FUNCTION_ARG_REGNO_P(N) \
> ((unsigned)(((N) - GP_ARG_MIN_REG) < (unsigned)(GP_ARG_NUM_REG)) \
> + || (TARGET_ALTIVEC && \
> + (unsigned)((N) - ALTIVEC_ARG_MIN_REG) <
> (unsigned)(ALTIVEC_ARG_MAX_REG)) \
> || ((unsigned)((N) - FP_ARG_MIN_REG) < (unsigned)(FP_ARG_NUM_REG)))\
It would be nice, though not essential, to update the comment.
> --- 2511,2549 ----
...snipped...
> + &rs6000_reg_names[107][0], /* v30 */ \
> + &rs6000_reg_names[108][0], /* v31 */ \
> }
This needs an entry for vrsave.
> --- 2562,2572 ----
> "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \
> "mq", "lr", "ctr", "ap", \
> "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", \
> ! "xer", \
> ! "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7",
> \
> ! "v8", "v9", "v10", "v11", "v12", "v13", "v14", "v15",
> \
> ! "v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23",
> \
> ! "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31"
> \
> }
So does this.
> + {"v24", 101},{"v25", 102},{"v26", 103},{"v27", 104}, \
> + {"v28", 105},{"v29", 106},{"v30", 107},{"v31", 108}, \
> /* no additional names for: mq, lr, ctr, ap */ \
> {"cr0", 68}, {"cr1", 69}, {"cr2", 70}, {"cr3", 71}, \
> {"cr4", 72}, {"cr5", 73}, {"cr6", 74}, {"cr7", 75}
Not sure about here, but either the table or the commment should be
updated.
> --- 170,181 ----
> "24", "25", "26", "27", "28", "29", "30", "31",
> "mq", "lr", "ctr","ap",
> "0", "1", "2", "3", "4", "5", "6", "7",
> ! "xer",
> ! /* AltiVec registers. */
> ! "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7",
> ! "v8", "v9", "v10", "v11", "v12", "v13", "v14", "v15",
> ! "v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23",
> ! "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31"
> };
vrsave again.
> --- 191,202 ----
> "%f24", "%f25", "%f26", "%f27", "%f28", "%f29", "%f30", "%f31",
> "mq", "lr", "ctr", "ap",
> "%cr0", "%cr1", "%cr2", "%cr3", "%cr4", "%cr5", "%cr6", "%cr7",
> ! "xer",
> ! /* AltiVec registers. */
> ! "%v0", "%v1", "%v2", "%v3", "%v4", "%v5", "%v6", "%v7",
> ! "%v8", "%v9", "%v10", "%v11", "%v12", "%v13", "%v14", "%v15",
> ! "%v16", "%v17", "%v18", "%v19", "%v20", "%v21", "%v22", "%v23",
> ! "%v24", "%v25", "%v26", "%v27", "%v28", "%v29", "%v30", "%v31"
> };
and again.
With these fixes I'll approve everything but the builtins, which I'm not
planning to rule on either way. You'll have to go through and change all
the 'altivec' functional units later, but I guess you're aware of that.