Re: SPARC CPU have a bug? very starange things!!!

From: SP Ennema (ennema@zonnet.nl)
Date: 04/18/03


From: "SP Ennema" <ennema@zonnet.nl>
Date: Fri, 18 Apr 2003 17:13:27 GMT


"gamestar" <sjkim@altibase.com> schreef in bericht
news:787bc6ec.0304101726.31ed207d@posting.google.com...
> Casper H.S. Dik <Casper.Dik@Sun.COM> wrote in message
news:<3e95a49b$0$49114$e4fe514c@news.xs4all.nl>...
> > sjkim@altibase.com (gamestar) writes:
> > >the %y value is always zero on success and on failure after sdivcc op.
> > And *before* the sdivcc operation?
> >
> > Casper

> thanks a lot.

> thr %y vlaue is always zero, before sdivcc after sdivcc.
> just only $psr was changed. (so I said it was very strange. -_-;;)
>
> and, I checked my binary code using "dis bin | grep sdivcc".
> I found about six sdivcc code in my binary.
>
> I compiled with -xarch=v9 -fast.
> maybe -fast affected that. because -fast expand -O4 and others.
> When I remove -fast and add -O2 instead it, sdivcc op. disappeared.
>
> Is this Bug of Compiler? I don't know.
>
> * but *, the buggy binary on solaris 2.7 runs ok on solaris 2.8 !!!
>
 I haven't followed this complete thread, but the following remarks:

if you want -xarch=v9 to work properly, you should put it after -fast
-fast expands to a series of options, including a -xarch option, but this
option depends
on the platform your compiling on. It also sets an option for the chip
version (e.g. sparc2 or sparc3)
(also depending on the platform), so you should run the executable on a
compatible platform.
maybe this helps



Relevant Pages

  • Re: Another computer algebra system : smib
    ... Certainly sometimes a bug is discovered only after a program is ported to a new environment -- a bug that existed in the old environment too, but just had not been exercised. ... Spending time porting a program is ... If the code is a command line drive program, then there should be few differences between for platform A and code for platform B. If one uses portable thread libraries, then if code breaks on platform B, but not on A, I would certainly think it is worth while spending time on platform B to find the problem, as it is highly likely to be a logical error in the program. ... The fact this is new code, I would not release it with over 1600 warnings messages from the compiler. ...
    (sci.math.symbolic)
  • Re: made it to page 4 of gforth tutorial
    ... the stack space anyway. ... And there are clearly going to be some platform ... came with an embedded C compiler once. ... like I've written before, if one *really* needs recursion (as I have, ...
    (comp.lang.forth)
  • Re: interesting use of NEXT SENTENCE vs. CONTINUE
    ... These days I don't do compiler maintenance, but I HAVE done in the past, so ... You had a chance to point out how adherence to the standard can improve ... >> compile it WITH MINOR MODIFICATIONS for a specific platform. ... > platform-specific extension to COBOL ...
    (comp.lang.cobol)
  • Re: interesting use of NEXT SENTENCE vs. CONTINUE
    ... I DID think any old compiler would be able to ... > compile it WITH MINOR MODIFICATIONS for a specific platform. ... > not going to go to the Standard to see what SHOULD work. ... If you write your COBOL code avoiding the things that are marked as ...
    (comp.lang.cobol)
  • Re: The Lisp Curse
    ... a platform has lived that long, then yes, it could. ... Object code from 1964 will run on today's IBM machines. ... assembler and get anything written since then to run. ... gcc was originally a Pascal compiler. ...
    (comp.lang.forth)