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/libgloss/or32
- from Rev 243 to Rev 399
- ↔ Reverse comparison
Rev 243 → Rev 399
/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]) |
/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 */ |
/write-uart.c
47,7 → 47,7
static void |
outbyte (char c) |
{ |
_uart_putc (c); |
__uart_putc (c); |
|
} /* outbyte () */ |
|
/uart-dummy.c
40,6 → 40,6
It does nothing! |
/* -------------------------------------------------------------------------- */ |
void |
_uart_init () |
__uart_init () |
{ |
} /* _uart_init () */ |
} /* __uart_init () */ |
/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 () */ |
/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 */ |