首页 \ 问答 \ “rep ret”是什么意思?(What does `rep ret` mean?)

“rep ret”是什么意思?(What does `rep ret` mean?)

我在Visual Studio 2008上测试了一些代码,并注意到了security_cookie 。 我可以理解它的意义,但我不明白这个指令的目的是什么。

    rep ret /* REP to avoid AMD branch prediction penalty */

当然,我可以理解评论:)但是,这个前缀exaclty与ret上下文是什么关系?如果ecx是!= 0,会发生什么? 显然, ecx的循环计数在调试时会被忽略,这是可以预料的。

我发现这里的代码在这里(由编译器注入以保证安全性):

void __declspec(naked) __fastcall __security_check_cookie(UINT_PTR cookie)
{
    /* x86 version written in asm to preserve all regs */
    __asm {
        cmp ecx, __security_cookie
        jne failure
        rep ret /* REP to avoid AMD branch prediction penalty */
failure:
        jmp __report_gsfailure
    }
}

I was testing some code on Visual Studio 2008 and noticed security_cookie. I can understand the point of it, but I don't understand what the purpose of this instruction is.

    rep ret /* REP to avoid AMD branch prediction penalty */

Of course I can understand the comment :) but what is this prefix exaclty doing in context with the ret and what happens if ecx is != 0? Apparently the loop count from ecx is ignored when I debug it, which is to be expected.

The code where I found this was here (injected by the compiler for security):

void __declspec(naked) __fastcall __security_check_cookie(UINT_PTR cookie)
{
    /* x86 version written in asm to preserve all regs */
    __asm {
        cmp ecx, __security_cookie
        jne failure
        rep ret /* REP to avoid AMD branch prediction penalty */
failure:
        jmp __report_gsfailure
    }
}

原文:https://stackoverflow.com/questions/20526361
更新时间:2022-08-14 06:08

最满意答案

不知道你说的是先科的哪个型号的何种设备,如果是纯后级,通常不设置任何调节旋钮、包括音量电位器,这在任何品牌的设备上都是差不多的;另外采用轻触按键CPU控制的音响也可以不用旋钮。

其他回答

我买了一台先科sast播放机产品型号sp-9001用了3次,因为操作不当出现问题了,按界条线路板断裂。无法修理在什么地方可以买到配件。

相关问答

更多
  • 在电子市场买同样电压的,电流只能比原配大的充电器,插口也要一样的就行
  • “Hi-Fi”是High-Fidelity的缩写,即“高保真”之意,指与原来的声音高度相似的重放声音,也指保真度高的音响设备。Hi-Fi原先是有一套严格的技术测试规范并经专家级别的人士主观评价后才能冠名的,但现在更多是商业性的标示,成为了音响设备的别称(特别是粤港地区,“嗨φ”已泛指音响设备)。与其相对的是“HI-END”,顶级音响的意思,无具体的技术标准。
  • 还可以,我自己用的就这个牌子,低音效果不错
  • aux是连接外部设备的输入接口,你可以用一根aux线,一头接手机或mp3,另一头插入到音响的aux接口,就可以用手机播放音乐而声音从音响里出来了
  • 音响使用就可能出现器件变质,声音就变小,如果问题严重,就要拿去检修。
  • 迷插卡小音响多半设计揭开前面喇叭金属网看螺丝了也先亮光下用放大镜透过网罩往里面瞅呵呵看螺丝了跟屁虫等小音响样设计我打开过
  • 您好,先科这个类型的音箱总体效果还是不错的 特别是低音 如果想要电脑使用 需要蓝牙支持的 或者是有双头3.5的音频线.希望采纳 O(∩_∩)O谢谢
  • 先开音响蓝牙 再开手机蓝牙 打开手机蓝牙 搜寻音响设备 找到了音响的蓝牙表示 点击连接 就好了 所有的蓝牙都是这么连的
  • MP3音乐压缩格式的编码算法取自于mpeg-1 audio layer 3,即它是mpeg-1音频编码算法的一部分。MP3不仅压缩率高,而且压缩后音乐的保真度也高,因此很受Internet用户的欢迎。另一方面,MP3也带来了版权保护方面的问题,为此不少公司都在研究可以有效保护版权的新的音乐压缩格式,MP4就是由global music outlet公司设计的一种格式,虽然MPEG4也常被简称为MP4,但两者之间没有任何关系。 与MP3相比,MP4的压缩率和保真度都更高,MP4文件是可执行文件,内部嵌入了播放 ...
  • 不知道你说的是先科的哪个型号的何种设备,如果是纯后级,通常不设置任何调节旋钮、包括音量电位器,这在任何品牌的设备上都是差不多的;另外采用轻触按键的CPU控制的音响也可以不用旋钮。

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。