Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: solaris build problem with Sun compilers



Tom Lane wrote:
> Alan Stange <stange(at)rentec(dot)com> writes:
> > Check out the comment and implementation for cas32() in this .il 
> > template file for libc from OpenSolaris:
> 
> > http://cvs.opensolaris.org/source/xref/on/usr/src/lib/libc/sparc/threads/sparc.il
> 
> If you mean
> 
>           * When compiling with -xarch=v8, the compiler refuses to
>           * accept the 'cas' instruction, so we encode it in hex below.
> 
> I can't say that that impresses me.  It still will fail on v8 chips no?
> What's the point of fooling the compiler if you can't fool the hardware?

Wow, that is _insane_ --- you can't code the ASM, so you specify the
instructions in _hex_.  However, they must like cas more than ldstub or
they wouldn't have gone through that much work to use cas.

I am thinking we revert to ldstub and add a comment that we are not
using cas() because of sparc v8.

I just checked gcc on Solaris 2.9 (Solaris 9?), and there is no
specification of the type of sparc processor:

	 /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2/cc1 -quiet -v
	-D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=2 -Dsparc
	-D__sparc__ -D__sparc -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc
	x.c -quiet -dumpbase x.c -auxbase x -version -o /var/tmp//ccBSywG7.s

-- 
  Bruce Momjian   http://candle.pha.pa.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group