amx_assembly icon indicating copy to clipboard operation
amx_assembly copied to clipboard

JIT plugin issue

Open oscar-broman opened this issue 10 years ago • 2 comments

This cause the JIT plugin to crash, even if the code is not run: https://github.com/Zeex/amx_assembly/blob/4d1955069c34ca297c376b770d7dbd4ecdf38e92/opcode.inc#L589

I solved it by changing it into this:

case OP_SWITCH: {
    new x = 0;
    switch (x) { case 0: return ReadOpcodeNearThis(-36); }
}

However, it only works when compiling with O1 so obviously it's not a good solution.

oscar-broman avatar Sep 12 '15 06:09 oscar-broman

Does this even work with the JIT? I got crashes too, but they seemed random and the function returned garbage for the opcodes I tried. I'll see if that could be fixed.

Zeex avatar Sep 18 '15 17:09 Zeex

After the patch I did, it works. I think many things don't work in amx_assembly with the JIT, but I only modify the AMX in OnJITCompile, which works just fine.

oscar-broman avatar Sep 18 '15 18:09 oscar-broman