Problems Compiling on a R3000 MIPS

Поиск
Список
Период
Сортировка
От Michael Richards
Тема Problems Compiling on a R3000 MIPS
Дата
Msg-id 3A621FAE.000067.86741@frodo.searchcanada.ca
обсуждение исходный текст
Список 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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Bug in SQL functions that use a NULL parameter directly
Следующее
От:
Дата:
Сообщение: Query Problem!!