教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 精品文档 > 实用模板 >

DSP汇编指令学习笔记(2)

来源:网络收集 时间:2026-01-31
导读: 令上,只会显示为T或者X路径,不会具体显示某一种T路径。 b) X路径是在跨A/B寄存器使用的,用或不用情况是一定的 c) 现在只有使用了X路径,或者LDW、STW指令会显示具体使用的路径名称。 Register File Cross Paths

令上,只会显示为T或者X路径,不会具体显示某一种T路径。

b) X路径是在跨A/B寄存器使用的,用或不用情况是一定的 c) 现在只有使用了X路径,或者LDW、STW指令会显示具体使用的路径名称。

Register File Cross Paths

1. G1 units can read/write data from/into A registers. And the G2 units can read/write data from/into B registers. So G1 units have cross path to A registers, and G2 units have cross path to B register. 2. At the same time, A registers have cross paths to opposite-B registers, such as Ax is connect to Bx. So function units of A registers can access B register.

6

Normal registers

Reserved by表示谁负责保存这个寄存器中的值,如果是Parent,则是Caller;如果是Child则是called function。

这里的Parent与child是与某此调用动作相关。如果脱离具体的某此调用,基本所有的函数都即是parent又是child。或者说,在某此函数调用时,哪些寄存器是在调用之前就要压栈保存(可能同时赋值的)——parent类的寄存器;哪些寄存器是在调用后如果使用到了才需要压栈保存的——child类寄存器。

寄存器中的值,始终是根据此次调用(即Crash时的调用)的参数状态。即Parent寄存器保

7

存的Crash function的Caller的参数;而child寄存器保存的是crash本函数的参数。所以可以查看A10、B10??查看异常函数的参数;查看A4/B4??查看上层函数的参数。

同一指令周期并行执行的指令,不能同时使用同一寄存器。

SP /B15 & FP/A15 & PC & DP

1. SP /B15:是栈顶指针(B15可以在gPdb查看)。启动时需要手动初始化。

2. FP/A15:是本函数的栈底指针。现在没有使用,FP始终等于SP。A15没有使用。 3. PC:是PFC(program fetch counter),是取指位置,是jump指令操作的寄存器(不能在

gPdb中查看,也没有具体意义,因为异常处理时PC也会变)

4. DP:初始化是.bss(为全局变量和静态变量保留(不包含const类全局变量))段的起始

地址。用于指示全局变量的基址。启动时需要手动初始化。 5.

SP & B15 (stack pointer)

B15就是SP的值,它们是同一个寄存器。表示栈顶指针。

SP指针必须是8字节对齐的。Unaligned SP Can Cause Application Crash。 B15 is the stack pointer (SP), which points to the next unused location on the stack。

FP & A15 (frame pointer)

A15就是SP寄存器。

The frame pointer is used to read arguments from the stack and to handle register spilling instructions.

A4:A5 & A3 (function return value)

A4 (或者A4:A5):是函数返回值(非结构体返回值)存放的寄存器。通常其值的来源是上一函数的返回值。

A3:如果返回的是一个结构,则返回结构的支持存放在这里。

B3 & IRP & NRP (function return address)

B3:普通函数,当前调用的返回地址。之前调用的返回值已经压入栈中了。 IRP:可掩中断调用返回地址。 NRP:不可掩中断调用返回地址。 B3:

836178A0 AaSysComMsgRelay:

8

836178A0 2246 MV.L1 A4,A1//T1 836178A2 0247 || MV.L2 B4,B0 836178A4 01BC94F6 || STW.D2T2 B3,*SP--[4]

836178A8 9014A121 [!A1] BNOP.S1 C$L37 (PC+40 = 0x836178c8),5//T2 836178AC 80040264 || [ A1] LDW.D1T1 *+A1[0],A0

836178B0 D014A120 [!A0] BNOP.S1 C$L37 (PC+40 = 0x836178c8),5//T3

836178B4 1000C813 CALLP.S2 $Tramp$L$PI$$_AaSysComMsgSend (PC+1600 = 0x83617ee0),B3//T4 //跳转到AaSysComMsgSend函数(FP? AaSysComMsgSend),并把T5的代码的地址保存在B3中 836178B8 00002276 || STW.D1T2 B0,*+A0[1]

836178BC E0200003 .fphead n, l, W, BU, nobr, nosat, 0000001 836178C0 01BC92E6 LDW.D2T2 *++SP[4],B3//下一周期T5 836178C4 6C6E NOP 4

PFC & retPC & PCE1

1. PFC is the program fetch counter

2. retPC represents the address of the first instruction of the execute packet in the DC

stage of the pipeline 3. PCE1 (program counter) represents the address of the first instruction in the fetch

packet in the E1 stage of the pipeline..

Control register file

Table 2-6. Control Registers

Acronym Register Name Section

AMR Addressing mode register Section 2.8.3 CSR Control status register Section 2.8.4

GFPGFR Galois field multiply control register Section 2.8.5 ICR Interrupt clear register Section 2.8.6 IER Interrupt enable register Section 2.8.7 IFR Interrupt flag register Section 2.8.8 …… 此处隐藏:657字,全部文档内容请下载后查看。喜欢就下载吧 ……

DSP汇编指令学习笔记(2).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wendang/521320.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)