Problems Compiling on a R3000 MIPS

From: "Michael Richards" <michael(at)fastmail(dot)ca>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Problems Compiling on a R3000 MIPS
Date: 2001-01-14 21:52:46
Message-ID: 3A621FAE.000067.86741@frodo.searchcanada.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi.

I'm trying to compile 7.0.3 on a MIPS1 R3000 processor under NetBSD.
It pukes on the infamous s_lock.c file because of some assembler
that's expecting a MIPS2 processor.

gcc -I../../../include -I../../../backend -O2 -pipe -Wall -Wmissing-
prototypes -Wmissing-declarations -I../.. -c -o s_lock.o s_lock.c
s_lock.c:71: warning: no previous prototype for `s_lock'
s_lock.c: In function `s_lock':
s_lock.c:74: warning: implicit declaration of function `TAS'
s_lock.c: At top level:
s_lock.c:149: warning: `tas_dummy' defined but not used
{standard input}: Assembler messages:
{standard input}:220: Error: opcode requires -mips2 or greater `ll'
{standard input}:222: Error: opcode requires -mips2 or greater `sc'

Here is the actual function that it's barfing on. Since I don't know
any MIPS assembler, is there someone else who can suggest a
replacement or patch to this routine so it does not require the ll
and sc opcodes?

#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\
");
}

-Michael
_________________________________________________________________
http://fastmail.ca/ - Fast Free Web Email for Canadians
>From pgsql-bugs-owner(at)postgresql(dot)org Sun Jan 14 19:20:34 2001
Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28])
by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f0F0ESp89319
for <pgsql-bugs(at)postgresql(dot)org>; Sun, 14 Jan 2001 19:14:28 -0500 (EST)
(envelope-from pgsql-bugs-owner(at)postgresql(dot)org)
Received: from rs5s2.datacenter.cha.cantv.net (rs5s2.datacenter.cha.cantv.net [200.44.32.55])
by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0BJlrp37235
for <pgsql-bugs(at)postgresql(dot)org>; Thu, 11 Jan 2001 14:47:54 -0500 (EST)
(envelope-from christiangda(at)cantv(dot)net)
Received: from mapguide3 ([200.11.226.18])
by rs5s2.datacenter.cha.cantv.net (8.10.2/8.10.2/2.0) with SMTP id f0BJlo909885
for <pgsql-bugs(at)postgresql(dot)org>; Thu, 11 Jan 2001 15:47:50 -0400
Message-ID: <000a01c079ac$4a7fa8f0$c002a8c0(at)mapguide3>
From: <christiangda(at)cantv(dot)net>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Query Problem!!
Date: Mon, 8 Jan 2001 15:50:42 -0400
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0007_01C0798A.C1C22DB0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
X-Archive-Number: 200101/74
X-Sequence-Number: 449

This is a multi-part message in MIME format.

------=_NextPart_000_0007_01C0798A.C1C22DB0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I have PostgreSQL v7.02 in RedHat 6.2;

I have problem with is Query:
select name, 'user' as class from smuser union select name, 'group' as clas=
s from smgroup order by class;

sentence problem is:{ order by class} !!!!=20

thank you,=20
Christian Gonzalez

------=_NextPart_000_0007_01C0798A.C1C22DB0
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I have PostgreSQL v7.02 in RedHat 6.2;</FO=
NT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have problem with is Query:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>select name, 'user' as class from smuser u=
nion=20
select name, 'group' as class from smgroup order by class;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>sentence problem is:{ order by class}=20
!!!!&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>thank you, </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Christian Gonzalez</FONT></DIV></BODY></HT=
ML>

------=_NextPart_000_0007_01C0798A.C1C22DB0--

Browse pgsql-bugs by date

  From Date Subject
Next Message Yoshihiko Ichikawa 2001-01-15 00:30:57 Re: Query Problem!!
Previous Message Andrew McMillan 2001-01-14 18:31:36 Re: [BUGS] Bug in SQL functions that use a NULL parameter directly