On Friday 23 January 2015 14:09:24 Martin Schreiber wrote:
> Hi,
> Here the first comparison of FPC and MSElang produced code:
>
Another example:
"
program while1;
var
i1,i2: int32;
begin
i1:= 0;
i2:= 0;
while i1 < 5 do begin
inc(i1);
i2:= i1+i2;
end;
exitcode:= i2;
end.
"
MSElang-llvm:
"
.file "test-opt.ll"
.text
.globl main
.align 16, 0x90
.type main,@function
main: # @main
# BB#0:
movl $15, %eax
ret
.Ltmp0:
.size main, .Ltmp0-main
.section ".note.GNU-stack","",@progbits
"
FPC fixes_2_6:
"
main:
# Temps allocated between esp+0 and esp+0
# Var i1 located in register ecx
# Var i2 located in register edx
# [test1.pas]
# [4] begin
call FPC_INITIALIZEUNITS
movl $0,%eax
movl $0,%eax
# [5] i1:= 0;
movl $0,%ecx
# [6] i2:= 0;
movl $0,%edx
# [7] while i1 < 5 do begin
jmp .Lj8
.balign 4,0x90
.Lj7:
# [8] inc(i1);
incl %ecx
# [9] i2:= i1+i2;
movl %edx,%eax
addl %ecx,%eax
movl %eax,%edx
.Lj8:
cmpl $5,%ecx
jl .Lj7
.Lj9:
# [11] exitcode:= i2;
movl %edx,operatingsystem_result
# [12] end.
call FPC_DO_EXIT
ret
.Le0:
.size main, .Le0 - main
"
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk