NetBSD/m68k port

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: pgsql-patches(at)postgreSQL(dot)org
Cc: hackers(at)postgreSQL(dot)org
Subject: NetBSD/m68k port
Date: 1998-12-26 15:11:06
Message-ID: 199812261511.AAA00493@ext16.sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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
t-ishii(at)sra(dot)co(dot)jp
---------------------------- cut here ----------------------------
diff -crP postgresql-v6.4.org/src/include/utils/memutils.h postgresql-v6.4/src/include/utils/memutils.h
*** postgresql-v6.4.org/src/include/utils/memutils.h Mon Sep 7 14:35:48 1998
--- postgresql-v6.4/src/include/utils/memutils.h Sat Dec 26 05:51:30 1998
***************
*** 58,70 ****
#define SHORTALIGN(LEN)\
(((long)(LEN) + (sizeof (short) - 1)) & ~(sizeof (short) - 1))

#define INTALIGN(LEN)\
(((long)(LEN) + (sizeof (int) - 1)) & ~(sizeof (int) -1))

/*
* LONGALIGN(LEN) - length (or address) aligned for longs
*/
! #if defined(sun) && ! defined(sparc)
#define LONGALIGN(LEN) SHORTALIGN(LEN)
#elif defined (__alpha)

--- 58,74 ----
#define SHORTALIGN(LEN)\
(((long)(LEN) + (sizeof (short) - 1)) & ~(sizeof (short) - 1))

+ #if defined(m68k)
+ #define INTALIGN(LEN) SHORTALIGN(LEN)
+ #else
#define INTALIGN(LEN)\
(((long)(LEN) + (sizeof (int) - 1)) & ~(sizeof (int) -1))
+ #endif

/*
* LONGALIGN(LEN) - length (or address) aligned for longs
*/
! #if (defined(sun) && ! defined(sparc)) || defined(m68k)
#define LONGALIGN(LEN) SHORTALIGN(LEN)
#elif defined (__alpha)

***************
*** 81,87 ****
(((long)(LEN) + (sizeof (long) - 1)) & ~(sizeof (long) -1))
#endif

! #if ! defined(sco)
#define DOUBLEALIGN(LEN)\
(((long)(LEN) + (sizeof (double) - 1)) & ~(sizeof (double) -1))

--- 85,94 ----
(((long)(LEN) + (sizeof (long) - 1)) & ~(sizeof (long) -1))
#endif

! #if defined(m68k)
! #define DOUBLEALIGN(LEN) SHORTALIGN(LEN)
! #define MAXALIGN(LEN) SHORTALIGN(LEN)
! #elif ! defined(sco)
#define DOUBLEALIGN(LEN)\
(((long)(LEN) + (sizeof (double) - 1)) & ~(sizeof (double) -1))

diff -crP postgresql-v6.4.org/src/backend/storage/buffer/s_lock.c postgresql-v6.4/src/backend/storage/buffer/s_lock.c
*** postgresql-v6.4.org/src/backend/storage/buffer/s_lock.c Sat Sep 19 02:18:39 1998
--- postgresql-v6.4/src/backend/storage/buffer/s_lock.c Sat Dec 26 06:26:24 1998
***************
*** 117,122 ****
--- 117,141 ----

#endif /* PPC */

+ #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__ */


#else /* defined(__GNUC__) */

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Angelos Karageorgiou 1998-12-26 18:11:38 psql \d does not work
Previous Message Bruce Momjian 1998-12-25 11:29:52 Re: [HACKERS] MVCC works in serialized mode!