On Fri, 2020-05-01 at 10:48 -0500, Segher Boessenkool wrote: > Hi! > > On Mon, Apr 27, 2020 at 05:01:34PM -0500, will schmidt wrote: > > On Mon, 2020-04-27 at 15:53 -0400, Michael Meissner via Gcc-patches > > wrote: > > > This patch adds a test that verifies that the compiler generates > > > a prefixed > > > load/store instruction where the compiler cannot generate the > > > instruction > > > directly because the offset is not a valid DS or DQ offset. A DS > > > offset must > > > have the bottom 2 bits clear. A DQ offset must have the bottom 4 > > > bits clear. > > > Due to the way PowerPC instructions are encoded, some > > > instructions use the DS > > > format and some use the DQ format. > > > > > > This is patch #3 of 7. The tests in this patch run on a little > > > endian power8 > > > system running Linux. > > > > > > <snip>
> "long long". > > > > +void > > > +store_float_offset1 (float f, unsigned char *p) > > > +{ > > > + *(float *)(p + 1) = f; /* should generate STF. */ > > > > Comment should be STFD ? > > > > > +} > > > + > > > +void > > > +store_double_offset1 (double d, unsigned char *p) > > > +{ > > > + *(double *)(p + 1) = d; /* should generate > > > STD. */ > > > > Comment should be STFS ? > > The other way around :-) stfs is for single precision float > ("float", > in C), while stfd is for double precision float ("double", in C). I came up with my comment based on what was being tested for further below. If the comment is correct the test below is wrong. (unless i mis-counted something .. always possible but worth double- checking). :-) Thanks, -Will > > > > +/* { dg-final { scan-assembler-times {\mextsb\M} 1 } } */ > > Maybe also test there are no extsh and extsw generated? > > > Segher