当前位置:网站首页>[summary of problem thinking] Why is the register reset performed in user mode?
[summary of problem thinking] Why is the register reset performed in user mode?
2022-07-01 06:15:00 【kev_ gogo】
Ask questions
When I saw this question in Wang daoshu , I first thought that there are many registers that are opaque , Therefore, the user mode cannot be operated , Can't even operate in the tube state , Based on this idea , I did some research .
reflection
After searching, we found , In fact, if you think of assembly On the level of ( But it's really hard for me, a non - major student, not to learn , Regrets that he is not proficient in learning ) It's a lot easier . Let's take the simplest example :int i=0, This code actually sets the value in a register to 0, This is obviously a very common operation , It is also completely unnecessary to enter the tube state , Therefore, it is in the user mode ( Eye state ) Conduct .
Extended thinking
C Language details
After thinking about it, I thought that all the setting variables are in registers ? But registers are limited , So the search found that C In this language, users can define register variables by themselves, such as :register int i=0, This format , And even if not , The compiler may also store variables in registers, because obviously for some variables, it can greatly improve the efficiency of the system ( For example, frequently used variables , Variables in the loop , Based on the principle of locality , This bracket is a personal guess ).
Register details
in addition , To verify that registers can store variables , I also think of the knowledge point of programmer transparency and programmer opacity , After consulting, it is found that , General purpose registers are opaque to assemblers , This also confirms the authenticity of the previous statement of assembly layer calling registers
Reference material
【1】http://www.cskaoyan.com/thread-7075-1-10.html
【2】https://blog.csdn.net/HumanpieceY/article/details/85917291
边栏推荐
- MongoDB:一、MongoDB是什么?MongoDB的优缺点
- Timer based on LabVIEW
- 10-golang运算符
- 【ManageEngine卓豪】用统一终端管理助“欧力士集团”数字化转型
- 69 cesium code datasource loading geojson
- 【文件系统】如何在ubi之上运行squashfs
- 【KV260】利用XADC生成芯片温度曲线图
- 无限水平大理石游戏
- C# ManualResetEvent 类的理解
- Ant new village is one of the special agricultural products that make Tiantou village in Guankou Town, Xiamen become Tiantou village
猜你喜欢

Tidb single machine simulation deployment production environment cluster (closed pit practice, personal test is effective)

【KV260】利用XADC生成芯片温度曲线图

机械臂速成小指南(六):步进电机驱动器

Excel dynamic chart

OpenGL es: (3) EGL, basic steps of EGL drawing, eglsurface, anativewindow

ManageEngine卓豪助您符合ISO 20000标准(四)

Arcserver password reset (account cannot be reset)

Multi label lsml for essay learning records

MongoDB:一、MongoDB是什么?MongoDB的优缺点

ArcServer密码重置(账号不可以重置)
随机推荐
【文件系统】如何在ubi之上运行squashfs
Pychart configuring jupyter
Record currency in MySQL
OpenGL es: (3) EGL, basic steps of EGL drawing, eglsurface, anativewindow
PLA不粘贴在床上:6个简单的解决方案
Index method and random forest to realize the information of surface water body in wet season in Shandong Province
Golang panic recover custom exception handling
freeswitch拨打分机号
让厦门灌口镇田头村变甜头村的特色农产品之一是蚂蚁新村
【企业数据安全】升级备份策略 保障企业数据安全
DEV XPO对比之XAF BO
Thesis learning record essay multi label lift
srpingboot security demo
MySQL中 in 和 exists 的区别
SystemVerilog learning-10-validation quantification and coverage
PLA不粘貼在床上:6個簡單的解决方案
交换机配置软件具有的作用
Excel visualization
68 Cesium代码datasource加载czml
JMM详解