首页> 外国专利> Detecting self-modifying code in a pipelined processor with branch processing by comparing latched store address to subsequent target address

Detecting self-modifying code in a pipelined processor with branch processing by comparing latched store address to subsequent target address

机译:通过将锁存的存储地址与后续目标地址进行比较,在具有分支处理的流水线处理器中检测自修改代码

摘要

A pipelined x86 processor implements a method of detecting self- modifying code in which a prefetched block of instruction bytes may contain an instruction that is modified by a store instruction preceding it in the execution pipeline. The processor includes a Prefetch unit having a multi-block prefetch buffer, a Branch unit with a branch target cache (BTC), and a Load/Store (LDST) unit having store reservation stations. Self-modifying code is detected in three ways: (a) the Prefetch unit snoops store addresses from the LDST unit which are compared with (i) an address tag for each of the prefetch blocks of instruction bytes already loaded into the prefetch buffer, and (ii) the addresses of any pending prefetch requests, (b) the LDST unit snoops prefetch addresses issued by the Prefetch unit and compares them to store addresses queued in the store reservation stations, and (c) to ensure compatibility with the 486 specification for self-modifying code (which requires that a store that modifies an instruction be followed immediately by a jump to that instruction), the LDST unit detects when a store is followed by a COF that hits in the BTC which output a target address that is the same as the preceding store address. In particular, Prefetch unit snooping and LDST unit snooping detect instances of self- modifying code conditions that do not follow the 486 specification.
机译:流水线x86处理器实现了一种检测自我修改代码的方法,其中,预取的指令字节块可能包含在执行管道中被其前面的存储指令修改的指令。该处理器包括具有多块预取缓冲器的预取单元,具有分支目标高速缓存(BTC)的分支单元以及具有存储预约站的加载/存储(LDST)单元。通过三种方式检测自修改代码:(a)预取单元监听来自LDST单元的地址,并将其与(i)已加载到预取缓冲器中的每个指令字节的预取块的地址标签进行比较;以及(ii)任何未决的预取请求的地址;(b)LDST单元监听由预取单元发出的预取地址,并将它们与存储预约站中排队的存储地址进行比较;以及(c)确保与486规范兼容自修改代码(要求修改指令的存储区后立即跳转到该指令),LDST单元检测何时存储区后面跟随命中BTC的COF,并输出目标地址,即目标地址。与前面的商店地址相同。特别是,预取单元监听和LDST单元监听会检测不符合486规范的自修改代码条件的实例。

著录项

  • 公开/公告号US5996071A

    专利类型

  • 公开/公告日1999-11-30

    原文格式PDF

  • 申请/专利权人 VIA-CYRIX INC.;

    申请/专利号US19950572996

  • 发明设计人 ANTONE L. FOURCROY;CHRISTOPHER E. WHITE;

    申请日1995-12-15

  • 分类号G06F9/42;

  • 国家 US

  • 入库时间 2022-08-22 01:38:52

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号