标新立异是什么意思| 立羽读什么| 什么睡姿可以矫正驼背| 白英别名叫什么| 可小刀是什么意思| 睡眠浅是什么原因| 6月11日什么星座| 黉门是什么意思| 靳东妹妹叫什么名字| 白介素是什么| 总ige高是什么意思| 食指比无名指长代表什么| 三千大千世界什么意思| 搞基是什么意思| giordano是什么牌子| 郎酒是什么香型| 什么时候种香菜| 日本豆腐是用什么做的| 西乐葆是什么药| 女人缺铁性贫血吃什么好| 养肝护肝吃什么食物| 物竞天择什么意思| 舌苔白腻吃什么中成药| lemon是什么意思| 雌雄是什么意思| 5岁属什么| 小肚子大是什么原因| 肤专家抑菌软膏主要治什么| 脂肪肝可以吃什么水果| 生灵涂炭是什么意思| 朝拜的意思是什么| 海柳什么颜色最贵的| 柠檬酸钠是什么| 什么病人要补氯化钾呢| 拔牙之后吃什么消炎药| 哀鸿遍野是什么意思| 蜈蚣为什么不能打死| 单恋是什么意思| 真心是什么意思| 12月23日是什么星座| 钯金和铂金有什么区别| gms是什么意思| 阴性什么意思| 脾胃阴虚吃什么中成药| 内心孤独的人缺少什么| 宝宝满周岁送什么礼物| 足石念什么| 女生为什么会喷水| 鸽子咳嗽吃什么药最好| 缺铁性贫血吃什么| 2024年属什么| 孕妇脚肿是什么原因引起的| 火象是什么星座| 酷暑是什么意思| 具象是什么意思| 阴阳两虚用什么药| 什么时间是排卵期| 吃酸的有什么好处| 什么是姑息治疗| 菊花有什么作用| 什么争鸣成语| 消谷善饥是什么意思| 近视手术有什么后遗症| 九门提督相当于现在什么官| 外痔用什么药可以消除| 排骨搭配什么菜好吃| 排卵期出血是什么原因| 荨麻疹可以吃什么食物| 梦到生儿子有什么预兆| 西门子洗衣机不脱水是什么原因| 半夜醒来口干舌燥是什么原因| 棉纺是什么面料| 什么情况下做肠镜| 梦见吃饭是什么预兆| 肩周炎口服什么药最好| 泸州老窖什么档次| 老年人缺钾是什么原因引起的| 天天喝啤酒对身体有什么危害| 牙周炎用什么漱口水好| 上午8点是什么时辰| 点读笔什么牌子好| 胖大海和什么搭配最好| 哺乳期可以喝什么饮料| 为什么不可以| 尿道炎症吃什么药好| 没收个人全部财产是什么意思| 日加华读什么| 两袖清风是什么生肖| 梓树为什么叫梧桐树| 1月24号什么星座| 确认是什么意思| 乳腺看什么科室| 肿瘤是什么病严重吗| 蜈蚣咬了用什么药| 小鸭子吃什么食物| 粉色裤子配什么上衣好看| 花代表什么数字| 床上为什么会有跳蚤| 防中暑喝什么水| 大豆和黄豆有什么区别| 维生素c有什么好处| 一眼万年什么意思| 古龙香水什么味道| 熤是什么意思| 红米有什么功效和作用| 尿检红细胞高是什么原因| 孝道是什么意思| 夏天床上铺什么凉快| 塔罗是什么意思| 回门带什么礼物| 房颤挂什么科| 甲状腺是什么引起的| 腿疼是什么原因| 什么闻什么睹| 岳云鹏什么学历| 宽字五行属什么| 什么是尿失禁| 心里发慌是什么病| 泥鳅喜欢吃什么| 男人做什么运动能提高性功能| 脸大剪什么发型好看| 嘉靖为什么不杀海瑞| 有什么瓜| pp材质是什么| 儿童嗓子疼吃什么药好| 美人坯子是什么意思| 喉咙疼吃什么水果好| 闺蜜生日送什么礼物好| 陶弘景有什么之称| 什么动物是站着睡觉的| 排卵试纸强阳说明什么| 61年属什么| 乘风破浪是什么生肖| 胰腺有什么作用| 指甲长出来是白色的什么原因| 什么叫小三阳| 什么时候立夏| 普瑞巴林胶囊治什么病| 蚊子是什么动物| design是什么牌子| 痢疾吃什么药| 熬夜是什么意思| 静谧是什么意思| 瘿瘤是什么病| charleskeith什么牌子| 青团是用什么做的| proof是什么意思| 五什么十什么| 属鼠五行属什么| 血糖高能吃什么食物| 什么是蜘蛛痣| 缺黄体酮会有什么症状| 白斑是什么原因引起的| 身体年龄是什么意思| 先兆性流产是什么症状| 偷窥是什么意思| 女人舌苔厚白吃什么药| 梦见狗咬别人是什么意思| 伤口撒什么药粉好得快| 喝黑枸杞有什么作用和功效| 宝宝头大是什么原因| 查抗体是做什么检查| 神经性头痛吃什么药效果好| 水化是什么意思| 香蕉吃多了有什么坏处| 瘘管是什么| 胃病挂什么科| 帆船像什么| 形而下是什么意思| 野蒜有什么功效和作用| 吐黄痰是什么原因| 邓绥和阴丽华什么关系| 卡裆是什么意思啊| 乳腺囊实性结节是什么意思| 什么的白塔| 爬虫是什么| 脱发应该挂什么科室| 胃炎伴糜烂是什么意思| 香草是什么植物| gloomy是什么意思| 淋巴发炎是什么症状| 秃鹫是什么动物| 气胸是什么原因引起的| 断生是什么意思啊| 猪古代叫什么| 肚子咕咕叫放屁多是什么原因| 今年30岁属什么生肖| 朱祁镇为什么杀于谦| vt什么意思| 指疣是什么病| 什么是pid| 梦见狗追我是什么意思| 自然堂适合什么年龄| 什么是抗性淀粉| 上海的市花是什么| 本来无一物何处惹尘埃什么意思| 什么魏什么赵| 四岁属什么生肖| 爱因斯坦发明了什么| 南瓜与什么食物相克| cm和mm有什么区别| 什么是名媛| kpi是什么意思| 什么病人要补氯化钾呢| 人五人六是什么意思| 未见明显胚芽是什么意思| 什么榴莲好吃| 六味地黄丸是治什么病| 75b是什么罩杯| 什么是提示语| 肠道感染用什么抗生素| 乙肝245阳性是什么意思| 牛反刍是什么意思| 拉不出来屎是什么原因| 张学良为什么被囚禁| 吃什么可以丰胸| 男人梦到蛇预示着什么| 为什么说金克木生财| 状元是什么官| 江郎才尽是什么意思| 上次闰六月是什么时候| 女儿茶属于什么茶| 忌出火是什么意思| 舌苔发白是什么问题| 榴莲吃多了有什么危害| 三维彩超主要检查什么| 生殖细胞瘤是什么病| 等字五行属什么| 辟谷是什么| 额窦炎吃什么药效果好| 尿细菌计数高是什么原因| 处口念什么| 有什么好的赚钱方法| 胃气上逆吃什么中成药| 半夜脚抽筋是什么原因| 一个木一个舌读什么| 梦见恐龙是什么预兆| 月亮为什么是红色的| 梦见呕吐是什么意思| 右手无名指戴戒指是什么意思| 赘疣是什么意思| 奇花异草的异是什么意思| 口干口苦口臭是什么原因| 硬着头皮是什么意思| 狗为什么怕猫| 什么是情商高| 除牛反绒是什么意思| 做梦梦到掉牙齿是什么意思| 年轻人血压高是什么原因引起的| 弱智的人有什么表现| 7月什么星座| 3月6号是什么星座| 十点半是什么时辰| 身上经常痒是什么原因| 什么是失眠| 化生细胞有是什么意思| domyos是什么牌子| 十二指肠溃疡a1期什么意思| 子宫回声欠均匀是什么意思| 豌豆荚是什么| 深圳吃什么| 刺猬为什么叫白仙| 抄经书有什么好处| 耳膜炎是什么原因引起的| 百度

童鞋抽检不合格率65% 新百伦等13个品牌上黑榜

(Redirected from Instruction pointer)
百度 浙江省高级法院一审判决以集资诈骗罪判处被告人吴英死刑,剥夺政治权利终身,并处没收其个人全部财产。

The program counter (PC),[1] commonly called the instruction pointer (IP) in Intel x86 and Itanium microprocessors, and sometimes called the instruction address register (IAR),[2][1] the instruction counter,[3] or just part of the instruction sequencer,[4] is a processor register that indicates where a computer is in its program sequence.[5][nb 1]

Front panel of an IBM 701 computer introduced in 1952. Lights in the middle display the contents of various registers. The instruction counter is at the lower left.

Usually, the PC is incremented after fetching an instruction, and holds the memory address of ("points to") the next instruction that would be executed.[6][nb 2]

Processors usually fetch instructions sequentially from memory, but control transfer instructions change the sequence by placing a new value in the PC. These include branches (sometimes called jumps), subroutine calls, and returns. A transfer that is conditional on the truth of some assertion lets the computer follow a different sequence under different conditions.

A branch provides that the next instruction is fetched from elsewhere in memory. A subroutine call not only branches but saves the preceding contents of the PC somewhere. A return retrieves the saved contents of the PC and places it back in the PC, resuming sequential execution with the instruction following the subroutine call.

