Comments (7)
As a note: udis86 shows repne scasw in both cases:
capstone
pair:~ pancake$ rasm2 -a x86.cs -d 66f2af
scasd eax, dword es:[edi]
pair:~ pancake$ rasm2 -a x86.cs -d f266af
repne scasw ax, word es:[edi]
udis86
pair:~ pancake$ rasm2 -a x86 -d f266af
repne scasw
pair:~ pancake$ rasm2 -a x86 -d 66f2af
repne scasw
olly disasm:
pair:~ pancake$ rasm2 -a x86.olly -d f266af
repne scas word ptr es:[edi]
pair:~ pancake$ rasm2 -a x86.olly -d 66f2af
repne scas word ptr es:[edi]
And I guess gnu would do something completely different here too :P
Who’s right?
On 18 Mar 2014, at 17:32, lintile [email protected] wrote:
I have found an issue with prefix ordering that causes the disassembler to ignore both the osz and the repe/repne prefixes:
% ./quickcs 66 f2 af
scasd eax, dword ptr es:[edi]
% ./quickcs f2 66 af
repne scasw ax, word ptr es:[edi]This is currently a problem in LLVM ToT, but the prefix handling in this base is much closer to reality. Thanks!
—
Reply to this email directly or view it on GitHub.
from capstone.
Well, I can tell you that there are at least 3 different compilers on different platforms which generate this instruction, and when executed on the processor, they are equivalent.
from capstone.
thanks for the report! we will work on these cases & get back to you soon.
usually when there are differences, we would trust IDAPro more than others.
so it is a good idea for you to try these with IDA, too.
best!
On Wed, Mar 19, 2014 at 12:40 AM, radare [email protected] wrote:
As a note: udis86 shows repne scasw in both cases:
capstone
pair:~ pancake$ rasm2 -a x86.cs -d 66f2af
scasd eax, dword es:[edi]
pair:~ pancake$ rasm2 -a x86.cs -d f266af
repne scasw ax, word es:[edi]udis86
pair:~ pancake$ rasm2 -a x86 -d f266af
repne scasw
pair:~ pancake$ rasm2 -a x86 -d 66f2af
repne scaswolly disasm:
pair:~ pancake$ rasm2 -a x86.olly -d f266af
repne scas word ptr es:[edi]
pair:~ pancake$ rasm2 -a x86.olly -d 66f2af
repne scas word ptr es:[edi]And I guess gnu would do something completely different here too :P
Who's right?
On 18 Mar 2014, at 17:32, lintile [email protected] wrote:
I have found an issue with prefix ordering that causes the disassembler
to ignore both the osz and the repe/repne prefixes:% ./quickcs 66 f2 af
scasd eax, dword ptr es:[edi]
% ./quickcs f2 66 af
repne scasw ax, word ptr es:[edi]This is currently a problem in LLVM ToT, but the prefix handling in this
base is much closer to reality. Thanks!Reply to this email directly or view it on GitHub.
Reply to this email directly or view it on GitHubhttps://github.com//issues/82#issuecomment-37955778
.
from capstone.
IDA agrees:
seg000:00000004 66 F2 AF repne scasw
seg000:00000007 F2 66 AF repne scasw
from capstone.
udis wins
On 18 Mar 2014, at 17:58, lintile [email protected] wrote:
IDA agrees:
seg000:00000004 66 F2 AF repne scasw
seg000:00000007 F2 66 AF repne scasw—
Reply to this email directly or view it on GitHub.
from capstone.
Lintile, this problem has been fixed in the "next" branch. can you confirm?
thanks.
from capstone.
this has been fixed in the "next" branch. if you still have this issue with some input, please reopen it.
thanks.
from capstone.
Related Issues (20)
- MacOS wheel only contains x86_64 version of the libcapstone.dylib despite the package claims to be universal HOT 1
- Got abnormal behavior when set CS_OPT_DETAIL_REAL without CS_OPT_ON
- Can capstone recognize fmv.w.x instruction in RISCV ? HOT 3
- HPPADisassembler.c unitialized variables
- Incorrect/Missing Python Binding for operands within the X86-64 STOS Instruction
- Ensure API is properly documented before `v6`
- Use proper versioning on CMakeLists.txt - pkgconf versions are wrong otherwise HOT 1
- [BPF] `bpf_insn` collides with `libbpf` definition. HOT 13
- Build failure on Windows with MSVC \ capstone_static.vcxproj HOT 4
- HPPADisassembler: more unitialized variables HOT 3
- cs_insn::id is always invalid value on aarch64 HOT 2
- pip install on Mac HOT 1
- skipdata doesn't work correctly from python
- Ability to Generate Bitmasks for Specific Instruction Components? HOT 3
- x64 disassembler big endian bug
- Compiler warnings in the next branch HOT 2
- python bindings depends on setuptools HOT 3
- Remove python2 leftovers
- [AArch64] Instr. with groups `HasNEON`, don't have `HasNEONorSME` and similar assigned. HOT 24
- Release v4.0.3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capstone.