本文介绍了MIPS中的影子寄存器是什么?如何使用它们?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我了解MIPS架构时,我遇到了影子寄存器,据说它们是通用寄存器的副本.

When I read about MIPS architecture, I came across shadow registers which are said to be copies of general purpose registers.

我不明白以下内容:什么时候使用影子寄存器?

I couldn't understand the following: When are shadow registers used?

推荐答案

MIPS影子寄存器用于减少处理中断时的寄存器加载/存储开销.分配了影子寄存器集的中断无需保存任何现有上下文即可提供空闲寄存器,也无需在进入中断处理程序时加载影子寄存器中存储的任何特定于中断的数据;在中断处理程序退出时,无需保存中断处理程序上下文或恢复先前的上下文.

MIPS shadow registers are used to reduce register load/store overhead in handling interrupts. An interrupt to which a shadow register set is assigned does not need to save any of the existing context to provide free registers or load any interrupt-specific data stored in the shadow registers at entry to the interrupt handler; at exit of the interrupt handler no saving of the interrupt handler context or restoring of the previous context is necessary.

ARM提供了与所谓的存储寄存器类似的功能. (对于ARM,仅复制了一些GPR.)

ARM provides a similar functionality with what it calls banked registers. (For ARM, only some of the GPRs are replicated.)

MIPS多线程应用程序特定扩展扩展了影子寄存器集的使用,从而成为线程上下文. (影子寄存器集实际上支持一种非常有限形式的事件多线程切换,其中多余的线程在概念上仅限于中断处理程序,而事件仅限于中断.)

The MIPS Multithreading Application Specific Extension extends the use of shadow register sets to become thread contexts. (Shadow register sets in effect support a very limited form of switch-on-event-multithreading where the extra threads are conceptually limited to interrupt handlers and the events to interrupts.)

这篇关于MIPS中的影子寄存器是什么?如何使用它们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 06:47