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

📄 lesson3_c.asm

📁 DSP培训 作业【源码】
💻 ASM
字号:
;******************************************************************************
;* TMS320C6x C/C++ Codegen                                    PC Version 4.32 *
;* Date/Time created: Mon Nov 06 15:25:17 2006                                *
;******************************************************************************

;******************************************************************************
;* GLOBAL FILE PARAMETERS                                                     *
;*                                                                            *
;*   Architecture      : TMS320C64xx                                          *
;*   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

	.file	"lesson3_c.c"
;	c:\ti\c6000\cgtools\bin\opt6x.exe -v6400 -q -O3 C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\TI1048_2 C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\TI1048_5 -w ./Debug 

	.sect	".text"
	.global	_lesson3_c
	.sym	_lesson3_c,_lesson3_c, 32, 2, 0
	.func	26

;******************************************************************************
;* FUNCTION NAME: _lesson3_c                                                  *
;*                                                                            *
;*   Regs Modified     : A0,A1,A3,A4,A5,A6,A7,A8,A9,B4,B5,B6,B7,B8,B9,B16,B17 *
;*   Regs Used         : A0,A1,A3,A4,A5,A6,A7,A8,A9,B3,B4,B5,B6,B7,B8,B9,DP,  *
;*                           SP,B16,B17                                       *
;*   Local Frame Size  : 0 Args + 0 Auto + 0 Save = 0 byte                    *
;******************************************************************************

;******************************************************************************
;*                                                                            *
;* Using -g (debug) with optimization (-o3) may disable key optimizations!    *
;*                                                                            *
;******************************************************************************
_lesson3_c:
;** --------------------------------------------------------------------------*
	.line	3
	.sym	_xptr,4, 19, 17, 32
	.sym	_yptr,20, 19, 17, 32
	.sym	_zptr,6, 19, 17, 32
	.sym	_w_sum,22, 19, 17, 32
	.sym	_N,8, 4, 17, 32
	.sym	_w2,20, 3, 4, 16
	.sym	_w1,8, 3, 4, 16
	.sym	_xptr,4, 19, 4, 32
	.sym	_yptr,20, 19, 4, 32
	.sym	_zptr,6, 19, 4, 32
	.sym	_w_sum,22, 19, 4, 32
	.sym	_N,3, 4, 4, 32
           MV      .D1     A8,A3             ; |28| 
           NOP             1
	.line	10
           LDH     .D1T1   *A6,A8            ; |35| 
	.line	11

           SUB     .D2     B4,4,B5
||         SUB     .S1     A4,4,A7
||         SUB     .S2     B6,4,B6
||         LDH     .D1T2   *+A6(2),B4        ; |36| 

	.line	15
           MVC     .S2     CSR,B17

           SHR     .S1     A3,1,A4           ; |40| 
||         AND     .D2     -2,B17,B7

           SUB     .D1     A4,2,A0
||         MVC     .S2     B7,CSR            ; interrupts off

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

           LDH     .D1T1   *++A7(4),A9       ; |42| (P) <0,0> 
|| [ A0]   BDEC    .S1     L2,A0             ; |43| (P) <0,6> 
||         LDH     .D2T2   *++B5(4),B7       ; |42| (P) <0,0> 

           LDH     .D1T1   *+A7(2),A4        ; |42| (P) <0,1> 
||         LDH     .D2T2   *+B5(2),B7        ; |42| (P) <0,1> 

           ADD     .D2     2,B6,B6
||         MVK     .D1     0x2,A1            ; init prolog collapse predicate
||         MV      .S1X    B6,A3

;** --------------------------------------------------------------------------*
L2:    ; PIPED LOOP KERNEL

           ADD     .S2X    B9,A5,B7          ; |42| <0,9> 
|| [ A0]   BDEC    .S1     L2,A0             ; |43| <1,6> 
||         MPY     .M1     A4,A8,A5          ; |42| <1,6> 
||         MPY     .M2     B7,B4,B9          ; |42| <1,6> 
||         LDH     .D1T1   *++A7(4),A9       ; |42| <3,0> 
||         LDH     .D2T2   *++B5(4),B7       ; |42| <3,0> 

           SHR     .S1     A6,15,A6          ; |42| <0,10> 
||         SHR     .S2     B7,15,B16         ; |42| <0,10> 
||         LDH     .D1T1   *+A7(2),A4        ; |42| <3,1> 
||         LDH     .D2T2   *+B5(2),B7        ; |42| <3,1> 

   [ A1]   SUB     .S1     A1,1,A1           ; <0,11> 
|| [!A1]   STH     .D1T1   A6,*++A3(4)       ; |42| <0,11> 
|| [!A1]   STH     .D2T2   B16,*++B6(4)      ; |42| <0,11> 
||         ADD     .L1X    B8,A4,A6          ; |42| <1,8> 
||         MPY     .M1     A9,A8,A4          ; |42| <2,5> 
||         MPY     .M2     B7,B4,B8          ; |42| <2,5> 

;** --------------------------------------------------------------------------*
L3:    ; PIPED LOOP EPILOG

           ADD     .D2X    B9,A5,B7          ; |42| (E) <1,9> 
||         MPY     .M2     B7,B4,B5          ; |42| (E) <2,6> 
||         MPY     .M1     A4,A8,A5          ; |42| (E) <2,6> 

           SHR     .S2     B7,15,B9          ; |42| (E) <1,10> 
||         SHR     .S1     A6,15,A6          ; |42| (E) <1,10> 

           STH     .D2T2   B9,*++B6(4)       ; |42| (E) <1,11> 
||         ADD     .S1X    B8,A4,A6          ; |42| (E) <2,8> 
||         MPY     .M1     A9,A8,A4          ; |42| (E) <3,5> 
||         MPY     .M2     B7,B4,B8          ; |42| (E) <3,5> 
||         STH     .D1T1   A6,*++A3(4)       ; |42| (E) <1,11> 

           SHR     .S1     A6,15,A5          ; |42| (E) <2,10> 
||         ADD     .D2X    B5,A5,B4          ; |42| (E) <2,9> 
||         MPY     .M1     A4,A8,A6          ; |42| (E) <3,6> 
||         MPY     .M2     B7,B4,B4          ; |42| (E) <3,6> 

           SHR     .S2     B4,15,B5          ; |42| (E) <2,10> 

           MVC     .S2     B17,CSR           ; interrupts on
||         STH     .D2T2   B5,*++B6(4)       ; |42| (E) <2,11> 
||         STH     .D1T1   A5,*++A3(4)       ; |42| (E) <2,11> 
||         ADD     .S1X    B8,A4,A4          ; |42| (E) <3,8> 

           SHR     .S1     A4,15,A4          ; |42| (E) <3,10> 
||         ADD     .D2X    B4,A6,B4          ; |42| (E) <3,9> 

           SHR     .S2     B4,15,B4          ; |42| (E) <3,10> 

           STH     .D1T1   A4,*++A3(4)       ; |42| (E) <3,11> 
||         STH     .D2T2   B4,*++B6(4)       ; |42| (E) <3,11> 

	.line	19
           RETNOP  .S2     B3,5              ; |44| 
           ; BRANCH OCCURS                   ; |44| 
	.endfunc	44,000000000h,0



;******************************************************************************
;* TYPE INFORMATION                                                           *
;******************************************************************************

⌨️ 快捷键说明

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