This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [TESTCASE] Minimized testcase for AltiVec segfault


on 2/27/02 6:09 PM, Daniel Egger at degger@fhm.edu wrote:

> Am Don, 2002-02-28 um 02.23 schrieb Alex Rosenberg:
> 
>> "#pragma altivec_vrsave on | off | allon" support would be desirable as
>> well.
> 
>> The idea here is to not emit VRSave uses except at an outermost function.
> 
> Just curious: how's that supposed to work?

Suppose you're writing a plugin for an image processing application:

#pragma altivec_vrsave off

void entrypoint(...)
{
#pragma altivec_vrsave allon
  do_work();
}
...

So, the entrypoint function will turn on all bits in VRSave and all other
functions will not manipulate it at all. If lots of small subroutines are
used, the savings add up. (Consider the serialization for m[tf]spr.)

The syntax is outlined in section 2.6 of the AltiVec PIM.

Of course, I realize in suggesting this that pragmas are out of favor with
this crowd and that a new and twisty syntax unique to gcc is likely to
happen instead. However, this functionality has already proven useful to
numerous Mac OS developers, particularly in plugin code with single
entrypoints as for Photoshop or After Effects, so I thought it worthwhile to
call attention to it.

+------------------------------------------------------------+
| Alexander M. Rosenberg           <mailto:alexr@_spies.com> |
| Nobody cares what I say. Remove the underscore to mail me. |



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]