Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!usc!apple!mips!gumby!chan From: chan@mips.COM (Sun C. Chan) Newsgroups: comp.sys.mips Subject: Re: as01.31 bug on the DecStation 3100 Message-ID: <33721@mips.mips.COM> Date: 15 Dec 89 19:37:47 GMT References: Sender: news@mips.COM Reply-To: chan@mips.COM (Sun C. Chan) Distribution: comp Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 24 In article ham@Neon.Stanford.EDU (Peter R. Ham) writes: >as should restrict immediate constants to >being within the range of -32768..32767. > >The 1.31 version of as0 fails to do this and lets some positive >constants greater than 32767 slip by. Instead of complaining, >as0 treats them as negative constants which can create bugs. >Give the following assembly, as0 should complain about 5 of >the lines, but instead only complains about 3. 32768 and >40072 should be rejected. The results of assembling this >are also included. > > >addiu $0,$0, 32767 >addiu $0,$0, -32768 >addiu $0,$0, 32768 >addiu $0,$0, -32769 >addiu $0,$0, 40072 >addiu $0,$0, 0xfffffff >addiu $0,$0, -0xffffff > This is indeed a bug in the as0, it has been fixed and will be in the 2.10 release of the compiler. Thanks for pointing this bug out.