我一直在努力学习为 AMD64 处理器编写汇编代码。我一直在看 gcc 生成的代码。最终,我开始看到诸如
call *(%rax)
Run Code Online (Sandbox Code Playgroud)
操作数前面的 * 是做什么的?我正在阅读的 System V ABI 文档中出现了类似的内容,上述问题的答案将帮助我继续。以下是上下文中使用的语法示例,取自 System V ABI 文档本身:
// System V ABI suggested implementation of a
// C switch statement with case labels 0, 1, and 2,
// and a default label.
// Jump to the default case if the control variable is
// less than 0.
cmpl $0, %eax
jl .Ldefault
// Jump to the default case if the control variable is
// greater than 2.
cmp $2, %eax …Run Code Online (Sandbox Code Playgroud)