Hardware implementation

edit

In a simple central processing unit (CPU), the PC is a digital counter (which is the origin of the term "program counter") that may be one of several hardware registers. The instruction cycle[8] begins with a fetch, in which the CPU places the value of the PC on the address bus to send it to the memory. The memory responds by sending the contents of that memory location on the data bus. (This is the stored-program computer model, in which a single memory space contains both executable instructions and ordinary data.[9]) Following the fetch, the CPU proceeds to execution, taking some action based on the memory contents that it obtained. At some point in this cycle, the PC will be modified so that the next instruction executed is a different one (typically, incremented so that the next instruction is the one starting at the memory address immediately following the last memory location of the current instruction).

Like other processor registers, the PC may be a bank of binary latches, each one representing one bit of the value of the PC.[10] The number of bits (the width of the PC) relates to the processor architecture. For instance, a “32-bit” CPU may use 32 bits to be able to address 232 units of memory. On some processors, the width of the program counter instead depends on the addressable memory; for example, some AVR microcontrollers have a PC which wraps around after 12 bits.[11]

If the PC is a binary counter, it may increment when a pulse is applied to its COUNT UP input, or the CPU may compute some other value and load it into the PC by a pulse to its LOAD input.[12]

To identify the current instruction, the PC may be combined with other registers that identify a segment or page. This approach permits a PC with fewer bits by assuming that most memory units of interest are within the current vicinity.

Consequences in machine architecture

edit

Use of a PC that normally increments assumes that what a computer does is execute a usually linear sequence of instructions. Such a PC is central to the von Neumann architecture. Thus programmers write a sequential control flow even for algorithms that do not have to be sequential. The resulting “von Neumann bottleneck” led to research into parallel computing,[13] including non-von Neumann or dataflow models that did not use a PC; for example, rather than specifying sequential steps, the high-level programmer might specify desired function and the low-level programmer might specify this using combinatory logic.

This research also led to ways to making conventional, PC-based, CPUs run faster, including:

  • Pipelining, in which different hardware in the CPU executes different phases of multiple instructions simultaneously.
  • The very long instruction word (VLIW) architecture, where a single instruction can achieve multiple effects.
  • Techniques to predict out-of-order execution and prepare subsequent instructions for execution outside the regular sequence.

Consequences in high-level programming

edit

Modern high-level programming languages still follow the sequential-execution model and, indeed, a common way of identifying programming errors is with a “procedure execution” in which the programmer's finger identifies the point of execution as a PC would. The high-level language is essentially the machine language of a virtual machine,[14] too complex to be built as hardware but instead emulated or interpreted by software.

However, new programming models transcend sequential-execution programming:

  • When writing a multi-threaded program, the programmer may write each thread as a sequence of instructions without specifying the timing of any instruction relative to instructions in other threads.
  • In event-driven programming, the programmer may write sequences of instructions to respond to events without specifying an overall sequence for the program.
  • In dataflow programming, the programmer may write each section of a computing pipeline without specifying the timing relative to other sections.

See also

edit

Notes

edit
  1. ^ For modern processors, the concept of "where it is in its sequence" is too simplistic, as instruction-level parallelism and out-of-order execution may occur.
  2. ^ In a processor where the incrementation precedes the fetch, the PC points to the current instruction being executed. In some processors, the PC points some distance beyond the current instruction; for instance, in the ARM7, the value of PC visible to the programmer points beyond the current instruction and beyond the delay slot.[7]

References

