dotgnu-libjit
[Top][All Lists]
Advanced

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

Re: Re: [Dotgnu-libji =?ISO-8859-1?Q?t] 64bit integers ope?= rations on


From: jan
Subject: Re: Re: [Dotgnu-libji =?ISO-8859-1?Q?t] 64bit integers ope?= rations on x86
Date: Thu, 12 Feb 2009 17:33:45 +0100 (CET)

Thanks for your swift response ;)
It may not be easy to reproduce the bug. For example it does not occur
if I don't include iostream.h in the example program. I have now added
jit_dump_function before and after jit_function_compile:

   ...
   jit_insn_default_return( function );
   printf( "Before:\n" );
   jit_dump_function(stdout, function, 0);
   jit_function_compile( function );
   printf( "After:\n" );
   jit_dump_function(stdout, function, 0);
   jit_context_build_end( context );
   ...

Here's the output:

Before:
function 0x0804B120(i1 : ptr) : void
        incoming_frame_posn(i1, 8)
        i4 = i1 + 0
        l6 = load_relative_long(i4, 0)
        l7 = load_relative_long(i4, 0)
        store_relative_long(i4, l7, 0)
        store_relative_long(i4, l6, 0)
        return
        ends_in_dead
end

After:
function 0x0804B120(ptr) : void

/tmp/libjit-dump.o:     file format elf32-i386

Disassembly of section .text:

b7f69018 <.text>:
b7f69018:       55                      push   %ebp
b7f69019:       8b ec                   mov    %esp,%ebp
b7f6901b:       83 ec 0c                sub    $0xc,%esp
b7f6901e:       53                      push   %ebx
b7f6901f:       56                      push   %esi
b7f69020:       8b 45 08                mov    0x8(%ebp),%eax
b7f69023:       05 00 00 00 00          add    $0x0,%eax
b7f69028:       8b 08                   mov    (%eax),%ecx
b7f6902a:       8b 58 04                mov    0x4(%eax),%ebx
b7f6902d:       89 45 fc                mov    %eax,-0x4(%ebp)
b7f69030:       8b f0                   mov    %eax,%esi
b7f69032:       8b 06                   mov    (%esi),%eax
b7f69034:       8b 56 04                mov    0x4(%esi),%edx
b7f69037:       89 00                   mov    %eax,(%eax)
b7f69039:       89 40 04                mov    %eax,0x4(%eax)
b7f6903c:       89 08                   mov    %ecx,(%eax)
b7f6903e:       89 58 04                mov    %ebx,0x4(%eax)
b7f69041:       89 45 f4                mov    %eax,-0xc(%ebp)
b7f69044:       89 55 f8                mov    %edx,-0x8(%ebp)
b7f69047:       5e                      pop    %esi
b7f69048:       5b                      pop    %ebx
b7f69049:       8b e5                   mov    %ebp,%esp
b7f6904b:       5d                      pop    %ebp
b7f6904c:       c3                      ret

end

Segmentation fault

> Try insert jit_dump_function(stdout, function, 0); before
> jit_function_compile and after. This should print intermediate form
> and assembly code. Please send to this maillist the dump/pastbin in
> case it crashes.
>
>
> Thanks,
> Kirill
>


/-----------------------( Jan Wedekind )------------------------\
|address   : .... Flat 7, 228-232 Langsett Rd, Sheffield S6 2UE |
|office    : ..... City Campus, Howard Street, Sheffield S1 1WB |
|o.-phone  : ............................... +44 (0)114 2253277 |
|email/www : ......... address@hidden / http://www.wedesoft.de |
|gnupg     : ECC3 3E3D AD98 4F0D 3B5B  B251 9B91 F1E7 96F1 E973 |
\---------------------------------------------------------------/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]