Re: Re: [PATCHES] s_lock.h cleanup

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [PATCHES] s_lock.h cleanup
Date: 2001-01-19 20:44:15
Message-ID: 200101192044.PAA09999@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

> The __asm___ and splitting up the assembly code into multiple string
> literals and the consistent formatting of the register addendums are
> all fine, because those are read by gcc and this whole code block is
> gcc-only. But the assembly code string literal will be spit out
> essentially verbatim by gcc to the assembler, and the assembler may
> not be nearly as forgiving as you think.
>
> > Oh, wow, I never suspected gcc could work without gas. Can it?
>
> Gcc with platform-specific as used to be the standard configuration
> on HPUX, and may still be standard on some platforms.
>
> Bottom line: I see no point in taking any risks, especially not this
> late in beta, with code that you cannot test for yourself, and
> *especially* not when the change is only for cosmetic reasons.

OK, remove semicolons and put back the \n at the end of each line.
Patch attached.

I wasn't going to mess with this while in beta, but when I found the VAX
code broken, it seemed worth making sure they were all OK. The VAX
stuff was broken because in 7.0.3 it shows:

__asm__(" movl $1, r0 \
bbssi $0, (%1), 1 f \
clrl r0 \
1: movl r0, %0 "

The '1 f' we broken, but also the thing missing here is \n\. With \, it
just makes one long line, which certainly can't be asembled. The VAX
guy added semicolons, but I can see that \n\ is safer, and have done
that.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Attachment Content-Type Size
unknown_filename text/plain 10.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-01-19 20:59:41 Re: Small patch to replace 'idle' by 'trans' if transaction is still open
Previous Message Martin A. Marques 2001-01-19 20:40:41 Re: re-instalation

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2001-01-19 20:59:41 Re: Small patch to replace 'idle' by 'trans' if transaction is still open
Previous Message Ian Lance Taylor 2001-01-19 20:06:15 Re: Re: [PATCHES] s_lock.h cleanup