URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/trunk/rtos
- from Rev 786 to Rev 790
- ↔ Reverse comparison
Rev 786 → Rev 790
/ecos-3.0/packages/hal/openrisc/arch/current/cdl/hal_openrisc.cdl
182,7 → 182,7
flavor data |
no_define |
default_value { CYGBLD_GLOBAL_WARNFLAGS . |
"-g -fno-omit-frame-pointer -fno-rtti -fno-exceptions " . |
"-g -O2 -fno-omit-frame-pointer -fno-rtti -fno-exceptions " . |
(CYGHWR_MUL_IMPLEMENTED ? "-mhard-mul " : "-msoft-mul ") . |
(CYGHWR_DIV_IMPLEMENTED ? "-mhard-div " : "-msoft-div ") . |
(CYGHWR_FPU_IMPLEMENTED ? "-mhard-float " : "-msoft-float ") } |
197,7 → 197,7
display "Global linker flags" |
flavor data |
no_define |
default_value { "-g -nostdlib -Wl,--gc-sections -Wl,-static " . |
default_value { "-g -O2 -nostdlib -Wl,--gc-sections -Wl,-static " . |
(CYGHWR_MUL_IMPLEMENTED ? "-mhard-mul " : "-msoft-mul ") . |
(CYGHWR_DIV_IMPLEMENTED ? "-mhard-div " : "-msoft-div ") . |
(CYGHWR_FPU_IMPLEMENTED ? "-mhard-float " : "-msoft-float ") } |
/ecos-3.0/packages/hal/openrisc/arch/current/include/basetype.h
60,12 → 60,14
# define CYG_DOUBLE_BYTEORDER CYG_MSBFIRST // Big endian |
|
//----------------------------------------------------------------------------- |
// OpenRISC does not use labels with underscores. |
#define CYG_LABEL_DEFN(_name_) _name_ |
// Define label translation |
// |
// (The OpenRISC architecture uses the default 1:1 label translation, |
// so we do not need to define any here.) |
|
//----------------------------------------------------------------------------- |
// Define the standard variable sizes |
|
// |
// (The OpenRISC architecture uses the default definitions of the base types, |
// so we do not need to define any here.) |
|
/ecos-3.0/packages/hal/openrisc/arch/current/include/hal_arch.h
200,8 → 200,8
// HAL_BREAKINST_TYPE is its type. |
|
#define HAL_BREAKPOINT(_label_) \ |
asm volatile (" .globl _" #_label_ ";" \ |
"_" #_label_ ":" \ |
asm volatile (" .globl " #_label_ ";" \ |
#_label_ ":" \ |
" l.trap 1;" \ |
); |
|
/ecos-3.0/packages/hal/openrisc/arch/current/src/hal_misc.c
175,7 → 175,7
|
/*------------------------------------------------------------------------*/ |
/* Determine the index of the ls bit of the supplied mask. */ |
|
//TODO can we use l.ff1 ? |
cyg_uint32 hal_lsbit_index(cyg_uint32 mask) |
{ |
cyg_uint32 n = mask; |
197,7 → 197,7
|
/*------------------------------------------------------------------------*/ |
/* Determine the index of the ms bit of the supplied mask. */ |
|
//TODO can we use l.fl1 ? |
cyg_uint32 hal_msbit_index(cyg_uint32 mask) |
{ |
cyg_uint32 x = mask; |
/ecos-3.0/packages/hal/openrisc/arch/current/src/context.S
70,7 → 70,6
l.sw 2 * OR1K_GPRSIZE(sp), r2 |
l.sw 9 * OR1K_GPRSIZE(sp), r9 |
l.sw 10 * OR1K_GPRSIZE(sp), r10 |
l.sw 12 * OR1K_GPRSIZE(sp), r12 |
l.sw 14 * OR1K_GPRSIZE(sp), r14 |
l.sw 16 * OR1K_GPRSIZE(sp), r16 |
l.sw 18 * OR1K_GPRSIZE(sp), r18 |
81,7 → 80,6
l.sw 28 * OR1K_GPRSIZE(sp), r28 |
l.sw 30 * OR1K_GPRSIZE(sp), r30 |
|
#undef CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM |
#ifndef CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM |
|
# R0 is not typically stored because it is always zero-valued, |
89,7 → 87,7
# in the debugger. |
l.sw 0 * OR1K_GPRSIZE(sp), r0 |
|
# Caller-saved regs don't need to be preserved across |
# Caller-saved temporary regs don't need to be preserved across |
# context switches, but we do so to make debugging easier. |
|
l.sw 3 * OR1K_GPRSIZE(sp), r3 |
99,6 → 97,7
l.sw 7 * OR1K_GPRSIZE(sp), r7 |
l.sw 8 * OR1K_GPRSIZE(sp), r8 |
l.sw 11 * OR1K_GPRSIZE(sp), r11 |
l.sw 12 * OR1K_GPRSIZE(sp), r12 |
l.sw 13 * OR1K_GPRSIZE(sp), r13 |
l.sw 15 * OR1K_GPRSIZE(sp), r15 |
l.sw 17 * OR1K_GPRSIZE(sp), r17 |
110,6 → 109,8
l.sw 29 * OR1K_GPRSIZE(sp), r29 |
l.sw 31 * OR1K_GPRSIZE(sp), r31 |
|
#endif |
|
# save MAC LO and HI regs |
l.mfspr r5,r0,SPR_MACLO |
l.sw OR1KREG_MACLO(sp),r5 |
116,7 → 117,6
l.mfspr r5,r0,SPR_MACHI |
l.sw OR1KREG_MACHI(sp),r5 |
|
#endif |
|
#ifdef CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT |
# Make the thread context look like an exception context if thread- |
155,7 → 155,6
l.lwz r2, 2 * OR1K_GPRSIZE(sp) |
l.lwz r9, 9 * OR1K_GPRSIZE(sp) |
l.lwz r10, 10 * OR1K_GPRSIZE(sp) |
l.lwz r12, 12 * OR1K_GPRSIZE(sp) |
l.lwz r14, 14 * OR1K_GPRSIZE(sp) |
l.lwz r16, 16 * OR1K_GPRSIZE(sp) |
l.lwz r18, 18 * OR1K_GPRSIZE(sp) |
176,13 → 175,6
l.or r5, r5, r6 |
l.mtspr r0, r5, SPR_SR |
|
#undef CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM |
#ifndef CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM |
|
# Caller-saved regs don't need to be preserved across |
# context switches, but we do so here to make debugging |
# easier. |
|
# Restore MAC LO and HI regs |
l.lwz r5, OR1KREG_MACLO(sp) |
l.mtspr r0,r5,SPR_MACLO |
189,6 → 181,12
l.lwz r5, OR1KREG_MACHI(sp) |
l.mtspr r0,r5,SPR_MACHI |
|
#ifndef CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM |
|
# Caller-saved temporary regs don't need to be preserved across |
# context switches, but we do so here to make debugging |
# easier. |
|
l.lwz r4, 4 * OR1K_GPRSIZE(sp) |
l.lwz r5, 5 * OR1K_GPRSIZE(sp) |
l.lwz r6, 6 * OR1K_GPRSIZE(sp) |
195,6 → 193,7
l.lwz r7, 7 * OR1K_GPRSIZE(sp) |
l.lwz r8, 8 * OR1K_GPRSIZE(sp) |
l.lwz r11, 11 * OR1K_GPRSIZE(sp) |
l.lwz r12, 12 * OR1K_GPRSIZE(sp) |
l.lwz r13, 13 * OR1K_GPRSIZE(sp) |
l.lwz r15, 15 * OR1K_GPRSIZE(sp) |
l.lwz r17, 17 * OR1K_GPRSIZE(sp) |
/ecos-3.0/packages/hal/openrisc/arch/current/src/vectors.S
122,6 → 122,7
l.sw 8 * OR1K_GPRSIZE(sp), r8 |
l.sw 9 * OR1K_GPRSIZE(sp), r9 |
l.sw 11 * OR1K_GPRSIZE(sp), r11 |
l.sw 12 * OR1K_GPRSIZE(sp), r12 |
l.sw 13 * OR1K_GPRSIZE(sp), r13 |
l.sw 15 * OR1K_GPRSIZE(sp), r15 |
l.sw 17 * OR1K_GPRSIZE(sp), r17 |
133,7 → 134,6
l.sw 29 * OR1K_GPRSIZE(sp), r29 |
l.sw 31 * OR1K_GPRSIZE(sp), r31 |
|
#undef CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT |
#ifndef CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT |
|
# R0 is not typically stored because it is always zero-valued, |
145,7 → 145,6
# an ISR, but we can do so to make debugging easier. |
l.sw 2 * OR1K_GPRSIZE(sp), r2 |
l.sw 10 * OR1K_GPRSIZE(sp), r10 |
l.sw 12 * OR1K_GPRSIZE(sp), r12 |
l.sw 14 * OR1K_GPRSIZE(sp), r14 |
l.sw 16 * OR1K_GPRSIZE(sp), r16 |
l.sw 18 * OR1K_GPRSIZE(sp), r18 |
156,12 → 155,12
l.sw 28 * OR1K_GPRSIZE(sp), r28 |
l.sw 30 * OR1K_GPRSIZE(sp), r30 |
|
#endif |
# save MAC LO and HI regs |
l.mfspr r5,r0,SPR_MACLO |
l.sw OR1KREG_MACLO(sp),r5 |
l.mfspr r5,r0,SPR_MACHI |
l.sw OR1KREG_MACHI(sp),r5 |
#endif |
|
# Save SP of interruptee in reg dump |
l.addi r5,sp,SIZEOF_OR1KREGS+132 |
660,6 → 659,7
l.lwz r8, 8 * OR1K_GPRSIZE(sp) |
l.lwz r9, 9 * OR1K_GPRSIZE(sp) |
l.lwz r11, 11 * OR1K_GPRSIZE(sp) |
l.lwz r12, 12 * OR1K_GPRSIZE(sp) |
l.lwz r13, 13 * OR1K_GPRSIZE(sp) |
l.lwz r15, 15 * OR1K_GPRSIZE(sp) |
l.lwz r17, 17 * OR1K_GPRSIZE(sp) |
671,7 → 671,6
l.lwz r29, 29 * OR1K_GPRSIZE(sp) |
l.lwz r31, 31 * OR1K_GPRSIZE(sp) |
|
#undef CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT |
#ifndef CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT |
# Callee-saved regs don't need to be preserved across a call into |
# an ISR, but we can do so to make debugging easier. |
678,7 → 677,6
|
l.lwz r2, 2 * OR1K_GPRSIZE(sp) |
l.lwz r10, 10 * OR1K_GPRSIZE(sp) |
l.lwz r12, 12 * OR1K_GPRSIZE(sp) |
l.lwz r14, 14 * OR1K_GPRSIZE(sp) |
l.lwz r16, 16 * OR1K_GPRSIZE(sp) |
l.lwz r18, 18 * OR1K_GPRSIZE(sp) |
689,12 → 687,12
l.lwz r28, 28 * OR1K_GPRSIZE(sp) |
l.lwz r30, 30 * OR1K_GPRSIZE(sp) |
|
#endif |
# Restore MAC LO and HI regs |
l.lwz r4, OR1KREG_MACLO(sp) |
l.mtspr r0,r4,SPR_MACLO |
l.lwz r4, OR1KREG_MACHI(sp) |
l.mtspr r0,r4,SPR_MACHI |
#endif |
|
# Must disable interrupts, since they could clobber ESR and EPC regs |
l.mfspr r3, r0, SPR_SR |