power4 compiling

Hollis Blanchard hollisb at us.ibm.com
Wed Nov 5 01:47:49 EST 2003


On Monday, Nov 3, 2003, at 18:23 US/Central, Alan Modra wrote:
>
> On Mon, Nov 03, 2003 at 10:09:30AM -0600, Hollis Blanchard wrote:
>> You shouldn't need to comment out tlbiel. Instead do this:
>> 	CFLAGS = -mtune=power4 -Wa,-mcpu=power4
>> That will tell the compiler not to use POWER4-specific instructions,
>> but also tell the assembler it's ok when we use inline asm statements.
>
> No, this is dangerous.  -mcpu=power4 tells the assembler to use the
> power4 form of mtcrf if it so happens that only one field of cr is
> being set.  gcc may generate such mtcrf instruction.

Oh. That's too bad. What we have is code like this (from
pSeries_htab.c):

if ((cur_cpu_spec->cpu_features & CPU_FTR_TLBIEL) && !large && local) {
	_tlbiel(va);
} else {
	... _tlbie(va); ...
}

Without CONFIG_POWER4_ONLY (i.e. without -mcpu=power4), the assembler
will refuse 'tlbiel'. Any suggestions?

--
Hollis Blanchard
IBM Linux Technology Center


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list