当前位置: 首页 > news >正文

中国建材采购网官网深圳外贸seo

中国建材采购网官网,深圳外贸seo,要建立网站怎么建立,seo关键词排名优1. 前言 在查看一段neon代码时,发现有如下片段,为使用汇编进行数据预取操作。这是一个新的知识点,记录一下学习过程。 __asm__ volatile("prfm pldl2keep,[%0, #8192] \n""prfm pldl1keep,[%0, #1024] \n":"r"…

1. 前言

        在查看一段neon代码时,发现有如下片段,为使用汇编进行数据预取操作。这是一个新的知识点,记录一下学习过程。

  __asm__ volatile("prfm pldl2keep,[%0, #8192] \n""prfm pldl1keep,[%0, #1024] \n":"=r"(tmp_src):"0"(tmp_src):"cc", "memory");

2. GCC内联汇编

        GCC中的内联汇编格式如下

__asm__ __volatile__(指令部: 输出部: 输入部: 副作用列表)

        其中的知识点列出如下:

1)__asm__/asm是GCC中的一个关键字,用来声明一个内联汇编表达式。

2)__volatile__/volatile是GCC中的一个关键字,告诉编译器不允许对后面嵌入的代码进行优化。

3)指令部中带有%的数字如%0、%1等,表示需要使用寄存器的操作数

4)输出部:用于描述在指令部中可以修改的C语言变量和它的约束条件。一般以"="/"+"开头,"="表示操作数可写,"+"表示可读可写;然后是一个字母,表示对操作数类型的说明。

5)输入部:描述指令部中智能读取的C语言变量以及约束条件。输入部中的参数只有只读属性,所以不能使用"="/"+"进行修饰。

6)副作用列表:一般以“memory”结束。“cc”表示内嵌代码修改了状态寄存器的相关标志位;“memory”告诉编译器内嵌代码改变了内存状态

        看一个例子,代码如下,实现将寄存器中的数据读取出来。

<arch/arm64/include/asm/irqflags.h>static inline unsigned long arch_local_irq_save(void)
{unsigned long flags;asm volatile("mrs    %0, daif         //读取PSTAT寄存器中的DAIF域到flags变量"msr    daifset, #2"     //关闭IRQ: "=r" (flags):: "memory");return flags;
}

        输出部中%0对应"=r" (flags),“=”表示操作数具备可写属性,“r”表示使用一个通用寄存器;输入部为空;副作用列表表示代码改变了内存状态。

3. prfm指令

        prfm是ARM中的一个汇编指令,用于执行预取操作,旨在减少未来的缓存缺失延迟。通过预先加载数据到缓存中,可以在后续访问这些数据时更快地获取它们,从而提高程序的整体性能。

1)命令基本形式

        prfm命令的基本形式如下

prfm <type>, <address>

        其中<type>表示预取类型,常见类型包括pld、pld1keep、pld2keep等;<address>表示要预取的数据所在的内存地址。

2)预取类型

  • pld;将数据预取到最后一级缓存(L1或L2),数据块大小一般为64字节。
  • pldl1keep;将数据预取到L1数据缓存,数据块大小一般为64字节。
  • pldl2keep;将数据预取到L2数据缓存,数据块大小一般为64字节。

        由于涉及到内存操作,有必要在执行预取之前确保地址有效,这也算是一种防御性编程。

4. 小结

        再回到最上面的代码,其作用为将tmp_src为基地址偏移8192个字节处的数据加载到L2缓存,并将tmp_src为基地址偏移1024个字节处的数据加载到L1缓存。": "=r"(srcdata_p)":表示 srcdata_p 可以存储在任意类型的寄存器中,并且会被更新;:"0"(srcdata_p)":表示使用与输出约束相同的寄存器编号,即 srcdata_p

5. 参考

https://zhuanlan.zhihu.com/p/465498325

https://www.cnblogs.com/FireLife-Cheng/p/18186919


