🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #13437

Suppressing c2 "Optimizations"

#13437
From: John Polstra
Date: Sat, 27 Jan 1990 00:46
25 lines
1548 bytes
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
Technical Details
Message-ID: <4498@brazos.Rice.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rice!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rice!sun-spots-request
From: polstra!jdp@uunet.uu.net (John Polstra)
Newsgroups: comp.sys.sun
Subject: Suppressing c2 "Optimizations"
Keywords: Miscellaneous
Message-ID: <4498@brazos.Rice.edu>
Date: 27 Jan 90 00:46:40 GMT
Sender: root@rice.edu
Organization: Sun-Spots
Lines: 25
Approved: Sun-Spots@rice.edu
X-Sun-Spots-Digest: Volume 9, Issue 15, message 6 of 20