thrControl.asm
上传用户:dahaojd
上传日期:2008-01-29
资源大小:14357k
文件大小:16k
源码类别:

DSP编程

开发平台:

C/C++

  1. ;******************************************************************************
  2. ;* TMS320C6x C/C++ Codegen                                    PC Version 4.36 *
  3. ;* Date/Time created: Wed Mar 22 15:36:22 2006                                *
  4. ;******************************************************************************
  5. ;******************************************************************************
  6. ;* GLOBAL FILE PARAMETERS                                                     *
  7. ;*                                                                            *
  8. ;*   Architecture      : TMS320C64xx                                          *
  9. ;*   Optimization      : Enabled at level 3                                   *
  10. ;*   Optimizing for    : Speed                                                *
  11. ;*                       Based on options: -o3, no -ms                        *
  12. ;*   Endian            : Little                                               *
  13. ;*   Interrupt Thrshld : Disabled                                             *
  14. ;*   Memory Model      : Large                                                *
  15. ;*   Calls to RTS      : Far                                                  *
  16. ;*   Pipelining        : Enabled                                              *
  17. ;*   Speculative Load  : Enabled                                              *
  18. ;*   Memory Aliases    : Presume not aliases (optimistic)                     *
  19. ;*   Debug Info        : No Debug Info                                        *
  20. ;*                                                                            *
  21. ;******************************************************************************
  22. .asg A15, FP
  23. .asg B14, DP
  24. .asg B15, SP
  25. .global $bss
  26. .global _externalControl
  27. _externalControl: .usect ".far",8,128
  28. .global _externalControlPrev
  29. _externalControlPrev: .usect ".far",8,4
  30. ; c:tic6000cgtoolsbinopt6x.exe -t -DI0 -v6400 -q -O3 C:DOCUME~1ZHAOQI~1LOCALS~1TempTI3616_2 C:DOCUME~1ZHAOQI~1LOCALS~1TempTI3616_5 -w C:/ICETEK-DM642-C V2.22/jpeg_motion/obj/ 
  31. .sect ".text"
  32. .global _thrControlStartup
  33. ;******************************************************************************
  34. ;* FUNCTION NAME: _thrControlStartup                                          *
  35. ;*                                                                            *
  36. ;*   Regs Modified     : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,B0,B1,B2,B3,B4,B5, *
  37. ;*                           B6,B7,B8,B9,B10,B11,B13,SP,A16,A17,A18,A19,A20,  *
  38. ;*                           A21,A22,A23,A24,A25,A26,A27,A28,A29,A30,A31,B16, *
  39. ;*                           B17,B18,B19,B20,B21,B22,B23,B24,B25,B26,B27,B28, *
  40. ;*                           B29,B30,B31                                      *
  41. ;*   Regs Used         : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,B0,B1,B2,B3,B4,B5, *
  42. ;*                           B6,B7,B8,B9,B10,B11,B13,SP,A16,A17,A18,A19,A20,  *
  43. ;*                           A21,A22,A23,A24,A25,A26,A27,A28,A29,A30,A31,B16, *
  44. ;*                           B17,B18,B19,B20,B21,B22,B23,B24,B25,B26,B27,B28, *
  45. ;*                           B29,B30,B31                                      *
  46. ;*   Local Frame Size  : 0 Args + 16 Auto + 16 Save = 32 byte                 *
  47. ;******************************************************************************
  48. _thrControlStartup:
  49. ;** --------------------------------------------------------------------------*
  50.            MVKL    .S1     _externalControl,A10 ; |89| 
  51. ||         MVKL    .S2     _MBX_post,B5      ; |92| 
  52. ||         STW     .D2T1   A10,*SP--(32)     ; |79| 
  53.            MVKH    .S1     _externalControl,A10 ; |89| 
  54. ||         MVKH    .S2     _MBX_post,B5      ; |92| 
  55.            CALL    .S2     B5                ; |92| 
  56. ||         LDW     .D1T1   *A10,A3           ; |89| 
  57.            STDW    .D2T2   B11:B10,*+SP(24)  ; |79| 
  58.            STW     .D2T2   B13,*+SP(20)      ; |79| 
  59. ||         MVKL    .S2     _mbxProcess,B11   ; |92| 
  60. ||         ZERO    .L2     B10               ; |87| 
  61.            STW     .D2T2   B10,*+SP(4)       ; |87| 
  62. ||         MVKH    .S2     _mbxProcess,B11   ; |92| 
  63.            STW     .D2T2   B10,*+SP(8)       ; |88| 
  64. ||         ADD     .S2     4,SP,B4           ; |92| 
  65.            ADDKPC  .S2     RL0,B3,0          ; |92| 
  66. ||         STW     .D2T1   A3,*+SP(12)       ; |89| 
  67. ||         MV      .D1X    B11,A4            ; |92| 
  68. ||         MV      .L2     B3,B13            ; |79| 
  69. ||         ZERO    .S1     A6                ; |92| 
  70. RL0:       ; CALL OCCURS                     ; |92| 
  71.            MVKL    .S1     _MBX_post,A3      ; |101| 
  72.            MVKH    .S1     _MBX_post,A3      ; |101| 
  73.            LDW     .D1T1   *+A10(4),A5       ; |98| 
  74.            CALL    .S2X    A3                ; |101| 
  75.            MVK     .D2     1,B4              ; |95| 
  76.            STW     .D2T2   B4,*+SP(4)        ; |95| 
  77.            STW     .D2T2   B10,*+SP(8)       ; |96| 
  78.            STW     .D2T2   B10,*+SP(12)      ; |97| 
  79.            ADDKPC  .S2     RL1,B3,0          ; |101| 
  80. ||         ADD     .L2     4,SP,B4           ; |101| 
  81. ||         STW     .D2T1   A5,*+SP(16)       ; |98| 
  82. ||         MV      .D1X    B11,A4            ; |92| 
  83. ||         ZERO    .S1     A6                ; |101| 
  84. RL1:       ; CALL OCCURS                     ; |101| 
  85.            MV      .S2     B13,B3            ; |103| 
  86. ||         LDDW    .D2T2   *+SP(24),B11:B10  ; |103| 
  87.            RET     .S2     B3                ; |103| 
  88. ||         LDW     .D2T2   *+SP(20),B13      ; |103| 
  89.            LDW     .D2T1   *++SP(32),A10     ; |103| 
  90.            NOP             4
  91.            ; BRANCH OCCURS                   ; |103| 
  92. .sect ".text"
  93. .global _thrControlSet
  94. ;******************************************************************************
  95. ;* FUNCTION NAME: _thrControlSet                                              *
  96. ;*                                                                            *
  97. ;*   Regs Modified     : A3,B0,B4                                             *
  98. ;*   Regs Used         : A3,A4,B0,B3,B4                                       *
  99. ;*   Local Frame Size  : 0 Args + 0 Auto + 0 Save = 0 byte                    *
  100. ;******************************************************************************
  101. _thrControlSet:
  102. ;** --------------------------------------------------------------------------*
  103.            RETNOP  .S2     B3,1              ; |71| 
  104.            MVKL    .S1     _externalControl,A3 ; |69| 
  105.            MVKH    .S1     _externalControl,A3 ; |69| 
  106. ||         SUB     .D2     B4,10,B4          ; |60| 
  107. ||         CMPGT   .L2     B4,10,B0          ; |60| 
  108.            STW     .D1T1   A4,*A3            ; |69| 
  109. || [!B0]   MVK     .D2     0x1,B4            ; |66| 
  110.            STW     .D1T2   B4,*+A3(4)        ; |70| 
  111.            ; BRANCH OCCURS                   ; |71| 
  112. .sect ".text"
  113. .global _thrControlRun
  114. ;******************************************************************************
  115. ;* FUNCTION NAME: _thrControlRun                                              *
  116. ;*                                                                            *
  117. ;*   Regs Modified     : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,B0,B1,B2,B3,B4,*
  118. ;*                           B5,B6,B7,B8,B9,B10,SP,A16,A17,A18,A19,A20,A21,   *
  119. ;*                           A22,A23,A24,A25,A26,A27,A28,A29,A30,A31,B16,B17, *
  120. ;*                           B18,B19,B20,B21,B22,B23,B24,B25,B26,B27,B28,B29, *
  121. ;*                           B30,B31                                          *
  122. ;*   Regs Used         : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,B0,B1,B2,B3,B4,*
  123. ;*                           B5,B6,B7,B8,B9,B10,B13,SP,A16,A17,A18,A19,A20,   *
  124. ;*                           A21,A22,A23,A24,A25,A26,A27,A28,A29,A30,A31,B16, *
  125. ;*                           B17,B18,B19,B20,B21,B22,B23,B24,B25,B26,B27,B28, *
  126. ;*                           B29,B30,B31                                      *
  127. ;*   Local Frame Size  : 0 Args + 16 Auto + 16 Save = 32 byte                 *
  128. ;******************************************************************************
  129. _thrControlRun:
  130. ;** --------------------------------------------------------------------------*
  131.            MVKL    .S2     _externalControl,B4 ; |116| 
  132. ||         MVKL    .S1     _externalControlPrev,A3 ; |116| 
  133.            MVKH    .S2     _externalControl,B4 ; |116| 
  134. ||         MVKH    .S1     _externalControlPrev,A3 ; |116| 
  135.            LDW     .D2T2   *B4,B4            ; |116| 
  136. ||         LDW     .D1T1   *A3,A3            ; |116| 
  137.            NOP             3
  138.            STW     .D2T2   B10,*SP--(32)     ; |111| 
  139.            CMPEQ   .L1X    B4,A3,A0          ; |116| 
  140.    [ A0]   B       .S1     L2                ; |116| 
  141.            MVKL    .S2     _mbxProcess,B5
  142.            MVKH    .S2     _mbxProcess,B5
  143.            STDW    .D2T1   A11:A10,*+SP(24)  ; |111| 
  144.    [ A0]   MVKL    .S2     _mbxProcess,B4
  145. ||         STW     .D2T2   B13,*+SP(20)      ; |111| 
  146. ||         MV      .D1X    B5,A11
  147.    [ A0]   MVKH    .S2     _mbxProcess,B4
  148.            ; BRANCH OCCURS                   ; |116| 
  149. ;** --------------------------------------------------------------------------*
  150.            MVKL    .S1     _MBX_post,A3      ; |136| 
  151.            MVKH    .S1     _MBX_post,A3      ; |136| 
  152.            NOP             1
  153. ;** --------------------------------------------------------------------------*
  154. L1:    
  155.            CALL    .S2X    A3                ; |136| 
  156.            STW     .D2T2   B4,*+SP(12)       ; |135| 
  157.            ZERO    .S2     B5                ; |133| 
  158.            STW     .D2T2   B5,*+SP(4)        ; |133| 
  159. ||         MVKL    .S2     _externalControlPrev,B6 ; |129| 
  160.            STW     .D2T2   B5,*+SP(8)        ; |134| 
  161. ||         MVKH    .S2     _externalControlPrev,B6 ; |129| 
  162.            ADDKPC  .S2     RL2,B3,0          ; |136| 
  163. ||         ADD     .L2     4,SP,B4           ; |136| 
  164. ||         STW     .D2T2   B4,*B6            ; |129| 
  165. ||         MV      .D1     A11,A4            ; |136| 
  166. ||         ZERO    .S1     A6                ; |136| 
  167. RL2:       ; CALL OCCURS                     ; |136| 
  168.            MVKL    .S2     _mbxProcess,B4
  169.            MVKH    .S2     _mbxProcess,B4
  170. ;** --------------------------------------------------------------------------*
  171. L2:    
  172.            MVKL    .S1     _TSK_timerSem,A10
  173.            MV      .D1X    B4,A11
  174. ||         MVKH    .S1     _TSK_timerSem,A10
  175. ||         MVK     .S2     0x1f4,B10
  176.            MVKL    .S1     _externalControlPrev+4,A3 ; |140| 
  177.            MVKH    .S1     _externalControlPrev+4,A3 ; |140| 
  178. ||         MVKL    .S2     _externalControl+4,B4 ; |140| 
  179.            MVKH    .S2     _externalControl+4,B4 ; |140| 
  180.            LDW     .D2T2   *B4,B4            ; |140| 
  181. ||         MV      .S2X    A3,B6             ; |140| 
  182.            LDW     .D2T2   *B6,B5            ; |140| 
  183. ;*----------------------------------------------------------------------------*
  184. ;*   SOFTWARE PIPELINE INFORMATION
  185. ;*      Disqualified loop: Loop contains control code
  186. ;*----------------------------------------------------------------------------*
  187. L3:    
  188.            NOP             4
  189.            CMPEQ   .L2     B4,B5,B0          ; |140| 
  190.    [ B0]   BNOP    .S1     L4,2              ; |140| 
  191.    [ B0]   MVKL    .S2     _SEM_pend,B5      ; |157| 
  192. || [!B0]   MVKL    .S1     _MBX_post,A3      ; |152| 
  193.    [ B0]   MVKH    .S2     _SEM_pend,B5      ; |157| 
  194. || [!B0]   MVKH    .S1     _MBX_post,A3      ; |152| 
  195.            NOP             1
  196.            ; BRANCH OCCURS                   ; |140| 
  197. ;** --------------------------------------------------------------------------*
  198.            CALL    .S2X    A3                ; |152| 
  199.            STW     .D2T2   B4,*+SP(16)       ; |151| 
  200.            STW     .D2T2   B4,*B6            ; |144| 
  201. ||         MVK     .S2     1,B5              ; |148| 
  202.            ZERO    .S2     B5                ; |149| 
  203. ||         STW     .D2T2   B5,*+SP(4)        ; |148| 
  204.            STW     .D2T2   B5,*+SP(12)       ; |150| 
  205.            ADDKPC  .S2     RL3,B3,0          ; |152| 
  206. ||         STW     .D2T2   B5,*+SP(8)        ; |149| 
  207. ||         ADD     .L2     4,SP,B4           ; |152| 
  208. ||         MV      .D1     A11,A4            ; |152| 
  209. ||         ZERO    .S1     A6                ; |152| 
  210. RL3:       ; CALL OCCURS                     ; |152| 
  211.            MVKL    .S2     _SEM_pend,B5      ; |157| 
  212.            MVKH    .S2     _SEM_pend,B5      ; |157| 
  213. ;** --------------------------------------------------------------------------*
  214. L4:    
  215.            CALL    .S2     B5                ; |157| 
  216.            ADDKPC  .S2     RL4,B3,2          ; |157| 
  217.            MV      .D2     B10,B4            ; |157| 
  218.            MV      .D1     A10,A4            ; |157| 
  219. RL4:       ; CALL OCCURS                     ; |157| 
  220.            MVKL    .S1     _externalControlPrev,A3 ; |158| 
  221. ||         MVKL    .S2     _externalControl,B4 ; |158| 
  222.            MVKH    .S1     _externalControlPrev,A3 ; |158| 
  223. ||         MVKH    .S2     _externalControl,B4 ; |158| 
  224.            LDW     .D1T1   *A3,A3            ; |158| 
  225. ||         LDW     .D2T2   *B4,B4            ; |158| 
  226.            NOP             4
  227.            CMPEQ   .L1X    B4,A3,A0          ; |158| 
  228.    [!A0]   BNOP    .S1     L1,2              ; |158| 
  229.    [!A0]   MVKL    .S1     _MBX_post,A3      ; |136| 
  230.    [!A0]   MVKH    .S1     _MBX_post,A3      ; |136| 
  231.            NOP             1
  232.            ; BRANCH OCCURS                   ; |158| 
  233. ;** --------------------------------------------------------------------------*
  234.            B       .S1     L3                ; |158| 
  235.            MVKL    .S1     _externalControlPrev+4,A3 ; |140| 
  236.            MVKH    .S1     _externalControlPrev+4,A3 ; |140| 
  237. ||         MVKL    .S2     _externalControl+4,B4 ; |140| 
  238.            MVKH    .S2     _externalControl+4,B4 ; |140| 
  239.            LDW     .D2T2   *B4,B4            ; |140| 
  240. ||         MV      .S2X    A3,B6             ; |140| 
  241.            LDW     .D2T2   *B6,B5            ; |140| 
  242.            ; BRANCH OCCURS                   ; |158| 
  243. .sect ".text"
  244. .global _thrControlInit
  245. ;******************************************************************************
  246. ;* FUNCTION NAME: _thrControlInit                                             *
  247. ;*                                                                            *
  248. ;*   Regs Modified     : A3,A4,A5,B4,B5                                       *
  249. ;*   Regs Used         : A3,A4,A5,B3,B4,B5                                    *
  250. ;*   Local Frame Size  : 0 Args + 0 Auto + 0 Save = 0 byte                    *
  251. ;******************************************************************************
  252. _thrControlInit:
  253. ;** --------------------------------------------------------------------------*
  254.            MVKL    .S2     _externalControl,B4 ; |50| 
  255.            MVKH    .S2     _externalControl,B4 ; |50| 
  256. ||         MVK     .S1     85,A4             ; |54| 
  257.            STW     .D2T1   A4,*+B4(4)        ; |54| 
  258. ||         MVKL    .S1     _externalControl,A3 ; |55| 
  259. ||         MVK     .S2     1,B5              ; |50| 
  260.            STW     .D2T2   B5,*B4            ; |50| 
  261. ||         MVKH    .S1     _externalControl,A3 ; |55| 
  262.            RETNOP  .S2     B3,2              ; |56| 
  263. ||         LDNDW   .D1T1   *A3,A5:A4         ; |55| 
  264.            MVKL    .S2     _externalControlPrev,B4 ; |55| 
  265.            MVKH    .S2     _externalControlPrev,B4 ; |55| 
  266.            STNDW   .D2T1   A5:A4,*B4         ; |55| 
  267.            ; BRANCH OCCURS                   ; |56| 
  268. ;******************************************************************************
  269. ;* UNDEFINED EXTERNAL REFERENCES                                              *
  270. ;******************************************************************************
  271. .global _SEM_pend
  272. .global _MBX_post
  273. .global _TSK_timerSem
  274. .global _mbxProcess