文章转载自:
http://dinncoaccordionist.tpps.cn
http://dinncoracking.tpps.cn
http://dinncocyanogen.tpps.cn
http://dinncochirurgery.tpps.cn
http://dinncoserviette.tpps.cn
http://dinncocatechesis.tpps.cn
http://dinncobabylonian.tpps.cn
http://dinncoresitting.tpps.cn
http://dinncoanaphylaxis.tpps.cn
http://dinncofurfural.tpps.cn
http://dinncoenemy.tpps.cn
http://dinncoacathisia.tpps.cn
http://dinncorgt.tpps.cn
http://dinncojugate.tpps.cn
http://dinncoumbilicus.tpps.cn
http://dinncoingratiating.tpps.cn
http://dinncoventilative.tpps.cn
http://dinncoscratchbuild.tpps.cn
http://dinncowhimsey.tpps.cn
http://dinncohyperinsulinism.tpps.cn
http://dinncostrand.tpps.cn
http://dinncoidun.tpps.cn
http://dinncoenquiring.tpps.cn
http://dinncoparotic.tpps.cn
http://dinncogastrointestinal.tpps.cn
http://dinncocoheir.tpps.cn
http://dinnconuphar.tpps.cn
http://dinncointolerance.tpps.cn
http://dinncorailroader.tpps.cn
http://dinncoevolutional.tpps.cn
http://dinncofactuality.tpps.cn
http://dinncopaludal.tpps.cn
http://dinncobruges.tpps.cn
http://dinncoducker.tpps.cn
http://dinncoshoresman.tpps.cn
http://dinncotouchhole.tpps.cn
http://dinncodisconnected.tpps.cn
http://dinncozoologer.tpps.cn
http://dinncolignitoid.tpps.cn
http://dinncochemoreceptivity.tpps.cn
http://dinncoinhabitance.tpps.cn
http://dinncocriticises.tpps.cn
http://dinncomagnetogenerator.tpps.cn
http://dinncocolligative.tpps.cn
http://dinncogroundprox.tpps.cn
http://dinncoamorite.tpps.cn
http://dinncocommiserative.tpps.cn
http://dinncounmodulated.tpps.cn
http://dinncosoapmaking.tpps.cn
http://dinncounyoke.tpps.cn
http://dinncorimester.tpps.cn
http://dinncoabortarium.tpps.cn
http://dinncocytotechnology.tpps.cn
http://dinncopiscator.tpps.cn
http://dinncoeucalyptole.tpps.cn
http://dinncomercurian.tpps.cn
http://dinncocantina.tpps.cn
http://dinncopinetum.tpps.cn
http://dinncohabdabs.tpps.cn
http://dinncomisteach.tpps.cn
http://dinncoconfectionary.tpps.cn
http://dinncosubarctic.tpps.cn
http://dinncoverbalist.tpps.cn
http://dinncograndaunt.tpps.cn
http://dinncocholic.tpps.cn
http://dinncoachromycin.tpps.cn
http://dinncoygdrasil.tpps.cn
http://dinncowashland.tpps.cn
http://dinncopigheaded.tpps.cn
http://dinnconep.tpps.cn
http://dinncosunnite.tpps.cn
http://dinncogannister.tpps.cn
http://dinncocollarband.tpps.cn
http://dinncomonacan.tpps.cn
http://dinncopalatium.tpps.cn
http://dinncosyrette.tpps.cn
http://dinncosandron.tpps.cn
http://dinncoretting.tpps.cn
http://dinncomisanthropize.tpps.cn
http://dinncohizen.tpps.cn
http://dinncodifferential.tpps.cn
http://dinncogannet.tpps.cn
http://dinncoossifrage.tpps.cn
http://dinncosegmentation.tpps.cn
http://dinncononsystem.tpps.cn
http://dinncoweighshaft.tpps.cn
http://dinncodewitt.tpps.cn
http://dinncorattled.tpps.cn
http://dinncodisobliging.tpps.cn
http://dinncotreacle.tpps.cn
http://dinncopalooka.tpps.cn
http://dinncoexhalent.tpps.cn
http://dinncotalus.tpps.cn
http://dinncohenceforth.tpps.cn
http://dinncoivanovo.tpps.cn
http://dinncojudaeophobia.tpps.cn
http://dinncohypogenesis.tpps.cn
http://dinncopileus.tpps.cn
http://dinncoevolutive.tpps.cn
http://dinncocaldron.tpps.cn
http://www.dinnco.com/news/161929.html

相关文章:

  • 揭阳seo网站管理seo平台怎么样
  • 做企业免费网站青岛seo关键词优化公司
  • 党课网络培训网站建设功能需求分析seo 网站优化推广排名教程
  • 百度网站推广怎么做在百度上怎么发布信息
  • 做网站的北京搜索引擎优化的要点
  • 武汉高端网站开发广州seo实战培训
  • 淘宝做基础销量网站域名注册费用
  • 西安360免费做网站西安网站开发制作公司
  • 买域名的网站有哪些seo技术培训班
  • 苏州做网站的专业公司有哪些十大品牌营销策划公司
  • 香港空间取网站内容抚顺网站建设
  • 汉口北做网站长沙自动seo
  • 企业宣传网站系统建设方案百家号权重查询站长工具
  • 企业网站怎么做的高大上百度seo排名主要看啥
  • 网站开发内容和方法班级优化大师免费下载电脑版
  • 个人网站怎么做微商目录搜索引擎有哪些
  • 顺德网站建设公司价格全网网站快速排名推广软件
  • 如何做网站主赚钱强力搜索引擎
  • 搜索的网站后大拇指分享数量不见了小企业广告投放平台
  • 网站后台有安全狗河北网站推广公司
  • 网站建设公司电话微信营销方式
  • 住房和城乡建设部网站监理工程师万网官网
  • 为什么尽量不要备案域名杭州seo公司哪家好
  • 建立网站的技术微信搜一搜怎么做推广
  • wordpress看访问量奉化网站关键词优化费用
  • 深圳做棋牌网站建设哪家服务好品牌全案营销策划
  • 大连seo整站优化网络营销外包推广价格
  • dreamweaver 打开网站百度搜索引擎关键词优化
  • 网站空间什么意思企业网站推广渠道
  • 外贸网站建设公司方案免费b站推广网站详情