Path: utzoo!attcan!uunet!lll-winken!csd4.milw.wisc.edu!bionet!ames!vsi1!daver!mips!mash From: mash@mips.COM (John Mashey) Newsgroups: comp.arch Subject: Re: i860 Dhrystones Keywords: i860 N10 Floating Point Dhrystones Message-ID: <15476@winchester.mips.COM> Date: 18 Mar 89 07:57:12 GMT References: <654@cimcor.mn.org> <93088@sun.uucp> <701@pcrat.UUCP> <93452@sun.uucp> <15074@winchester.mips.COM> <210@intelca.intel.com> <15226@winchester.mips.COM> <6326@cbmvax.UUCP> Reply-To: mash@mips.COM (John Mashey) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 28 In article <6326@cbmvax.UUCP> jesup@cbmvax.UUCP (Randell Jesup) writes: ... > Actually, I think the statement "Greenhills C" was the giveaway. >We use Greenhills C here at Commodore for Amiga OS work, and got bitten recently >because the compiler was set up with the "dhrystone" optimizer turned on, >without our knowing it. This causes mis-aligned strcpy()s to bus-fault on >68000, since it (a) assumes string sources AND destinations are ALWAYS word- >aligned, and (b) inlines strcpy, even though in general greenhills doesn't >do inlining. > > So I suspect the differences are being caused by the "dhrystone" switch >in Greenhills. Can you say more? Do you mean that this is a compile-time switch, but the default was set up to do the strpy this way? (You clearly must be able to turn it off, since some real programs will fail if this is done generally. Maybe it only inlines strcpy when all the conditions are right (and this was a bug)?) Or is this something gen'd into some compilers, but not others? In any case, do you (or anybody) know the option names for turning this effect ON/OFF? (maybe they're different across CPUs?) -- -john mashey DISCLAIMER: UUCP: {ames,decwrl,prls,pyramid}!mips!mash OR mash@mips.com DDD: 408-991-0253 or 408-720-1700, x253 USPS: MIPS Computer Systems, 930 E. Arques, Sunnyvale, CA 94086