【发布时间】:2016-01-21 18:06:47
【问题描述】:
不确定如何命名,但是 我想模拟这段代码:
asm("movl %%fs:0x30, %0" : "=r" (peb) : : );
但我想在 C 中可变地指定偏移量
尝试:
int mee = 48;
asm("movl %%fs:%1, %0"
: "=r" (peb)
: "r" (mee)
:
);
错误是bad memory operand '%eax'
【问题讨论】:
标签: c gcc mingw inline-assembly