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

Re: Fatal compiler/assembler errors (PostgreSQL 7.0.2/NetBSD 1.4.2/VAX)

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Jeff Workman <jworkman(at)pimpworks(dot)org>
Cc: <pgsql-ports(at)postgresql(dot)org>
Subject: Re: Fatal compiler/assembler errors (PostgreSQL 7.0.2/NetBSD 1.4.2/VAX)
Date: 2000-12-14 19:24:36
Message-ID: Pine.LNX.4.30.0012142007480.781-100000@peter.localdomain (view raw, whole thread or download thread mbox)
Lists: 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(at)gmx(dot)net

In response to


pgsql-ports by date

Next:From: Jeff WorkmanDate: 2000-12-15 10:28:52
Subject: Re: Fatal compiler/assembler errors (PostgreSQL 7.0.2/NetBSD 1.4.2/VAX)
Previous:From: Jeff WorkmanDate: 2000-12-14 10:48:13
Subject: Fatal compiler/assembler errors (PostgreSQL 7.0.2/NetBSD 1.4.2/VAX)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group