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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Source/] [portable/] [GCC/] [OpenRISC/] [portasm.S] - Diff between revs 624 and 664

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 624 Rev 664
Line 1... Line 1...
#include "port_spr_defs.h"
#include "port_spr_defs.h"
 
 
        .file           "portasm.S"
        .file           "portasm.S"
        .section        .text
        .section        .text
 
 
.text
 
.global vPortDisableInterrupts
 
.type   vPortDisableInterrupts, %function
 
vPortDisableInterrupts:
 
        l.mfspr r3, r0, SPR_SR          # get current SR
 
        l.addi  r4, r0, SPR_SR_TEE
 
        l.xori  r4, r4, 0xffffffff
 
        l.and   r3, r3, r4                      # disable Tick Timer Interrupt
 
        l.addi  r4, r0, SPR_SR_IEE
 
        l.xori  r4, r4, 0xffffffff
 
        l.and   r3, r3, r4                      # disable External Interrupt
 
        l.mtspr r0, r3, SPR_SR          # update SR
 
        l.jr    r9
 
        l.nop
 
.size   vPortDisableInterrupts, .-vPortDisableInterrupts
 
 
 
 
 
.text
 
.global vPortEnableInterrupts
 
.type   vPortEnableInterrupts, %function
 
vPortEnableInterrupts:
 
        l.mfspr r3, r0, SPR_SR          # get current SR
 
        l.ori   r3, r3, SPR_SR_TEE      # enable Tick Timer Interrup
 
        l.ori   r3, r3, SPR_SR_IEE      # enable External Interrupt
 
        l.mtspr r0, r3, SPR_SR          # update SR
 
        l.jr    r9
 
        l.nop
 
.size   vPortEnableInterrupts, .-vPortEnableInterrupts
 
 
 
 
 
.macro portSAVE_REGISTER
.macro portSAVE_REGISTER
        l.addi  r1, r1, -116
        l.addi  r1, r1, -116
        l.sw    0x00(r1), r3
        l.sw    0x00(r1), r3
        l.sw    0x04(r1), r4
        l.sw    0x04(r1), r4
        l.sw    0x08(r1), r5
        l.sw    0x08(r1), r5
Line 230... Line 200...
 
 
.text
.text
.global vPortSystemCall
.global vPortSystemCall
.type   vPortSystemCall, %function
.type   vPortSystemCall, %function
vPortSystemCall:
vPortSystemCall:
        l.sfeqi r11, 0xFCC
 
        l.bf    1f
 
        l.nop
 
 
 
        l.sw    -120(r1), r11
 
        l.lwz   r11, -4(r1)
 
        portSAVE_REGISTER
 
 
 
        l.jal   syscall_except
 
        l.lwz   r3, -4(r1)
 
 
 
        portRESTORE_REGISTER
 
        l.rfe
 
        l.nop
 
 
 
1:
 
        l.sw    -132(r1), r11
 
        l.lwz   r11, -4(r1)
 
        portSAVE_CONTEXT
        portSAVE_CONTEXT
 
 
        l.jal   syscall_except
        l.jal   vTaskSwitchContext
        l.lwz   r3, -4(r1)
        l.nop
 
 
        portRESTORE_CONTEXT
        portRESTORE_CONTEXT
.size   vPortSystemCall, .-vPortSystemCall
.size   vPortSystemCall, .-vPortSystemCall
 
 
 
 

powered by: WebSVN 2.1.0

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