Re: Fatal compiler/assembler errors (PostgreSQL 7.0.2/NetBSD 1.4.2/VAX) - Mailing list pgsql-ports

From Peter Eisentraut
Subject Re: Fatal compiler/assembler errors (PostgreSQL 7.0.2/NetBSD 1.4.2/VAX)
Date
Msg-id Pine.LNX.4.30.0012142007480.781-100000@peter.localdomain
Whole thread Raw
In response to Fatal compiler/assembler errors (PostgreSQL 7.0.2/NetBSD 1.4.2/VAX)  (Jeff Workman <jworkman@pimpworks.org>)
Responses Re: Fatal compiler/assembler errors (PostgreSQL 7.0.2/NetBSD 1.4.2/VAX)  (Jeff Workman <jworkman@pimpworks.org>)
List pgsql-ports
Jeff Workman writes:

> Is this a problem with PostgreSQL or a buggy assembler?

PostgreSQL -- Apparently no one tried to use a VAX in a while.

> In file included from xlog.c:28:
> ../../../include/storage/s_lock.h:158: redefinition of `slock_t'
> ../../../include/os.h:43: `slock_t' previously declared here

Remove the one in s_lock.h.

> ../../../include/storage/s_lock.h: In function `tas':
> ../../../include/storage/s_lock.h:163: warning: type defaults to `int' in declaration of `_res'

Add int there if you like.

> {standard input}: Assembler messages:
> {standard input}:119: Warning: Ignoring statement due to "Too many operands"
> {standard input}:119: Warning: Junk at end of expression "bbssi $0"

This one got messed up during a code indentation run.  The code around
line 165 in s_lock.h should look like the one below (reconstructed from
latest good revision).  I don't have a clue how the assembly code actually
works, there might be requirements regarding whitespace that do not show
very well.  If you have problems, you might find help on this issue in a
netbsd/vax forum.

Let us know how it turns out.


static __inline__ int
tas(volatile slock_t *lock)
{
    register        _res;

    __asm__("        movl $1, r0
                     bbssi $0, (%1), 1f
                     clrl r0
  1:                 movl r0, %0 "
  :                  "=r"(_res)                                /* return value, in register */
  :                  "r"(lock)                                 /* argument, 'lock pointer', in register */
  :                  "r0");                                    /* inline code uses this register */
    return (int) _res;
}

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


pgsql-ports by date:

Previous
From: Jeff Workman
Date:
Subject: Fatal compiler/assembler errors (PostgreSQL 7.0.2/NetBSD 1.4.2/VAX)
Next
From: Jeff Workman
Date:
Subject: Re: Fatal compiler/assembler errors (PostgreSQL 7.0.2/NetBSD 1.4.2/VAX)