⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 func.asm

📁 DSP培训 作业【源码】
💻 ASM
📖 第 1 页 / 共 2 页
字号:
;******************************************************************************
;* TMS320C6x C/C++ Codegen                                    PC Version 4.32 *
;* Date/Time created: Tue May 23 16:09:53 2006                                *
;******************************************************************************

;******************************************************************************
;* GLOBAL FILE PARAMETERS                                                     *
;*                                                                            *
;*   Architecture      : TMS320C671x                                          *
;*   Optimization      : Enabled at level 3                                   *
;*   Optimizing for    : Speed                                                *
;*                       Based on options: -o3, no -ms                        *
;*   Endian            : Little                                               *
;*   Interrupt Thrshld : Disabled                                             *
;*   Memory Model      : Small                                                *
;*   Calls to RTS      : Near                                                 *
;*   Pipelining        : Enabled                                              *
;*   Speculative Load  : Disabled                                             *
;*   Memory Aliases    : Presume are aliases (pessimistic)                    *
;*   Debug Info        : COFF Debug                                           *
;*                                                                            *
;******************************************************************************

	.asg	A15, FP
	.asg	B14, DP
	.asg	B15, SP
	.global	$bss

	.global	_array1
	.bss	_array1,1024,4
	.sym	_array1,_array1, 54, 2, 8192,, 256
	.global	_array2
	.bss	_array2,1024,4
	.sym	_array2,_array2, 54, 2, 8192,, 256
	.global	_output
	.bss	_output,1024,4
	.sym	_output,_output, 54, 2, 8192,, 256
;	c:\ti\c6000\cgtools\bin\opt6x.exe -p3 -v6710 -p3 -v6710 -q -O3 C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\TI656_8 C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\TI656_9 -w D:/DM642Training/6thday/src/intrisincs/Debug 

	.sect	".text"
	.global	_func1
	.file	"D:\DM642Training\6thday\src\intrisincs\func.c"
	.sym	_func1,_func1, 32, 2, 0
	.func	4

;******************************************************************************
;* FUNCTION NAME: _func1                                                      *
;*                                                                            *
;*   Regs Modified     : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,B0,B1,B2,  *
;*                           B3,B4,B5,B6,B7,B8,B9,B10,SP                      *
;*   Regs Used         : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,B0,B1,B2,  *
;*                           B3,B4,B5,B6,B7,B8,B9,B10,SP                      *
;*   Local Frame Size  : 0 Args + 0 Auto + 20 Save = 20 byte                  *
;******************************************************************************

;******************************************************************************
;*                                                                            *
;* Using -g (debug) with optimization (-o3) may disable key optimizations!    *
;*                                                                            *
;******************************************************************************
_func1:
;** --------------------------------------------------------------------------*
	.line	2
	.sym	_output,4, 22, 17, 32
	.sym	_array1,20, 22, 17, 32
	.sym	_array2,6, 22, 17, 32
	.sym	_N,22, 4, 17, 32
	.sym	_pin2,26, 22, 4, 32
	.sym	_pin1,11, 22, 4, 32
	.sym	_pout,10, 22, 4, 32
	.sym	_output,4, 22, 4, 32
	.sym	_array1,20, 22, 4, 32
	.sym	_array2,6, 22, 4, 32
	.sym	_N,1, 4, 4, 32

           STW     .D2T2   B10,*SP--(24)     ; |5| 
||         MV      .S1X    SP,A9             ; |5| 

           STW     .D2T2   B3,*+SP(20)
           STW     .D2T1   A10,*+SP(8)
           STW     .D1T1   A12,*-A9(8)
           STW     .D1T1   A11,*-A9(12)
           MV      .S1X    B6,A1             ; |5| 
	.line	9
           MV      .D1     A4,A10            ; |12| 
	.line	10
           MV      .S1X    B4,A11            ; |13| 
	.line	11
           MV      .S2X    A6,B10            ; |14| 
	.line	13
   [!A1]   B       .S1     L2                ; |16| 
           MV      .D1     A1,A12
           NOP             4
           ; BRANCH OCCURS                   ; |16| 
;*----------------------------------------------------------------------------*
;*   SOFTWARE PIPELINE INFORMATION
;*      Disqualified loop: Loop contains a call
;*----------------------------------------------------------------------------*
L1:    
	.line	15
           CALL    .S1     __divf            ; |18| 

           LDW     .D1T1   *A11++,A4         ; |18| 
||         LDW     .D2T2   *B10++,B4         ; |18| 

           MVKL    .S2     RL0,B3            ; |18| 
           MVKH    .S2     RL0,B3            ; |18| 
           NOP             2
RL0:       ; CALL OCCURS                     ; |18| 
           STW     .D1T1   A4,*A10++         ; |18| 
	.line	19
           SUB     .D1     A12,1,A1          ; |22| 
   [ A1]   B       .S1     L1                ; |22| 
           SUB     .D1     A12,1,A12         ; |22| 
           NOP             4
           ; BRANCH OCCURS                   ; |22| 
;** --------------------------------------------------------------------------*
L2:    
	.line	22
           LDW     .D2T2   *+SP(20),B3       ; |25| 
           MV      .S1X    SP,A9             ; |25| 
           LDW     .D1T1   *+A9(16),A12      ; |25| 
           NOP             2

           RET     .S2     B3                ; |25| 
||         LDDW    .D1T1   *+A9(8),A11:A10   ; |25| 

           LDW     .D2T2   *++SP(24),B10     ; |25| 
           NOP             4
           ; BRANCH OCCURS                   ; |25| 
	.endfunc	25,004081c00h,24



	.sect	".text"
	.global	_func2
	.sym	_func2,_func2, 32, 2, 0
	.func	32

;******************************************************************************
;* FUNCTION NAME: _func2                                                      *
;*                                                                            *
;*   Regs Modified     : A0,A1,A2,A3,A4,B0,B1,B4,B5,B6,B7,B8                  *
;*   Regs Used         : A0,A1,A2,A3,A4,A6,B0,B1,B3,B4,B5,B6,B7,B8,DP,SP      *
;*   Local Frame Size  : 0 Args + 0 Auto + 0 Save = 0 byte                    *
;******************************************************************************

;******************************************************************************
;*                                                                            *
;* Using -g (debug) with optimization (-o3) may disable key optimizations!    *
;*                                                                            *
;******************************************************************************
_func2:
;** --------------------------------------------------------------------------*
	.line	2
	.sym	_output,4, 22, 17, 32
	.sym	_array1,20, 22, 17, 32
	.sym	_array2,6, 22, 17, 32
	.sym	_N,22, 4, 17, 32
	.sym	_pin2,6, 22, 4, 32
	.sym	_pin1,20, 22, 4, 32
	.sym	_pout,4, 22, 4, 32
	.sym	_output,4, 22, 4, 32
	.sym	_array1,20, 22, 4, 32
	.sym	_array2,6, 22, 4, 32
	.sym	_N,22, 4, 4, 32
	.line	15
	.line	14
	.line	16
           NOP             1
           MVC     .S2     CSR,B8

           SUB     .S1X    B6,3,A1
||         AND     .S2     -2,B8,B6

           MV      .L2X    A4,B5
||         MV      .D1     A6,A4
||         MVC     .S2     B6,CSR            ; interrupts off

;*----------------------------------------------------------------------------*
;*   SOFTWARE PIPELINE INFORMATION
;*
;*      Loop source line                 : 52
;*      Loop opening brace source line   : 53
;*      Loop closing brace source line   : 65
;*      Known Minimum Trip Count         : 64
;*      Known Max Trip Count Factor      : 4
;*      Loop Carried Dependency Bound(^) : 0
;*      Unpartitioned Resource Bound     : 2
;*      Partitioned Resource Bound(*)    : 2
;*      Resource Partition:
;*                                A-side   B-side
;*      .L units                     0        0     
;*      .S units                     2*       0     
;*      .D units                     1        2*    
;*      .M units                     0        1     
;*      .X cross paths               0        1     
;*      .T address paths             1        2*    
;*      Long read paths              0        1     
;*      Long write paths             0        0     
;*      Logical  ops (.LS)           0        0     (.L or .S unit)
;*      Addition ops (.LSD)          1        0     (.L or .S or .D unit)
;*      Bound(.L .S .LS)             1        0     
;*      Bound(.L .S .D .LS .LSD)     2*       1     
;*
;*      Searching for software pipeline schedule at ...
;*         ii = 2  Schedule found with 6 iterations in parallel
;*      Done
;*
;*      Epilog not entirely removed
;*      Collapsed epilog stages     : 2
;*
;*      Prolog not entirely removed
;*      Collapsed prolog stages     : 3
;*
;*      Minimum required memory pad : 0 bytes
;*
;*      For further improvement on this loop, try option -mh8
;*
;*      Minimum safe trip count     : 3
;*----------------------------------------------------------------------------*
L3:    ; PIPED LOOP PROLOG

           LDW     .D1T1   *A4++,A0          ; |55| (P) <0,0> 
||         B       .S1     L4                ; |65| (P) <0,6> 

           NOP             1

           LDW     .D1T1   *A4++,A0          ; |55| (P) <1,0> 
||         B       .S1     L4                ; |65| (P) <1,6> 
||         LDW     .D2T2   *B4++,B6          ; |55| (P) <0,2> 

           MVK     .S2     0x3,B1            ; init prolog collapse predicate
||         ADD     .D1     1,A1,A2
||         ADD     .L2X    2,A1,B0

;** --------------------------------------------------------------------------*
L4:    ; PIPED LOOP KERNEL

   [ A1]   B       .S1     L4                ; |65| <2,6> 
|| [ B0]   LDW     .D2T2   *B4++,B6          ; |55| <4,2> 
|| [ A2]   LDW     .D1T1   *A4++,A0          ; |55| <5,0> 

   [ B1]   SUB     .S2     B1,1,B1           ; <0,11> 
|| [ B0]   SUB     .L2     B0,1,B0           ; <0,11> 
|| [ A2]   SUB     .D1     A2,1,A2           ; <0,11> 
|| [!B1]   STW     .D2T2   B7,*B5++          ; |55| <0,11> 
||         MPYSP   .M2X    A3,B6,B7          ; |55| <2,7> 
|| [ A1]   SUB     .L1     A1,1,A1           ; |65| <3,5> 
||         RCPSP   .S1     A0,A3             ; |55| <3,5> 

;** --------------------------------------------------------------------------*
L5:    ; PIPED LOOP EPILOG
           NOP             1

           STW     .D2T2   B7,*B5++          ; |55| (E) <3,11> 
||         MPYSP   .M2X    A3,B6,B7          ; |55| (E) <5,7> 

           NOP             1
           STW     .D2T2   B7,*B5++          ; |55| (E) <4,11> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -