gpt4 book ai didi

c - 使用 _asm 指向成员的指针

转载 作者:行者123 更新时间:2023-11-30 21:08:02 25 4
gpt4 key购买 nike

我一直在尝试从 c 中的一行代码转换为汇编代码,但我只是无法弄清楚使用 asm 的指向成员函数的指针的正确翻译是什么。这是代码片段:

struct file{
int size;
}FILE;

void function(FILE *result){
result -> size;
}

最佳答案

假设是 x86-64 编译器,
_功能:
; rdi = 指向结构文件的指针
; rax = 大小元素
mov eax, [rdi]

关于c - 使用 _asm 指向成员的指针,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40580276/

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