Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!sri-unix!teknowledge-vaxc!uw-beaver!tektronix!reed!iscuva!jimc From: jimc@iscuva.UUCP Newsgroups: comp.sys.mac Subject: Re: MPW C annoyances.... Message-ID: <498@iscuva.UUCP> Date: Tue, 31-Mar-87 10:27:07 EST Article-I.D.: iscuva.498 Posted: Tue Mar 31 10:27:07 1987 Date-Received: Sat, 4-Apr-87 05:20:35 EST References: <12500007@acf4.UUCP> <2926@sdcsvax.UCSD.EDU> Reply-To: jimc@iscuva.UUCP (Jim Cathey) Organization: ISC Systems Corporation, Spokane, WA Lines: 33 In article <2926@sdcsvax.UCSD.EDU> jww@sdcsvax.UCSD.EDU (Joel West) writes: >> Integers on the 680x0 family are 16 (sixteen) bits wide, longs are 32bits. >Actually, integers on the MC68020 and later are 32 bits wide, not 16 >bits wide. The only thing that keeps the 68000 and 68010 from being >a true 32-bit machine is the lack of the multiply/divide in 32 bit size. > >A convincing case can be made for 16 bit integers (speed, Pascal compat...), Certainly speed! For non-68020's, interesting longword instructions generally take longer (and are sometimes larger) than the equivalent word instructions. What bothers me about C is not that, say, an int is 32 bits and a short is 16 bits since I can declare variables either way I want, but that ALL EXPRESSIONS AND STACK PARAMETERS ARE COERCED TO BE INTS! Thus, for a 32-bit int compiler any multiply/divide MUST use a subroutine (including array subscripting operations), every simple int(char)- taking subroutine takes longer to call, etc... I am also bothered about the coersion of float to double, but since I never use floating point I'm not bothered too much. According to K&R, an int is supposed to be the most natural sized operation for any given machine, which, face it, for a 68000/68010 is 16 bits. Personally I am fond of compilers that have switches that allow you to generate code either way suits your needs (and/or fancy). +----------------+ ! II CCCCCC ! Jim Cathey ! II SSSSCC ! ISC Systems Corp. ! II CC ! Spokane, WA ! IISSSS CC ! UUCP: ihnp4!tektronix!reed!iscuva!jimc ! II CCCCCC ! (509)927-5757 +----------------+ "Speed kills (your competitors)."