gpt4 book ai didi

条件跳转——将 C 代码与汇编代码进行比较

转载 作者:太空狗 更新时间:2023-10-29 17:21:09 24 4
gpt4 key购买 nike

我正在尝试将 c 函数代码与程序集的等效代码进行比较,并对条件跳转感到困惑

enter image description here

我查看了 jl 指令,上面写着如果 < 则跳转,但问题的答案是 >= 谁能解释为什么会这样?

最佳答案

据我理解,条件倒置了,但是逻辑是一样的; C 源定义

if the condition is satisfied, execute the following block

而汇编源定义

if the condition is violated, skip the following block

这意味着两个实现中的执行流程将相同。

关于条件跳转——将 C 代码与汇编代码进行比较,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42502981/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com