Re: [HACKERS] LinuxPPC problems - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] LinuxPPC problems
Date
Msg-id 199809030214.WAA21760@candle.pha.pa.us
Whole thread Raw
In response to LinuxPPC problems  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Responses Re: [HACKERS] LinuxPPC problems  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-hackers
Patch applied.


> As I mentioned before, I did some trials on my LinuxPPC box last week
> end. First I compiled with -O0. To my surprise, things got worse than -
> O2. Seems tas() for PPC (storage/buffer/s_lock.c) never works if
> compiled with -O0. Included are patches that should fix the problem
> (of course I have confirmed -O2 works with this patch).
>
> BTW, here is a platforms/regression test failure(serious one--backend
> death) matrix.
>
>             FreeBSD        LinuxPPC(-O0)    LinuxPPC(-O2)
>
> constraints        GOOD        NG        NG
> create_function1    GOOD        GOOD        NG
> create_function2    GOOD        GOOD        NG
> select_having        NG        NG        NG
> select_views        GOOD        NG        NG
> triggers        GOOD        NG        NG
>
> I will look into LinuxPPC problems further.
> --
> Tatsuo Ishii
> t-ishii@sra.co.jp
> ----------------------------------------------------------------------
> *** s_lock.c.orig    Mon Aug 31 16:39:24 1998
> --- s_lock.c    Mon Aug 31 17:38:34 1998
> ***************
> *** 95,114 ****
>
>   #if defined(PPC)
>   /* Note: need a nice gcc constrained asm version so it can be inlined */
> ! int
> ! tas(volatile slock_t *lock)
>   {
> !     __asm__("lwarx    5,0,3    \n\
> !             cmpwi    5,0        \n\
> !             bne        fail    \n\
> !             addi    5,5,1    \n\
>               stwcx.  5,0,3    \n\
> !              beq        success    \n\
> ! fail:        li        3,1        \n\
> !             blr                \n\
> ! success:                    \n\
> !             li 3,0            \n\
> !             blr                \n\
>       ");
>   }
>   #endif /* PPC */
> --- 95,117 ----
>
>   #if defined(PPC)
>   /* Note: need a nice gcc constrained asm version so it can be inlined */
> ! static void
> ! tas_dummy()
>   {
> !     __asm__("        \n\
> ! .global        tas        \n\
> ! tas:                \n\
> !         lwarx    5,0,3    \n\
> !         cmpwi    5,0    \n\
> !         bne    fail    \n\
> !         addi    5,5,1    \n\
>               stwcx.  5,0,3    \n\
> !              beq    success    \n\
> ! fail:        li    3,1    \n\
> !         blr        \n\
> ! success:            \n\
> !         li 3,0        \n\
> !             blr        \n\
>       ");
>   }
>   #endif /* PPC */
>
>


--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] encoding problem
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Core dump in regression tests.