怀孕乳头会有什么变化| 下面出血是什么原因| 天丝是什么| 2022年是什么生肖| 徽音是什么意思| spank是什么意思| 印度讲什么语言| 皮肤瘙痒用什么药最好| 痛风可以吃什么肉类和蔬菜| 抽烟是什么感觉| 点痣后需要注意什么事项| 前列腺炎吃什么食物好| 身体出汗多是什么原因| 长命百岁的动物是什么| 霸王餐是什么意思| 农历六月初三是什么星座| 八哥鸟吃什么| 薄荷绿是什么颜色| 恢复是什么意思| 什么是拿铁| 什么叫石女| 牙疼吃什么药效果最好| 红房子是什么| tc是什么| 寒风吹起细雨迷离是什么歌| 乌冬是什么| 拍立得相纸为什么这么贵| 什么级别| 山什么路| 高血压属于什么科| 摩羯座女和什么座最配| 阴道内痒是什么原因| 什么原因造成低血糖| 蜘蛛的天敌是什么动物| 屁股上长痘痘是什么情况| 1.28什么星座| 海澜之家是什么档次| 喝茶喝多了有什么坏处| 吃亏是什么意思| 戒色有什么好处| 西门子洗衣机不脱水是什么原因| 止血芳酸又叫什么名| 鸡蛋补充什么营养| 长目飞耳是什么动物| 男性囊肿是什么引起的| 甲功是什么| 胃发炎吃什么药好得快| 做脑部检查挂什么科| 胎方位roa是什么意思| 嘴唇上火起泡用什么药| 眼睛发炎用什么药效果好| 数农是什么| 什么叫反式脂肪| 吃什么有奶| 0a是什么意思| 决明子有什么作用| 股票解禁是什么意思| 毕业送老师什么礼物好| 淋巴结吃什么药| 5月5日是什么星座| 莲花代表什么生肖| 六月五日是什么日子| 激素六项都是查什么| 古代人用什么刷牙| 陈酿是什么意思| 什么发型适合自己| 轻断食是什么意思| 乳房钙化灶是什么意思| 查激素挂什么科| 放屁多吃什么药好| 塔罗牌正位和逆位是什么意思| 喝铁观音茶有什么好处| 嘴唇发麻是什么病兆| twin什么意思| 烈日灼心什么意思| 风湿病是什么原因造成的| 忏悔是什么意思| 牙龈肿胀吃什么药| superstar是什么意思| 打玻尿酸有什么危害| 11月27号什么星座| 什么是形声字| 怀孕为什么会恶心想吐| 在什么| 总流口水是什么原因| 噗噗是什么意思| 什么症状需要做膀胱镜| 无花果什么品种最好吃| 事业编制是什么意思| 男生喉结不明显是为什么| 青梅是什么水果| 什么叫屌丝| 嗓子发炎是什么原因引起的| 什么容易误诊为水痘| 胎儿双肾盂分离是什么意思| 蟋蟀吃什么东西| 强迫症是什么| 包皮与包茎有什么区别| 尿肌酐低是什么原因| 肠道长息肉是什么原因造成的| 白炽灯属于什么光源| 大公鸡是什么牌子| 生化全套主要检查什么| 火烈鸟吃什么| 什么然而止| 生殖激素常规检查是查什么的| 荨麻疹长什么样图片| 2004年属什么生肖| 副师级是什么军衔| 犯太岁是什么意思啊| 手指起水泡是什么原因| 慢性胆囊炎吃什么药| 新生儿便秘怎么办什么方法最有效| 可不是什么意思| 大力念什么| 黑色素痣挂什么科| 狗仔队是什么意思| 担心是什么意思| 农历7月是什么月| 肠炎能吃什么| 汗多尿少是什么原因| 大象吃什么食物| 处女膜破了有什么影响| 破壁机是干什么用的| 刮痧有什么好处| 喝荷叶茶有什么好处和坏处| 木指什么生肖| 为什么刚小便完又有尿意| 家有小女是什么生肖| 狗不能吃什么水果| 通便吃什么药最快| 秋天的落叶像什么| 九月二十五是什么星座| 百香果什么时候种| 落红的血是什么样子的| 乌鸡煲汤放什么材料| 纵隔肿瘤是什么病| 补办手机卡需要什么| 什么的天山| 什么的雨| das是什么意思| 做梦梦见离婚是什么意思| 溜号是什么意思| 鬼针草长什么样| 0点是什么时辰| 窝沟封闭什么意思| 梦之蓝是什么香型| 血稠吃什么药| 彩铅是什么| 流动人口是什么意思| ppada是什么牌子| 笔名是什么意思| 八仙过海是什么生肖| 付之一炬什么意思| 全职太太是什么意思| 姓傅的男孩取什么名字| 榴莲吃了有什么好处| 三五行属什么| 苯海拉明是什么药| 20度穿什么衣服合适| 全身发黄是什么原因| 鱼油什么人不能吃| 猫代表什么象征意义| 硬度不够吃什么药调理| 后背痛是什么病的先兆| 窦性早搏是什么意思| 翼龙吃什么| 南瓜和什么不能一起吃| 山楂有什么功效和作用| 口吐白沫是什么原因| 木马是什么意思| 直肠炎是什么原因引起的| 主是什么结构的字体| 4月28日是什么日子| 送行是什么意思| 双相情感障碍吃什么药| 婴儿半夜哭闹是什么原因| 鹿鞭是什么| 脑委缩有什么症状| 为什么会得脑血栓| 什么水果可以泡酒| 举牌是什么意思| 穿裙子搭配什么鞋子| 伏藏是什么意思| 来例假肚子疼吃什么药| 费玉清为什么不结婚| 牛大力是什么| a型血与o型血生的孩子是什么血型| 11.4什么星座| 什么水果含糖量低| 户名是什么| 右边锁骨疼是什么原因| 浑身乏力吃什么药| mi是什么单位| 备孕喝苏打水什么作用| 鱼不能和什么一起吃| 肺结核有什么症状| 片仔癀是什么东西| 吃什么可以提高代谢| 拟物是什么意思| 女性外阴瘙痒用什么药| 8月1日什么星座| 奇可以加什么偏旁| 阴道炎应该吃什么药| 让球是什么意思| 梦见参加葬礼是什么意思| 八月20号是什么星座| 孩子不好好吃饭是什么原因| 胰岛素是什么器官分泌的| 锁骨上的痣代表什么| 梦见带小孩是什么意思| 碳是什么| 鸽子吃什么| 环状肉芽肿是什么皮肤病| 做梦坐飞机是什么意思| 什么是胃炎| 8月5日是什么星座| 喝什么茶养肝护肝最好| 栀子对妇科有什么功效| 咽喉发炎吃什么药| 高胰岛素血症是什么病| 枭神夺食会发生什么| 喉咙有痰吐出来有血是什么原因| 葡萄糖属于什么糖| 什么样的水花| 淫羊藿是什么| 神仙是什么意思| 1962年属什么生肖| 孕妇做梦梦到蛇是什么意思| 慈禧姓什么| 光影什么| 毕业答辩是什么| 中人是什么意思| 大枕大池有什么危害| 用什么药可以缩阴紧致| 什么是通勤| 众生是什么意思| 为什么会脑供血不足| 缱绻旖旎是什么意思| k2是什么| 右眼皮跳什么原因| 中指长痣代表什么| 长生不老是什么意思| 男人容易出汗是什么原因造成的| 马夫是什么意思| 什么方什么计| 九月初四是什么星座| 什么是肉刺图片大全| spank是什么意思| 做美甲有什么危害| 热得直什么| 早上起来眼皮肿是什么原因| 副团级是什么军衔| 什么是包皮过长图片| 万圣节应该送什么礼物| 晚上睡觉手发麻是什么原因| 吃什么去肝火见效快| 1969年什么时候退休| 梦见煮饭是什么意思| 28年是什么婚| 体检挂什么科| 没有精液是什么原因| 什么的钩住| 麟是什么意思| 百度

揭秘乔丹父亲遇害案 此事件导致飞人巅 

(Redirected from Stack pointer)
百度 贷款方面,按央行基准利率首付30%三年期计算,首付万元左右(包含车款、上牌、保险、购置税和担保金等),月供2200元左右。

A stack register is a computer central processor register whose purpose is to keep track of a call stack. On an accumulator-based architecture machine, this may be a dedicated register. On a machine with multiple general-purpose registers, it may be a register that is reserved by convention, such as on the IBM System/360 through z/Architecture architecture and RISC architectures, or it may be a register that procedure call and return instructions are hardwired to use, such as on the PDP-11, VAX, and Intel x86 architectures. Some designs such as the Data General Eclipse had no dedicated register, but used a reserved hardware memory address for this function.

Machines before the late 1960s—such as the PDP-8 and HP 2100—did not have compilers which supported recursion. Their subroutine instructions typically would save the current location in the jump address, and then set the program counter to the next address.[1] While this is simpler than maintaining a stack, since there is only one return location per subroutine code section, there cannot be recursion without considerable effort on the part of the programmer.

A stack machine may have 2 or more stack registers — one of them keeps track of a call stack, the other(s) keep track of other stack(s).

Stack registers in x86

edit

In the 16-bit version of the x86 architecture, the main stack register is the 16-bit Stack Pointer (SP), with the 32-bit IA-32 version extending SP to the 32-bit Extended Stack Pointer (ESP), and the 64-bit x86-64 version extending ESP to the 64-bit Register Stack Pointer (RSP). The stack segment register (SS) is usually used to store information about the memory segment that stores the call stack of currently executed program. SP points to current stack top. By default, the stack grows downward in memory, so newer values are placed at lower memory addresses. To save a value to the stack, the PUSH instruction is used. To retrieve a value from the stack, the POP instruction is used.

Example: Assuming that SS = 1000h and SP = 0xF820. This means that current stack top is the physical address 0x1F820 (this is due to memory segmentation in 8086). The next two machine instructions of the program are:

PUSH AX
PUSH BX
  • These first instruction shall push the value stored in AX (16-bit register) to the stack. This is done by subtracting a value of 2 (2 bytes) from SP.
  • The new value of SP becomes 0xF81E. The CPU then copies the value of AX to the memory word whose physical address is 0x1F81E.
  • When "PUSH BX" is executed, SP is set to 0xF81C and BX is copied to 0x1F81C.[2]

This illustrates how PUSH works. Usually, the running program pushes registers to the stack to make use of the registers for other purposes, like to call a routine that may change the current values of registers. To restore the values stored at the stack, the program shall contain machine instructions like this:

POP BX
POP AX
  • POP BX copies the word at 0x1F81C (which is the old value of BX) to BX, then increases SP by 2. SP now is 0xF81E.
  • POP AX copies the word at 0x1F81E to AX, then sets SP to 0xF820.[nb 1][nb 2]

Stack engine

edit

Simpler processors store the stack pointer in a regular hardware register and use the arithmetic logic unit (ALU) to manipulate its value. Typically push and pop are translated into multiple micro-ops, to separately add/subtract the stack pointer, and perform the load/store in memory.[3]

Newer processors contain a dedicated stack engine to optimize stack operations. Pentium M was the first x86 processor to introduce a stack engine. In its implementation, the stack pointer is split among two registers: ESPO, which is a 32-bit register, and ESPd, an 8-bit delta value that is updated directly by stack operations. PUSH, POP, CALL and RET opcodes operate directly with the ESPd register. If ESPd is near overflow or the ESP register is referenced from other instructions (when ESPd ≠ 0), a synchronisation micro-op is inserted that updates the ESPO using the ALU and resets ESPd to 0. This design has remained largely unmodified in later Intel processors, although ESPO has been expanded to 64 bits.[4]

A stack engine similar to Intel's was also adopted in the AMD K8 microarchitecture. In Bulldozer, the need for synchronization micro-ops was removed, but the internal design of the stack engine is not known.[4]

Notes

edit
  1. ^ The program above pops BX first because it was pushed last.
  2. ^ In 8086, PUSH & POP instructions can only work with 16-bit elements.

References

edit
  1. ^ Salomon, David (February 1993) [1992]. Written at California State University, Northridge, California, USA. Chivers, Ian D. (ed.). Assemblers and Loaders (PDF). Ellis Horwood Series In Computers And Their Applications (1 ed.). Chicester, West Sussex, UK: Ellis Horwood Limited / Simon & Schuster International Group. ISBN 0-13-052564-2. Archived (PDF) from the original on 2025-08-06. Retrieved 2025-08-06. Most computers save the return address in either the stack, in one of the registers, or in the first word of the procedure (in which case the first executable instruction of the procedure should be stored in the second word). If the latter method is used, a return from the procedure is a jump to the memory location whose address is contained in the first word of the procedure. (xiv+294+4 pages)
  2. ^ Howard, Brian. "Assembly Tutorial - Instructions". Computer Science Department, DePauw University. Retrieved 2025-08-06.
  3. ^ Stokes, Jon "Hannibal" (2025-08-06). "A Look at Centrino's Core: The Pentium M". archive.arstechnica.com. p. 5.
  4. ^ a b Fog, Agner. "The microarchitecture of Intel, AMD and VIA CPUs" (PDF). Technical University of Denmark.
一什么花 九月十五日是什么星座 高血压高血糖挂什么科 过路车是什么意思 男士适合戴什么手串
梦见放鞭炮是什么意思 21金维他什么时候吃效果最好 喉结下面是什么部位 什么都不需要 走路腰疼是什么原因
肩周炎吃什么药好得快 背动态心电图要注意什么 乙酰氨基葡萄糖苷酶阳性什么意思 吃什么能缓解孕吐 梦到前女友是什么意思
清明吃什么 胸口闷挂什么科 什么是劣药 男士私处瘙痒用什么药 血清胰岛素测定查什么
花儿乐队为什么解散hcv9jop1ns7r.cn 心电图t波改变什么意思520myf.com 6个月宝宝可以吃什么水果qingzhougame.com 荡气回肠是什么意思hcv8jop3ns7r.cn 早上七八点是什么时辰hcv8jop0ns9r.cn
7月8号是什么星座hcv9jop3ns7r.cn 孕妇耻骨疼是什么原因aiwuzhiyu.com 肠炎是什么症状hcv9jop0ns6r.cn 忧虑是什么意思hcv7jop7ns2r.cn 血去掉一撇念什么zsyouku.com
胆固醇高对身体有什么危害hcv8jop0ns0r.cn 梦见新房子是什么意思hcv8jop8ns2r.cn 肩膀疼是什么原因引起的hcv8jop9ns8r.cn da是什么单位hcv7jop6ns5r.cn 什么时候闰十月hcv8jop0ns5r.cn
触感是什么意思hcv8jop2ns3r.cn 流产后吃什么药hcv9jop0ns1r.cn 南京市长是什么级别hcv8jop5ns6r.cn birkin是什么意思hcv9jop0ns8r.cn 胆结石挂什么科hcv8jop6ns0r.cn
百度