]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
I have ported PostgreSQL 6.4 to Cobalt Qube running Linux 2.0.33 with
authorBruce Momjian <bruce@momjian.us>
Fri, 18 Dec 1998 17:25:41 +0000 (17:25 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 18 Dec 1998 17:25:41 +0000 (17:25 +0000)
MIPS cpu (I think it's R4000). I have tested the patches on LinuxPPC
and FreeBSD. I believe they do not harm other platforms.
--
Tatsuo Ishii

src/backend/storage/buffer/s_lock.c
src/include/port/linux.h
src/template/.similar
src/template/linux_mips [new file with mode: 0644]

index 439240a386fd540e0e70ae7720de8653f300ec03..77f3dbc5ad0f88852de48489b08477e53be9bd27 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.13 1998/12/15 12:46:21 vadim Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.14 1998/12/18 17:25:39 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -124,7 +124,28 @@ success:                   \n\
 
 #endif  /* PPC */
 
-
+#if defined(__mips)
+static void
+tas_dummy()
+{
+       __asm__("               \n\
+.global        tas                     \n\
+tas:                           \n\
+       .frame  $sp, 0, $31     \n\
+       ll      $14, 0($4)      \n\
+       or      $15, $14, 1     \n\
+       sc      $15, 0($4)      \n\
+       beq     $15, 0, fail    \n\
+       bne     $14, 0, fail    \n\
+       li      $2, 0           \n\
+       .livereg 0x2000FF0E,0x00000FFF  \n\
+       j       $31             \n\
+fail:                          \n\
+       li      $2, 1           \n\
+       j       $31             \n\
+       ");
+}
+#endif /* __mips */
 
 #else                                                  /* defined(__GNUC__) */
 /***************************************************************************
index 14de3b26fa5038a50602fc4f7e9ffabee6223ece..81169b2c0c903c412a583645ab25ecb46a9f5479 100644 (file)
@@ -14,6 +14,9 @@ typedef unsigned int slock_t;
 #elif defined(__alpha)
 typedef long int slock_t;
 
+#elif defined(__mips)
+typedef unsigned int slock_t;
+
 #else                                                  /* i386 probably */
 typedef unsigned char slock_t;
 
index c5f74dc39f04fe282738e0f80c737a9234e0ca2f..7702fc6291faff36a11a596e423040387e701bc9 100644 (file)
@@ -26,3 +26,4 @@ sparc-sun-solaris=solaris_sparc_gcc
 sparc-sun-sunos4=sunos4_gcc
 sparc-sun-sunos5=solaris_sparc_gcc
 sparc-unknown-linux-gnu=linux_sparc
+mips-pc-linux-gnu=linux_mips
diff --git a/src/template/linux_mips b/src/template/linux_mips
new file mode 100644 (file)
index 0000000..24f9d2f
--- /dev/null
@@ -0,0 +1,10 @@
+AROPT:crs
+CFLAGS:-O2 -mips2
+SHARED_LIB:-fpic
+ALL:
+SRCH_INC:
+SRCH_LIB:
+USE_LOCALE:no
+DLSUFFIX:.so
+YFLAGS:-d
+YACC:bison -y