Re: Sun inline assembler ...

From: Hans-Jürgen Schönig <postgres(at)cybertec(dot)at>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Sun inline assembler ...
Date: 2005-07-07 15:20:54
Message-ID: 42CD4856.5080501@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I have seen that.
The question is: Gcc seems to get it right ;).
In my little world two compiler should handle this the same but I have
learned that Sun is in many cases different world ...
1+1 is always 2 - on Sun it could also be 3 ;).

hans

Michael Fuhr wrote:
> On Thu, Jul 07, 2005 at 04:53:16PM +0200, Hans-Jürgen Schönig wrote:
>
>>I have some minor troubles when using the Sun Compiler 9 on Solaris 9.
>>The spinlock assembler code is somehow broken for Solaris 9 and Solaris
>>10 (it works for Sun CC 8).
>>
>>The following patch fixes this:
>>
>>[hs(at)localhost postgresql-8.0.1]$ cd src/backend/storage/lmgr/
>>[hs(at)localhost lmgr]$ diff s_lock.c /tmp/fixed_s_lock.c
>>248,249c248,249
>>< asm(".section \"data\"");
>>< asm(".section \"text\"");
>>---
>>
>>> asm(".seg \"data\"");
>>> asm(".seg \"text\"");
>
>
> There's already an #ifdef around that code -- is it not matching
> correctly for your compiler? Here's what I see in REL8_0_STABLE
> and in HEAD (s_lock.c 1.35):
>
> 244 #ifdef SUNOS4_CC
> 245 asm(".seg \"data\"");
> 246 asm(".seg \"text\"");
> 247 #else
> 248 asm(".section \"data\"");
> 249 asm(".section \"text\"");
> 250 #endif
>
> This looks like the thread that led to the above code:
>
> http://archives.postgresql.org/pgsql-patches/2004-12/msg00213.php
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-07-07 15:27:44 Re: Sun inline assembler ...
Previous Message John R Pierce 2005-07-07 15:17:23 Re: BUG #1756: PQexec eats huge amounts of memory