lib_math.txt 5.16 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\lib_math.o --asm_dir=.\Flash\List\ --list_dir=.\Flash\List\ --depend=.\flash\obj\lib_math.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\lib_math.crf ..\..\uCOS-III\uC-LIB\lib_math.c]
                          THUMB

                          AREA ||i.Math_Init||, CODE, READONLY, ALIGN=1

                  Math_Init PROC
;;;145    
;;;146    void  Math_Init (void)
000000  2001              MOVS     r0,#1
;;;147    {
;;;148        Math_RandSetSeed((RAND_NBR)RAND_SEED_INIT_VAL);             /* See Note #2.                                         */
000002  f7ffbffe          B.W      Math_RandSetSeed
;;;149    }
;;;150    
                          ENDP


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

                  Math_Rand PROC
;;;215    
;;;216    RAND_NBR  Math_Rand (void)
000000  b510              PUSH     {r4,lr}
;;;217    {
;;;218        RAND_NBR  seed;
;;;219        RAND_NBR  rand_nbr;
;;;220        CPU_SR_ALLOC();
;;;221    
;;;222    
;;;223        CPU_CRITICAL_ENTER();
000002  f7fffffe          BL       CPU_SR_Save
000006  4603              MOV      r3,r0
;;;224        seed             = Math_RandSeedCur;
000008  4a05              LDR      r2,|L2.32|
00000a  6810              LDR      r0,[r2,#0]  ; Math_RandSeedCur
;;;225        rand_nbr         = Math_RandSeed(seed);
00000c  f7fffffe          BL       Math_RandSeed
000010  4604              MOV      r4,r0
;;;226        Math_RandSeedCur = rand_nbr;
000012  6014              STR      r4,[r2,#0]  ; Math_RandSeedCur
;;;227        CPU_CRITICAL_EXIT();
000014  4618              MOV      r0,r3
000016  f7fffffe          BL       CPU_SR_Restore
;;;228    
;;;229        return (rand_nbr);
00001a  4620              MOV      r0,r4
;;;230    }
00001c  bd10              POP      {r4,pc}
;;;231    
                          ENDP

00001e  0000              DCW      0x0000
                  |L2.32|
                          DCD      ||.data||

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

                  Math_RandSeed PROC
;;;273    
;;;274    RAND_NBR  Math_RandSeed (RAND_NBR  seed)
000000  4903              LDR      r1,|L3.16|
;;;275    {
;;;276        RAND_NBR  rand_nbr;
;;;277    
;;;278    
;;;279        rand_nbr = (((RAND_NBR)RAND_LCG_PARAM_A * seed) + (RAND_NBR)RAND_LCG_PARAM_B)  %  ((RAND_NBR)RAND_LCG_PARAM_M + 1u);
000002  4348              MULS     r0,r1,r0
000004  f2430139          MOV      r1,#0x3039
000008  4408              ADD      r0,r0,r1
00000a  f0204000          BIC      r0,r0,#0x80000000
;;;280    
;;;281        return (rand_nbr);
;;;282    }
00000e  4770              BX       lr
;;;283    
                          ENDP

                  |L3.16|
                          DCD      0x41c64e6d

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

                  Math_RandSetSeed PROC
;;;174    
;;;175    void  Math_RandSetSeed (RAND_NBR  seed)
000000  b510              PUSH     {r4,lr}
;;;176    {
000002  4604              MOV      r4,r0
;;;177        CPU_SR_ALLOC();
;;;178    
;;;179    
;;;180        CPU_CRITICAL_ENTER();
000004  f7fffffe          BL       CPU_SR_Save
;;;181        Math_RandSeedCur = seed;
000008  4902              LDR      r1,|L4.20|
00000a  600c              STR      r4,[r1,#0]  ; Math_RandSeedCur
;;;182        CPU_CRITICAL_EXIT();
00000c  e8bd4010          POP      {r4,lr}
000010  f7ffbffe          B.W      CPU_SR_Restore
;;;183    }
;;;184    
                          ENDP

                  |L4.20|
                          DCD      ||.data||

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

                  Math_RandSeedCur
                          DCD      0x00000000