os_prio.txt 6.8 KB
; generated by Component: ARM Compiler 5.06 update 6 (build 750) Tool: ArmCC [4d3637]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o.\flash\obj\os_prio.o --asm_dir=.\Flash\List\ --list_dir=.\Flash\List\ --depend=.\flash\obj\os_prio.d --cpu=Cortex-M4.fp --apcs=interwork -O1 --diag_suppress=9931,870 -I..\..\Libraries\CMSIS\Include -I..\..\Libraries\CMSIS\Device\ST\STM32F4xx\Include -I..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc -I..\..\uCOS-III\uC-CPU -I..\..\uCOS-III\uC-LIB -I..\..\uCOS-III\uCOS-III\Ports -I..\..\uCOS-III\uCOS-III\Source -I..\..\uCOS-III\uC-CPU\ARM-Cortex-M4\RealView -I..\..\uCOS-III\uC-LIB\Ports\ARM-Cortex-M4\RealView -I..\..\uCOS-III\uCOS-III\Ports\ARM-Cortex-M4\Generic\RealView -I..\..\User -I..\..\User\bsp -I..\..\User\bsp\inc -I..\..\User\libapp -I..\..\RL-ARM\Config -I..\..\RL-ARM\Driver -I..\..\RL-ARM\RL-RTX\inc -I..\..\User\bsp\BSP -I..\..\RL-ARM\RL-CAN -I..\..\Libraries\DSP_LIB\Include -I..\..\MODBUS\modbus\rtu -I..\..\MODBUS\BARE\port -I..\..\MODBUS\modbus\include -I..\..\User\bsp\BSP -I..\..\PLC -I..\..\Avoid -I..\..\User\parameter -I..\..\User\LaserMotionCtr -I..\..\User\W5100S -I..\..\User\bsp -I..\..\User\CHASSIS -I..\..\User\CONTROLFUNCTION -I..\..\User\DATAUPDATE -I..\..\User\HARAWARE -I..\..\User\MOTORDRIVER -I..\..\User\NAVAGATION -I..\..\User\PLATFORM -I..\..\User\SENSOR -I.\RTE\_Flash -IC:\Users\YDJ\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include -IC:\Users\YDJ\AppData\Local\Arm\Packs\Keil\STM32F4xx_DFP\2.13.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include -D__UVISION_VERSION=527 -D_RTE_ -DSTM32F407xx -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -D__RTX -D__FPU_USED=1 --omf_browse=.\flash\obj\os_prio.crf ..\..\uCOS-III\uCOS-III\Source\os_prio.c]
                          THUMB

                          AREA ||i.OS_PrioGetHighest||, CODE, READONLY, ALIGN=2

                  OS_PrioGetHighest PROC
;;;84     
;;;85     OS_PRIO  OS_PrioGetHighest (void)
000000  b510              PUSH     {r4,lr}
;;;86     {
;;;87         CPU_DATA  *p_tbl;
;;;88         OS_PRIO    prio;
;;;89     
;;;90     
;;;91         prio  = (OS_PRIO)0;
000002  2400              MOVS     r4,#0
;;;92         p_tbl = &OSPrioTbl[0];
000004  4806              LDR      r0,|L1.32|
000006  e002              B        |L1.14|
                  |L1.8|
;;;93         while (*p_tbl == (CPU_DATA)0) {                         /* Search the bitmap table for the highest priority       */
;;;94             prio += DEF_INT_CPU_NBR_BITS;                       /* Compute the step of each CPU_DATA entry                */
000008  3420              ADDS     r4,r4,#0x20
00000a  b2e4              UXTB     r4,r4
;;;95             p_tbl++;
00000c  1d00              ADDS     r0,r0,#4
                  |L1.14|
00000e  6801              LDR      r1,[r0,#0]            ;93
000010  2900              CMP      r1,#0                 ;93
000012  d0f9              BEQ      |L1.8|
;;;96         }
;;;97         prio += (OS_PRIO)CPU_CntLeadZeros(*p_tbl);              /* Find the position of the first bit set at the entry    */
000014  6800              LDR      r0,[r0,#0]
000016  f7fffffe          BL       CPU_CntLeadZeros
00001a  4420              ADD      r0,r0,r4
00001c  b2c0              UXTB     r0,r0
;;;98         return (prio);
;;;99     }
00001e  bd10              POP      {r4,pc}
;;;100    
                          ENDP

                  |L1.32|
                          DCD      ||.data||

                          AREA ||i.OS_PrioInit||, CODE, READONLY, ALIGN=2

                  OS_PrioInit PROC
;;;58     
;;;59     void  OS_PrioInit (void)
000000  2000              MOVS     r0,#0
;;;60     {
;;;61         CPU_DATA  i;
;;;62     
;;;63     
;;;64                                                                 /* Clear the bitmap table ... no task is ready            */
;;;65         for (i = 0u; i < OS_PRIO_TBL_SIZE; i++) {
;;;66              OSPrioTbl[i] = (CPU_DATA)0;
000002  4a04              LDR      r2,|L2.20|
000004  2100              MOVS     r1,#0                 ;65
                  |L2.6|
000006  f8421020          STR      r1,[r2,r0,LSL #2]
00000a  1c40              ADDS     r0,r0,#1              ;65
00000c  2800              CMP      r0,#0                 ;65
00000e  d0fa              BEQ      |L2.6|
;;;67         }
;;;68     }
000010  4770              BX       lr
;;;69     
                          ENDP

000012  0000              DCW      0x0000
                  |L2.20|
                          DCD      ||.data||

                          AREA ||i.OS_PrioInsert||, CODE, READONLY, ALIGN=2

                  OS_PrioInsert PROC
;;;114    
;;;115    void  OS_PrioInsert (OS_PRIO  prio)
000000  0941              LSRS     r1,r0,#5
;;;116    {
;;;117        CPU_DATA  bit;
;;;118        CPU_DATA  bit_nbr;
;;;119        OS_PRIO   ix;
;;;120    
;;;121    
;;;122        ix             = prio / DEF_INT_CPU_NBR_BITS;
;;;123        bit_nbr        = (CPU_DATA)prio & (DEF_INT_CPU_NBR_BITS - 1u);
000002  f000021f          AND      r2,r0,#0x1f
;;;124        bit            = 1u;
000006  2001              MOVS     r0,#1
;;;125        bit          <<= (DEF_INT_CPU_NBR_BITS - 1u) - bit_nbr;
000008  f1c2021f          RSB      r2,r2,#0x1f
00000c  4090              LSLS     r0,r0,r2
;;;126        OSPrioTbl[ix] |= bit;
00000e  4b03              LDR      r3,|L3.28|
000010  f8532021          LDR      r2,[r3,r1,LSL #2]
000014  4302              ORRS     r2,r2,r0
000016  f8432021          STR      r2,[r3,r1,LSL #2]
;;;127    }
00001a  4770              BX       lr
;;;128    
                          ENDP

                  |L3.28|
                          DCD      ||.data||

                          AREA ||i.OS_PrioRemove||, CODE, READONLY, ALIGN=2

                  OS_PrioRemove PROC
;;;142    
;;;143    void  OS_PrioRemove (OS_PRIO  prio)
000000  0941              LSRS     r1,r0,#5
;;;144    {
;;;145        CPU_DATA  bit;
;;;146        CPU_DATA  bit_nbr;
;;;147        OS_PRIO   ix;
;;;148    
;;;149    
;;;150        ix             = prio / DEF_INT_CPU_NBR_BITS;
;;;151        bit_nbr        = (CPU_DATA)prio & (DEF_INT_CPU_NBR_BITS - 1u);
000002  f000021f          AND      r2,r0,#0x1f
;;;152        bit            = 1u;
000006  2001              MOVS     r0,#1
;;;153        bit          <<= (DEF_INT_CPU_NBR_BITS - 1u) - bit_nbr;
000008  f1c2021f          RSB      r2,r2,#0x1f
00000c  4090              LSLS     r0,r0,r2
;;;154        OSPrioTbl[ix] &= ~bit;
00000e  4b03              LDR      r3,|L4.28|
000010  f8532021          LDR      r2,[r3,r1,LSL #2]
000014  4382              BICS     r2,r2,r0
000016  f8432021          STR      r2,[r3,r1,LSL #2]
;;;155    }
00001a  4770              BX       lr
                          ENDP

                  |L4.28|
                          DCD      ||.data||

                          AREA ||.data||, DATA, ALIGN=2

                  OSPrioTbl
                          DCD      0x00000000