Commit 58e539e5 authored by Bruce Momjian's avatar Bruce Momjian

Long awaited port for NetBSD/m68k was finally done by Mr. Mutsuki

Nakajima. Since he is not subscribing the mailing list, I'm posting
his patches by his request.  According to him, he has successfully
compiled and passed the regression test on Mac SE/30 running
NetBSD/m68k. Also, another person has reported that with the patches
PostgreSQL is working on NetBSD/sun3 too.
--
Tatsuo Ishii
parent 2be1ecce
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.14 1998/12/18 17:25:39 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.15 1998/12/26 18:15:53 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -99,6 +99,25 @@ s_lock(volatile slock_t *lock, const char *file, const int line) ...@@ -99,6 +99,25 @@ s_lock(volatile slock_t *lock, const char *file, const int line)
*/ */
#if defined(__m68k__)
static void
tas_dummy() /* really means: extern int tas(slock_t **lock); */
{
__asm__(" \n\
.global _tas \n\
_tas: \n\
movel sp@(0x4),a0 \n\
tas a0@ \n\
beq _success \n\
moveq #-128,d0 \n\
rts \n\
_success: \n\
moveq #0,d0 \n\
rts \n\
");
}
#endif /* __m68k__ */
#if defined(PPC) #if defined(PPC)
/* Note: need a nice gcc constrained asm version so it can be inlined */ /* Note: need a nice gcc constrained asm version so it can be inlined */
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: memutils.h,v 1.18 1998/09/07 05:35:48 momjian Exp $ * $Id: memutils.h,v 1.19 1998/12/26 18:15:53 momjian Exp $
* *
* NOTES * NOTES
* some of the information in this file will be moved to * some of the information in this file will be moved to
...@@ -58,13 +58,17 @@ tending ...@@ -58,13 +58,17 @@ tending
#define SHORTALIGN(LEN)\ #define SHORTALIGN(LEN)\
(((long)(LEN) + (sizeof (short) - 1)) & ~(sizeof (short) - 1)) (((long)(LEN) + (sizeof (short) - 1)) & ~(sizeof (short) - 1))
#if defined(m68k)
#define INTALIGN(LEN) SHORTALIGN(LEN)
#else
#define INTALIGN(LEN)\ #define INTALIGN(LEN)\
(((long)(LEN) + (sizeof (int) - 1)) & ~(sizeof (int) -1)) (((long)(LEN) + (sizeof (int) - 1)) & ~(sizeof (int) -1))
#endif
/* /*
* LONGALIGN(LEN) - length (or address) aligned for longs * LONGALIGN(LEN) - length (or address) aligned for longs
*/ */
#if defined(sun) && ! defined(sparc) #if (defined(sun) && ! defined(sparc)) || defined(m68k)
#define LONGALIGN(LEN) SHORTALIGN(LEN) #define LONGALIGN(LEN) SHORTALIGN(LEN)
#elif defined (__alpha) #elif defined (__alpha)
...@@ -81,7 +85,10 @@ tending ...@@ -81,7 +85,10 @@ tending
(((long)(LEN) + (sizeof (long) - 1)) & ~(sizeof (long) -1)) (((long)(LEN) + (sizeof (long) - 1)) & ~(sizeof (long) -1))
#endif #endif
#if ! defined(sco) #if defined(m68k)
#define DOUBLEALIGN(LEN) SHORTALIGN(LEN)
#define MAXALIGN(LEN) SHORTALIGN(LEN)
#elif ! defined(sco)
#define DOUBLEALIGN(LEN)\ #define DOUBLEALIGN(LEN)\
(((long)(LEN) + (sizeof (double) - 1)) & ~(sizeof (double) -1)) (((long)(LEN) + (sizeof (double) - 1)) & ~(sizeof (double) -1))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment