OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/gnu-src/newlib-1.18.0
    from Rev 243 to Rev 399
    Reverse comparison

Rev 243 → Rev 399

/newlib/ChangeLog
1,3 → 1,8
2010-10-29 Joern Rennecke <joern.rennecke@embecosm.com>
 
* libc/machine/or32/setjmp.S, libc/machine/or32/longjmp.S:
Rename _setjmp / _longjmp to setjmp / longjmp.
 
2010-07-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
 
* testsuite/lib/newlibprocs.exp: Renamed from newlib.exp, since
/newlib/libc/machine/or32/setjmp.S
25,11 → 25,11
 
/* -------------------------------------------------------------------------- */
/*!_setjmp
/*!setjmp
 
All processor state is saved in the buffer provided. We need not save r0
(it will always be zero) and we need not save r11 (it will always be
overridden here, and in _longjmp).
overridden here, and in longjmp).
 
@todo We should prefer to save and restore the status register, but this is
not directly possible in user code. There is some merit in code to
41,9 → 41,9
@return zero.
/* -------------------------------------------------------------------------- */
.align 4
.global _setjmp
.type _setjmp,@function
_setjmp:
.global setjmp
.type setjmp,@function
setjmp:
l.sw 4(r3),r1 /* Slot 0 saved for flag in future */
l.sw 8(r3),r2
l.sw 12(r3),r3
78,4 → 78,4
l.jr r9
l.addi r11,r0,0 /* Zero result */
 
.size _setjmp, .-_setjmp
.size setjmp, .-setjmp
/newlib/libc/machine/or32/longjmp.S
47,9 → 47,9
@return val, unless val is zero, in which case 1 is returned.
/* -------------------------------------------------------------------------- */
.align 4
.global _longjmp
.type _longjmp,@function
_longjmp:
.global longjmp
.type longjmp,@function
longjmp:
/* Sort out the return value */
l.sfne r4,r0
l.bf 1f
93,9 → 93,9
l.lwz r3,12(r3) /* Now safe */
/* Result is already in r11. Having restored r9, it will appear as
though we have returned from the earlier call to _setjmp. The
though we have returned from the earlier call to setjmp. The
non-zero result gives it away though. */
l.jr r9
l.nop
 
.size _longjmp, .-_longjmp
.size longjmp, .-longjmp
/libgloss/ChangeLog.or32
1,3 → 1,22
2010-10-29 Joern Rennecke <joern.rennecke@embecosm.com>
 
* or32/crt0.S (_start): After main, call exit.
 
* or32/crt0.S: Rename implementation symbols to reside in the
implementation namespace.
* or32/read-uart.c, or32/write-uart.c, or32/uart-dummy.c: Likewise.
* or32/uart.c, or32/uart.h: Likewise.
 
* or32/crt0.S (UNHANDLED_EXCEPTION): Call exit.
 
2010-10-28 Joern Rennecke <joern.rennecke@embecosm.com>
 
* or32/crt0.S (_start): Rename fini to __fini.
 
2010-09-13 Joern Rennecke <joern.rennecke@embecosm.com>
 
* or32/crt0.S (_start): Rename init to __init.
 
2010-08-19 Jeremy Bennett <jeremy.bennett@embecosm.com>
 
* or32/crt0.S (_start): Remove all leading underscores from
/libgloss/or32/read-uart.c
64,9 → 64,9
 
for (i = 0; i < len; i++)
{
buf[i] = _uart_getc ();
buf[i] = __uart_getc ();
#ifdef UART_AUTO_ECHO
_uart_putc (buf[i]);
__uart_putc (buf[i]);
#endif
/* Return partial buffer if we get EOL */
if ('\n' == buf[i])
/libgloss/or32/crt0.S
60,7 → 60,7
l.sw 8(r1),r5 ;\
;\
l.ori r3,r0,0xffff /* Failure RC */ ;\
l.jal _exit ;\
l.jal exit ;\
l.nop ;\
;\
l.rfe /* Never executed we hope */
110,7 → 110,7
 
/* 0x100: RESET exception */
.org 0x100
_reset:
__reset:
/* Jump to program initialisation code */
l.j _start
l.nop
124,16 → 124,16
 
We use registers we know will not interfere in this case. */
.org 0x200
_buserr:
__buserr:
l.nop /* Will be overwritten */
l.nop
l.nop
l.nop
 
_buserr_std:
__buserr_std:
UNHANDLED_EXCEPTION (.L200)
 
_buserr_special:
__buserr_special:
l.mfspr r24,r0,SPR_EPCR_BASE
l.addi r24,r24,4 /* Return one instruction on */
l.mtspr r0,r24,SPR_EPCR_BASE
272,12 → 272,12
_start:
/* Finding the end of stack means we need to handle the bus
error. Patch in some special handler code. */
l.movhi r30,hi(_buserr) /* Where to copy to */
l.ori r30,r30,lo(_buserr)
l.movhi r28,hi(_buserr_std) /* Where to stop copying */
l.ori r28,r28,lo(_buserr_std)
l.movhi r26,hi(_buserr_special) /* Where to copy from */
l.ori r26,r26,lo(_buserr_special)
l.movhi r30,hi(__buserr) /* Where to copy to */
l.ori r30,r30,lo(__buserr)
l.movhi r28,hi(__buserr_std) /* Where to stop copying */
l.ori r28,r28,lo(__buserr_std)
l.movhi r26,hi(__buserr_special)/* Where to copy from */
l.ori r26,r26,lo(__buserr_special)
 
.L11: l.sfeq r28,r30
l.bf .L12
325,10 → 325,10
l.add r2,r30,r0
 
/* Clear out the bus error vector special code. */
l.movhi r30,hi(_buserr)
l.ori r30,r30,lo(_buserr)
l.movhi r28,hi(_buserr_std)
l.ori r28,r28,lo(_buserr_std)
l.movhi r30,hi(__buserr)
l.ori r30,r30,lo(__buserr)
l.movhi r28,hi(__buserr_std)
l.ori r28,r28,lo(__buserr_std)
l.movhi r26,0x1500 /* l.nop 0 */
l.ori r26,r26,0x0000
 
453,17 → 453,17
l.addi r28,r28,4 /* Delay slot */
 
/* Call global and static constructors */
l.jal init
l.jal __init
l.nop
/* Set up destructors to be called from exit if main never returns */
l.movhi r3,hi(fini)
l.movhi r3,hi(__fini)
l.jal atexit
l.ori r3,r3,lo(fini) /* Delay slot */
l.ori r3,r3,lo(__fini) /* Delay slot */
 
/* Initialise UART in a C function. If the UART isn't present, we'll */
/* link against a dummy function. */
l.jal _uart_init
l.jal __uart_init
l.nop
 
/* Jump to main program entry point (argc = argv = envp = 0) */
473,7 → 473,7
l.or r5,r0,r0 /* Delay slot */
 
/* If program exits, call exit routine */
l.jal _exit
l.jal exit
l.addi r3,r11,0 /* Delay slot */
 
/* Loop forever */
/libgloss/or32/write-uart.c
47,7 → 47,7
static void
outbyte (char c)
{
_uart_putc (c);
__uart_putc (c);
 
} /* outbyte () */
 
/libgloss/or32/uart-dummy.c
40,6 → 40,6
It does nothing!
/* -------------------------------------------------------------------------- */
void
_uart_init ()
__uart_init ()
{
} /* _uart_init () */
} /* __uart_init () */
/libgloss/or32/uart.c
69,7 → 69,7
/*!Initialize the UART */
/* -------------------------------------------------------------------------- */
void
_uart_init ()
__uart_init ()
{
int divisor;
 
93,7 → 93,7
UREG8 (UART_DLM) = (divisor >> 8) & 0x000000ff;
UREG8 (UART_LCR) &= ~(UART_LCR_DLAB);
 
} /* _uart_init () */
} /* __uart_init () */
 
 
/* -------------------------------------------------------------------------- */
101,7 → 101,7
 
@param[in] c The character to output */
/* -------------------------------------------------------------------------- */
void _uart_putc (char c)
void __uart_putc (char c)
{
unsigned char lsr;
 
112,7 → 112,7
UREG8 (UART_TX) = c;
WAIT_FOR_XMITR;
 
} /* _uart_putc () */
} /* __uart_putc () */
 
 
/* -------------------------------------------------------------------------- */
121,7 → 121,7
@reurn The character read. */
/* -------------------------------------------------------------------------- */
char
_uart_getc ()
__uart_getc ()
{
unsigned char lsr;
char c;
131,4 → 131,4
 
return UREG8 (UART_RX);
 
} /* _uart_getc () */
} /* __uart_getc () */
/libgloss/or32/uart.h
149,8 → 149,8
#define UART_EFR_ENI 0x10 /* Enhanced Interrupt */
 
/* The library functions defined here, avoiding namespace polution. */
extern void _uart_init ();
extern void _uart_putc (char c);
extern char _uart_getc ();
extern void __uart_init ();
extern void __uart_putc (char c);
extern char __uart_getc ();
 
#endif /* UART__H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.