Troubles with JIT compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm debugging a script engine. The engine compiles expressions into
asm instructions, assigns that data to a function pointer, and
executes the function, passing one argument.

I'm new to assembly, and pretty much stuck on the first issue I ran into.

Here are the function's instructions for a basic assignment operation:

0x8067990:    push   %ebp
0x8067991:    mov    %esp,%ebp
0x8067993:    sub    $0x8,%esp
0x8067999:    fnstcw (%esp)
0x806799c:    mov    (%esp),%eax
0x806799f:    or     $0xc00,%eax
0x80679a4:    mov    %eax,0x4(%esp)
0x80679a8:    fldcw  0x4(%esp)
0x80679ac:    flds   0x806793c
0x80679b2:    fsts   0x805f014
0x80679b8:    fstps  0x8067954
0x80679be:    fldcw  (%esp)
0x80679c1:    add    $0x8,%esp
0x80679c7:    emms
0x80679c9:    leave
0x80679ca:    ret

Well, it appears to be crashing at the first instruction. Here are the
values of ebp and esp.

(gdb) x/x $ebp
0xbffff168:    0xbffff188
(gdb) x/x $esp
0xbffff14c:    0x0804e481

Any clue why this would cause problems? Let me know if I need to
provide more info.
--
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies]     [Security]     [Linux C Programming]     [Linux for Hams]     [DCCP]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux