comp.lang.ada
 help / color / mirror / Atom feed
* A SPARC curiosity.
@ 1997-10-29  0:00 W. Wesley Groleau x4923
  1997-10-29  0:00 ` Robert S. White
  1997-10-29  0:00 ` Stephen Leake
  0 siblings, 2 replies; 4+ messages in thread
From: W. Wesley Groleau x4923 @ 1997-10-29  0:00 UTC (permalink / raw)



I received some SPARC-specific C code with embedded asm() from 
someone at Sun.  It had a lot of printf.  I trimmed the output down
to the subset I needed, and it still worked.  I then changed it to
put the output into an Ada string, changed the while loop to
a for loop, and had the Ada do the printing.  It didn't work. 
 
But as I was trying to figure out what seemed wrong, I discovered 
it DOES work on another SPARC!

Details:
gcc 2.7.2 and gnat 3.10 crossmounted to both machines.
Same executable (no relinking) does not work on this:
   166 -> uname -a
   SunOS sparc02 5.5.1 Generic sun4d sparc SUNW,SPARCserver-1000
but does work on this:
   169 -> uname -a
   SunOS gc058 5.5.1 Generic sun4u sparc SUNW,Ultra-2

The error is not a crash or other disaster, merely a truncation of
the output.  Optimization -O3 and -O0 are the same.

Anyone with a little time and a lot of curiosity want to look at it?

-- 
----------------------------------------------------------------------
    Wes Groleau, Hughes Defense Communications, Fort Wayne, IN USA
Senior Software Engineer - AFATDS                  Tool-smith Wanna-be
                    wwgrol AT pseserv3.fw.hac.com

Don't send advertisements to this domain unless asked!  All disk space
on fw.hac.com hosts belongs to either Hughes Defense Communications or 
the United States government.  Using email to store YOUR advertising 
on them is trespassing!
----------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-10-30  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-29  0:00 A SPARC curiosity W. Wesley Groleau x4923
1997-10-29  0:00 ` Robert S. White
1997-10-29  0:00 ` Stephen Leake
1997-10-30  0:00   ` W. Wesley Groleau x4923

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox