From: Vadim Godunko <vgodunko@gmail.com>
Subject: Re: Restricted or no run time in Ada
Date: Fri, 4 Jan 2008 05:53:31 -0800 (PST)
Date: 2008-01-04T05:53:31-08:00 [thread overview]
Message-ID: <51fe0365-f0fd-4e09-9ce1-fd4b39976cab@i3g2000hsf.googlegroups.com> (raw)
In-Reply-To: 1199450765.7932.2.camel@K72
On Jan 4, 3:46 pm, Georg Bauhaus <rm.tsoh+bauh...@maps.futureapps.de>
wrote:
>
> Have you instructed GNAT to not perform any kind of
> optimization?
>
> Is this an option using Gela? (For example, to verify
> close correspondence of source and object code.)
I have following assembler code, produced by GNAT GPL 2007 and GCC
GNAT 4.3.0 with size optimization and Ada semantic (don't forget
enable overflow checking!):
$ gcc -c -gnato -O2 test.adb
$ objdump --disassemble test.o
test.o: file format elf32-i386
Disassembly of section .text:
00000000 <_ada_test>:
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 53 push %ebx
4: 83 ec 14 sub $0x14,%esp
7: 8b 45 08 mov 0x8(%ebp),%eax
a: 89 c2 mov %eax,%edx
c: 89 c1 mov %eax,%ecx
e: c1 fa 1f sar $0x1f,%edx
11: 83 c1 01 add $0x1,%ecx
14: 89 d3 mov %edx,%ebx
16: 89 c8 mov %ecx,%eax
18: 83 d3 00 adc $0x0,%ebx
1b: 05 00 00 00 80 add $0x80000000,%eax
20: 89 da mov %ebx,%edx
22: 83 d2 00 adc $0x0,%edx
25: 83 fa 00 cmp $0x0,%edx
28: 76 16 jbe 40 <_ada_test+0x40>
2a: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp)
31: 00
32: c7 04 24 00 00 00 00 movl $0x0,(%esp)
39: e8 fc ff ff ff call 3a <_ada_test+0x3a>
3e: 66 90 xchg %ax,%ax
40: 89 c8 mov %ecx,%eax
42: 83 c4 14 add $0x14,%esp
45: 5b pop %ebx
46: 5d pop %ebp
47: c3 ret
next prev parent reply other threads:[~2008-01-04 13:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-02 19:19 Restricted or no run time in Ada Lucretia
2008-01-02 20:49 ` anon
2008-01-02 21:33 ` Lucretia
2008-01-03 3:50 ` anon
2008-01-02 22:23 ` Simon Wright
2008-01-02 23:06 ` Lucretia
2008-01-03 5:14 ` roderick.chapman
2008-01-03 7:30 ` Lucretia
2008-01-03 8:00 ` Lucretia
2008-01-03 8:40 ` Lucretia
2008-01-03 9:58 ` anon
2008-01-03 10:22 ` Lucretia
2008-01-03 17:30 ` anon
2008-01-03 20:05 ` Vadim Godunko
2008-01-03 20:22 ` Lucretia
2008-01-04 9:23 ` Maxim Reznik
2008-01-04 23:23 ` Brian May
2008-01-04 12:46 ` Georg Bauhaus
2008-01-04 13:53 ` Vadim Godunko [this message]
2008-01-04 14:13 ` Maxim Reznik
2008-01-04 14:15 ` Lucretia
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox