English 中文(简体)
查明 as中的地址计算方法
原标题:Identifying address calculation insns in asm

我看着X86 as,I wanna试图读到它,并在我的配方法和OPTIMIZE中找到一个ug子。 但是,在计算指示时,总价有许多间接费用。 我似乎无法找到一种办法,确定那些正在从事其他任务的人正在计算地址的方法。 例如,在计算一个短片时可以使用的中值地址时,也可使用一个附加物,或者在我的代码中定期进行附加操作。

这样做是容易的,就像他们使用固定登记册进行处理计算一样? 或者我是否必须从一开始就追踪该守则?

<>strong>EDIT: 看来没有明确的方法确定这些内容。 但是,假设只有搬走、添加、子和皮革才能处理计算指示? 或者x86有什么更为复杂的问题?

页: 1

最佳回答

No, not really. Most registers are general purpose, and used for all kinds of calculations. Some compilers are even smart enough to use address calculating instructions like LEA to compute other things.

你可能必须找到一个变量被装入登记册的地方,然后从登记册上看。

问题回答

你们可以从一开始就追踪该守则。 例如,有读或书写记忆登记册的指示(例如:mov eax, [ebx],使用Microsoft syntax)。 如你看到这种指示,你可以确定哪些登记作为地址(例如ebx),然后回到代码中,看如何计算登记册。

了解“jump”指示——如果你的法典有相当的有条件执行,那么“重新加入法典”可能很难,而仅仅“从一开始就停止守则”可能比较容易。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签