edit
  1. ^ a b Hayes, John P. (1978). Computer Architecture and Organization. McGraw-Hill. p.?245. ISBN?0-07-027363-4.
  2. ^ Mead, Carver; Conway, Lynn (1980). Introduction to VLSI Systems. Reading, USA: Addison-Wesley. ISBN?0-201-04358-0.
  3. ^ Principles of Operation, Type 701 and Associated Equipment (PDF). IBM. 1953.
  4. ^ Harry Katzan (1971), Computer Organization and the System/370, Van Nostrand Reinhold Company, New York, USA, LCCCN 72-153191
  5. ^ Bates, Martin (2011). "Microcontroller Operation". PIC Microcontrollers. Elsevier. pp.?27–44. doi:10.1016/b978-0-08-096911-4.10002-3. ISBN?978-0-08-096911-4. Program Counter (PC) is a register that keeps track of the program sequence, by storing the address of the instruction currently being executed. It is automatically loaded with zero when the chip is powered up or reset. As each instruction is executed, PC is incremented (increased by one) to point to the next instruction.
  6. ^ Silberschatz, Abraham; Gagne, Greg; Galvin, Peter B. (April 2018). Operating System Concepts. United States: Wiley. pp.?27, G-29. ISBN?978-1-119-32091-3.
  7. ^ "ARM Developer Suite, Assembler Guide. Version 1.2". ARM Limited. 2001. Retrieved 2025-08-14.
  8. ^ John L. Hennessy and David A. Patterson (1990), Computer Architecture: a quantitative approach, Morgan Kaufmann Publishers, Palo Alto, USA, ISBN?1-55860-069-8
  9. ^ B. Randall (1982), The Origins of Digital Computers, Springer-Verlag, Berlin, D
  10. ^ C. Gordon Bell and Allen Newell (1971), Computer Structures: Readings and Examples, McGraw-Hill Book Company, New York, USA
  11. ^ Arnold, Alfred (2020) [1996, 1989]. "E. Predefined Symbols". Macro Assembler AS – User's Manual. V1.42. Translated by Arnold, Alfred; Hilse, Stefan; Kanthak, Stephan; Sellke, Oliver; De Tomasi, Vittorio. p.?Table E.3: Predefined Symbols – Part 3. Archived from the original on 2025-08-14. Retrieved 2025-08-14. 3.2.12. WRAPMODE […] AS will assume that the processor's program counter does not have the full length of 16 bits given by the architecture, but instead a length that is exactly sufficient to address the internal ROM. For example, in case of the AT90S8515, this means 12 bits, corresponding to 4 Kwords or 8 Kbytes. This assumption allows relative branches from the ROM's beginning to the end and vice versa which would result in an out-of-branch error when using strict arithmetics. Here, they work because the carry bits resulting from the target address computation are discarded. […] In case of the abovementioned AT90S8515, this option is even necessary because it is the only way to perform a direct jump through the complete address space […]
  12. ^ Walker, B. S. (1967). Introduction to Computer Engineering. London, UK: University of London Press. ISBN?0-340-06831-0.
  13. ^ F. B. Chambers, D. A. Duce and G. P. Jones (1984), Distributed Computing, Academic Press, Orlando, USA, ISBN?0-12-167350-2
  14. ^ Douglas Hofstadter (1980), G?del, Escher, Bach: an eternal golden braid, Penguin Books, Harmondsworth, UK, ISBN?0-14-005579-7
八卦脸什么意思 什么病 左下腹疼挂什么科 小孩脱水有什么症状 自动化是干什么的
油菜花是什么季节开的 唯我独尊是什么生肖 口干嗓子干是什么原因 最大的恐龙是什么恐龙 两仪是什么意思
宽慰什么意思 煮羊肉放什么调料 刮宫是什么意思 鼻息肉长什么样 离是什么生肖
乙肝表面抗原阴性是什么意思 花裙子配什么上衣好看 为什么说冬吃萝卜夏吃姜 风热感冒吃什么药好 氪金是什么意思
白带发黄粘稠是什么原因weuuu.com 感冒吃什么食物比较好liaochangning.com 什么习习bfb118.com 嗓子哑是什么原因引起的hcv7jop9ns3r.cn 白带是什么颜色的huizhijixie.com
为什么鼻子无缘无故流鼻血hcv9jop7ns3r.cn 脸上长红色的痘痘是什么原因hcv8jop2ns1r.cn 炎黄子孙是什么生肖hcv8jop3ns0r.cn 琼瑶剧是什么意思hcv7jop5ns2r.cn 挥霍是什么意思hcv9jop5ns2r.cn
乐加是什么药hcv8jop7ns1r.cn 有何指教是什么意思hcv8jop7ns3r.cn 呕吐发烧是什么原因hcv9jop2ns3r.cn 梦见别人家办丧事是什么意思hcv8jop2ns0r.cn 佛光普照是什么生肖hcv7jop6ns1r.cn
孕期阴道炎可以用什么药hcv9jop1ns5r.cn 武汉都有什么大学hcv7jop7ns1r.cn 乙肝疫苗什么时候打hcv7jop4ns5r.cn 什么的列车hcv8jop5ns6r.cn 什么蛇没毒qingzhougame.com
百度