接续昨天的话题,继续来探讨 condition code
昨天说到了指令的运算结果会有改变 condition code
而今天就来说其中两个会影响 condition code 的 instruction
以及说明 condition code 被改变之後,又要如何使用他
以 x86-64 的架构为例
instruction | based on | description |
---|---|---|
CMP S1, S2 |
S2 - S1 | Compare |
TEST S1, S2 |
S1 & S2 | Test |
其中 CMP
又可以有 cmpb
, cmpw
, cmpl
, cmpq
, 这四种变形
分别对应 byte(8-bit), word(16-bit), double word(32-bit), quad word(64-bit) 的版本
同理,TEST
也有 testb
, testw
, testl
, testq
,这四种变形
同样分别对应 byte(8-bit), word(16-bit), double word(32-bit), quad word(64-bit) 的版本
condition code 有以下几种功能:
jump
(用这个特性可以实作出 C 语言中的 if
)而具体对应到哪些 instruction 就留到後面几天再说好了
>>: Day16-Kubernetes 那些事 - Resource Quotas
It is only our conception of time that makes us c...
前言 也许你会觉得,这个标题下得很神经。没错!因为今天要正式进入新的主题-神经机器翻译。我们今天将会...
上一篇我们的基因体时代-AI, Data和生物资讯 Day16- 视觉浏览定序档案格式SAM, BA...
第~14~天~罗~ 假如有开发过 Web 的都知道, 假如要设定按钮按下後的动作, 可在 html ...
这几天纪录下开发流程中可能会考量的项目跟使用工具纪录, 在开发完成到系统交付之後, 又是另一个阶段的...