Subject: Re: .cprestore?
To: None <jonathan@DSG.Stanford.EDU>
From: maximum entropy <entropy@zippy.bernstein.com>
List: port-pmax
Date: 06/19/1997 05:09:11
>From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
>
>On Wed, 18 Jun 1997 21:13:31 -0700, I wrote:
>
>
>>>cc -O  -D_CURSES_PRIVATE -I/usr/src/lib/libcurses -fPIC -DPIC -DABICALLS -Werror
>>>  -c -pg idlok.c -o idlok.po
>>>/var/tmp/cc009965.s: Assembler messages:
>>>/var/tmp/cc009965.s:41: Warning: No .cprestore pseudo-op used in PIC code
>
>>>Do these warnings indicate something wrong in the source tree,
>>>something wrong with my compilation environment, or is it just random
>>>spam that should be ignored?
>
>Hm. Looking again, these are all for profiled objects.  This may not
>be innocuous after all.
>
>My guess is that routines that are, as far as GCC knows, ``leaf
>routines'', are actually emitting calls to mcount().
>
>Maybe GCC needs to emit .cprestore in that case, and it isn't doing so.

I think you might be right.  I was just looking at the gas source, and
found those warnings can only be generated during M_JAL_2 or M_JAL_A.
My MIPS assembly manual (first time I ever found a use for it!) says
for jal, "Purpose: to procedure call within the current 256MB aligned
region."  So whatever's causing this, the routines where it's
happening definitely aren't leaf routines.  Your explanation sounds
plausible to me.

--
entropy -- it's not just a good idea, it's the second law.