Suppressing c2 "Optimizations"

John Polstra polstra!jdp at uunet.uu.net
Sat Jan 27 11:46:40 AEST 1990


Can anybody tell me how to turn off Sun's peephole optimizer "c2" for just
a portion of a program?  From using strings(1), I have reason to believe
that it can be done using a directive something like this:

	|#OPTIM# something

in the assembly language source.  But I cannot guess the details and I
cannot find any documentation.

Here is my specific problem (SunOS 4.0.1 on a 3/180):  I want to use
inline(1) to replace calls to a function by some assembly code for the
FPA.  The assembly code that I want to use contains this instruction:

	fpdot3d fpa0,fpa3,fpa0

The instruction uses six FPA registers, fpa0 thru fpa5.  But "c2"
apparently thinks that the instruction uses only fpa0 and fpa3.  As a
result, it is incorrectly rearranging some instructions and introducing a
bug.  I want to be able to tell "c2" not to mess with a certain portion of
the code, so that I can work around this problem.

Thanks in advance . . .
  John Polstra               jdp at polstra.UUCP
  Polstra & Co., Inc.        ...{uunet,sun}!practic!polstra!jdp
  Seattle, WA                (206) 932-6482



More information about the Comp.sys.sun mailing list