Approved-By:  usenet@UX3.CSO.UIUC.EDU
Newsgroups: bit.listserv.apple2-l
Date:         Mon, 11 Jan 1993 22:43:08 EST
Comments:     Warning -- original Sender: tag was usenet@UX3.CSO.UIUC.EDU
From:         stuckey@mrcnext.cso.uiuc.edu
Subject:      Jump.c 2.1 - HyperC optimize utility [ 1/1]

        Notes on Jump.c
        By Anthony J. Stuckey, 10-28-92.
        Version 1: 10-27-92: did only jump combination.
        Version 2: 10-28-92: added detection of no-op jumps
        Version 2.1: 10-29-92: Immediate bug-fix release.

        Jump.c addresses one of the problem cases of HyperC's CP-code
generation.  It looks for cases where two consecutive instructions
are jumps, and tries to combine them in such a way as to make one
instruction out of them.
        This problem occurs at the end of some switch() statements,
in for loops and some other places that use break, and potentially
where goto's are used.
        No-op jumps are jumps that jump to the following instruction.
From what I know, they appear in only one place:  switch statements
that are badly terminated.
        This program is intended to be added to your "cc" script, just
before either asmcp or mac.  Example source is included, to show you
where the problems this program catches are generated in C code.  They
are probably not an exhaustive test, just a couple examples I've run across.

        This program will run on any machine that will run HyperC.
There's no charge for it, but comments are welcome at my address in the
source.  Packed with Binscii + Shrinkit.

FiLeStArTfIlEsTaRt
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789()
KJUMP2.1.SHK    AsByAAAACA(4PIAgAAAAAAAAAAAAAsByAITy
GVvTlzW6DM8iAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAIDAAAAwGAAAAAAAA
GVvTN8E2BAAPAMAABAAAA8CAAAw4AQAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAwAAAAAGAAAAAAAAAAIAAAABAAAAAAAAAAAAgMACAAAAIAA
AAAAloMAUCAAAAwENVlSD5CUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AA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L8iNIHPQeywZoousQCNADF2RTY7NISgb230BZ
m(6D0oVG2vJDjPo3oCBKtuAW45(p3zyoKrJFaApqNMimIhdh7y6QpqFzO)ooBpIc
j2YAzAgbDAp321Rh66AcbZ6Ae8YEuhNYgxTxEGBlEwyA8UQABBIfWARRuMKOi4ni
DY8wBglVTOyj66I1Ur4A(kc4uhuGU9us88oEzC98A0zaPOZ4vfgvM(4yyhY)w8zw
qSUBkUPQBDnSE0BAIwYSIz1JI1qQDhkmo3dCPEKsoNRJBLgsMOyGLE8AT64wJDGy
e(YqpsiWqAyhcU7wJA38m)IhksGsSOCTcIrcBQ(dIcuR66kgNxFnYlkcSu2ooGg1
EhCJ0k0VfUcEyzXWfiRxYHJplHVFqfU0jDhFWDDvJJFYc1ZaqockI2SDaLDiUpCK
KRYOz4zMrSKN)0ShgULNkp0k7(y4jjG5IR)oOOumAZc)Knzojvm0K)8JlSlQCgSi
EyyTIqG4IFi0ATR16PEUHFyi0yaORfWIsa7igw8Nwv6tJVoFq7dU)k8IN4e8YOF9
DTC)OLfrM8GPNytOxV67L7SLRznXucN4qk)fRgD9jY6dB2x3GHfbCuRkorUQVDpF
XhqxIZBq9EKjZnuk67rnt2YWqLVfMgqBiQICD4ScLrQIgyI(BY744(J4ba55tvr7
uvrz(MevAAwBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AE(J
--
Anthony J. Stuckey              stuckey@mrcnext.cso.uiuc.edu

"And if you frisbee-throw a universe where does it go?"
             Turquoise, Steve Blunt.
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU