GCC 内联程序集错误:表达式后的垃圾"(%ebp)+4"
GCC inline assembly error: junk `(%ebp)+4' after expression
我正试图编译在MSVC中工作的内联程序集(带有-fasm块),但GCC在表达式错误后给了我垃圾`(%ebp)+4'。。。为什么它不接受语法,我应该如何解决这个问题?
uint64_t _tmp = 100;
_asm
{
//_tmp value may be changed
//...
cmp dword ptr _tmp, 100 // Ok
jnae temp
cmp dword ptr _tmp + 4, 50 // It seems GCC doesn't want to accept _tmp + 4
jnae temp
//...
temp:
};
您应该将其更改为:
cmp dword ptr [_tmp + 4], 50
相关文章:
- 内联程序集printf将整数解释为地址
- 正在解码MSVC 32位版本的程序集(作业).没有手术做什么
- 具有外部"c"和程序集的未定义函数
- 用于将C++代码转换为 Web 程序集的脚本未终止
- 为什么我的C++程序的程序集输出充满了 .ascii,没有汇编代码?
- CoreCLR 中的检测探查器 - 将帮助程序程序集加载到 dotnet 进程的方法
- 不同于按值传递和常量引用传递的程序集
- 为什么在堆栈和堆上创建变量会产生相同的程序集代码?
- C++变量在调用 x64 程序集函数后重置为 0
- 如何将C++子例程链接到 x86 程序集程序?
- Qt 网页程序集缓存
- 测试操作系统时执行程序集"sti"时虚拟框崩溃
- 为什么从 constexpr 引用生成的程序集代码与从 constexpr 指针生成的程序集代码不同?
- 将内联程序集尾调用函数尾声替换为用于x86/x64 msvc的Intrinsics
- 解析 C# 中的C++程序集
- 64 位进程中的 AnyCPU C# DLL 无法引用 64 位C++ DLL(给出错误:无法加载文件或程序集)
- 使用CLANG内联程序集创建C++预增量操作
- 是否可以在C++中基于程序集输出(.dll或.exe)定义变量
- 用于比较基元类型的std::可选的有趣程序集
- GCC 内联程序集错误:表达式后的垃圾"(%ebp)+4"