All of lore.kernel.org
 help / color / mirror / Atom feed
* Troubles with JIT compiler
@ 2010-01-22  4:12 Scott Sibley
  2010-01-22  5:26 ` Robert Plantz
  0 siblings, 1 reply; 8+ messages in thread
From: Scott Sibley @ 2010-01-22  4:12 UTC (permalink / raw)
  To: linux-assembly

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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-01-22 17:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-22  4:12 Troubles with JIT compiler Scott Sibley
2010-01-22  5:26 ` Robert Plantz
2010-01-22  6:04   ` Scott Sibley
2010-01-22  7:01     ` Robert Plantz
2010-01-22  7:16       ` Scott Sibley
2010-01-22 10:45         ` Scott Sibley
2010-01-22 16:50           ` Robert Plantz
2010-01-22 17:19           ` Brian Raiter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.