[comp.sys.sun] Suppressing c2 "Optimizations"

jdp@uunet.uu.net (John Polstra) (01/27/90)

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@polstra.UUCP
  Polstra & Co., Inc.        ...{uunet,sun}!practic!polstra!jdp
  Seattle, WA                (206) 932-6482

csmoko@relay.nswc.navy.mil (Chuck Smoko - E41) (01/28/90)

Has anyone been able copy SUNOS 1/4" distribution tapes using the public
domain copytape program?  The SUNOS tcopy(1) does not lend itself to my
situation because I have only one drive per machine.  When I compile and
run copytape using SUNOS 4, it does not go past the first file on the
tape.   Using SUNOS 3.5, I run copytape regularly on all 1/2" tapes and on
SUNOS 3.5 1/4" distribution tapes.  I guess  SUNOS 4 1/4" tapes have a
strange blocking factor that may be greater than 126.  My question is:
Does anyone have a copytape that has been modified to run under SUNOS 4?
I got the one that I am using a while ago on simtel20.  Pointers on how to
copy the SUNOS 4 1/4" tapes using a 3.5 system are also welcome.  If I get
enough responses, I will summarize.

                                        Chuck Smoko
                                        csmoko@relay.nswc.navy.mil
                                        Naval Surface Warfare Ctr.

ps: I have read the sun-spots archives on copying SUNOS tapes. I,
however, did not notice any articles that discuss a particular
method in detail.