icedland / iced

Blazing fast and correct x86/x64 disassembler, assembler, decoder, encoder for Rust, .NET, Java, Python, Lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CodeAsm.assemble(): "Operand 0: 64-bit addressing can only be used in 64-bit mode : 0x0" }', src/jit/mod.rs:82:54

TornaxO7 opened this issue · comments

I'm getting the following error message:

    Finished dev [unoptimized + debuginfo] target(s) in 0.07s
     Running `target/debug/rip8 --rom Maze.ch8`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: IcedError { error: "Operand 0: 64-bit addressing can only be used in 64-bit mode : 0x0" }', src/jit/mod.rs:82:54
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Tto be more clear: This comes up here.

Do you have any tips how I can find out which operand causes this error?
Basically only those files are using this crate:

Ok, I fixed them myself. I did the following

  1. Replace all rxx registers to their 16-bit representants (if you have a bitness of 16)
  2. Replace all ptr() to word_ptr or byte_ptr
  3. Replace all 64-bit registers with 8-bit or 16-bit registers

Do you have any tips how I can find out which operand causes this error? Basically only those files are using this crate:

See the error message: :)

"Operand 0: 64-bit addressing can only be used in 64-bit mode : 0x0"

64-bit regs (and rip/eip addressing) can only be used in 64-bit mode. 16-bit mode has its own limited addressing so not all register combos are possible, eg. [bx+si] works but not [ax+si] etc.