This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Map dcbtst, dcbtt to n2=0 for __builtin_prefetch builtin.
- From: Carl Love <cel at us dot ibm dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: gcc-patches at gcc dot gnu dot org, David Edelsohn <dje dot gcc at gmail dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Date: Tue, 08 May 2018 17:04:33 -0700
- Subject: Re: [PATCH, rs6000] Map dcbtst, dcbtt to n2=0 for __builtin_prefetch builtin.
- References: <1525725295.4827.4.camel@us.ibm.com> <20180508162401.GB17342@gate.crashing.org>
Segher:
On Tue, 2018-05-08 at 11:24 -0500, Segher Boessenkool wrote:
> What ISA version is required for the TH field to do anything? Will
> it work on older machines too (just ignored)? What assembler version
> is required?
I went back and checked. The mnemonics for
dcbtt RA,RB dcbt for TH value of 0b10000
dcbtstt RA,RB dcbtst for TH value of 0b10000.
were introduced in ISA 2.06.
There is another pair of mnemonics
dcbtds RA,RB,TH dcbt for TH values of 0b00000 or
0b01000 - 0b01111;
other TH values are invalid.
dcbtstds RA,RB,TH dcbtst for TH values of 0b00000
or 0b01000 - 0b01010;
other TH values are invalid.
that could be used instead. These are both supported starting with
ISA 2.05. The dcbtds is actually supported back to ISA 2.03 but the
dcbtstds is not.
I was looking for some kind of conditional compilation for Power 7 or
newer. In rs6000.h there are defines for the assembler supporting the
popcount byte instruction,
#ifndef HAVE_AS_POPCNTB
#undef TARGET_POPCNTB
#define TARGET_POPCNTB 0
#endif
I haven't found anything that I could use specifically for Power 7 and
newer. Not sure if it is worth defining a HAVE_AS_DCBTT to do
something similar? Seems a bit over kill. Thoughts on how to limit
the generation of dcbtt and dcbtstt to Power 7 or newer?
Carl Love