Path: utzoo!utgpu!watmath!clyde!att!rutgers!mcnc!xanth!hoptoad!dasys1!rodd From: rodd@dasys1.UUCP (Rod Dorman) Newsgroups: comp.sys.amiga.tech Subject: Re: Aztec compiler ineffeciencies Summary: shifts only work for positive values Message-ID: <7949@dasys1.UUCP> Date: 26 Nov 88 04:33:46 GMT References: <3013@sugar.uu.net> Reply-To: rodd@dasys1.UUCP (Rod Dorman) Organization: What me organized ?! Lines: 13 In article <3013@sugar.uu.net> karl@sugar.uu.net (Karl Lehenbauer) writes: >I've been examining the output of Aztec 3.6a and have discovered that it does >no optimization on divides, such as turning divides by constants into shifts > asr.l #1,d4 As many compiler writers have found in the past and I'm sure many will rediscover in the future, this only works for positive values. Try shifting -1 and you'll get -1 as a result, *not* zero as one would expect. -- Rod -- Rod Dorman {sun!hoptoad,cmcl2!phri}!dasys1!rodd Big Electric Cat Public Unix "The ships hung in the sky in much the same way that bricks don't"