We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I tried to disassemble a compressed store instruction, but it turned out that capstone detected wrong operands:
>>> import capstone as cs >>> md = cs.Cs(cs.CS_ARCH_RISCV, cs.CS_MODE_RISCVC) >>> md.detail = True >>> ins = md.disasm(b"\x98\xc3", 0).__next__() >>> ins <CsInsn 0x0 [98c3]: c.sw a4, 0(a5)> >>> ins.operands[0].type 1 >>> ins.operands[1].type 2 >>> ins.operands[2].type 1 >>> cs.CS_OP_MEM 128 >>> cs.CS_OP_REG 1 >>> cs.CS_OP_IMM 2
This instruction expected to have two operands: OP_reg and OP_mem. Here is non-compressed analog for store:
>>> md = cs.Cs(cs.CS_ARCH_RISCV, cs.CS_MODE_RISCV64) >>> md.detail = True >>> ins = md.disasm(b"\x23\xa0\xe7\x00", 0).__next__() >>> ins <CsInsn 0x0 [23a0e700]: sw a4, 0(a5)> >>> ins.operands [<capstone.riscv.RISCVOp object at 0x7fe2e8de65c0>, <capstone.riscv.RISCVOp object at 0x7fe2e8de6bc0>] >>> ins.operands[0].type 1 >>> ins.operands[1].type 3
git clone
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I tried to disassemble a compressed store instruction, but it turned out that capstone detected wrong operands:
This instruction expected to have two operands: OP_reg and OP_mem. Here is non-compressed analog for store:
Work environment
git clone
, pipThe text was updated successfully, but these errors were encountered: