-13 Removals
+18 Additions

Assembler output of string parameters without and with const (modify content)

Created by:blikblum

1P$CONSTPARAMETERSTR_$$_BYVALUE$ANSISTRING:1.globl P$CONSTPARAMETERSTR_$$_BYREFERENCE$ANSISTRING
2P$CONSTPARAMETERSTR_$$_BYREFERENCE$ANSISTRING:
2# Temps allocated between ebp-44 and ebp-43# Temps allocated between ebp-44 and ebp-4
3# [16] begin4# [24] begin
4 pushl %ebp5 pushl %ebp
5 movl %esp,%ebp6 movl %esp,%ebp
6 leal -44(%esp),%esp7 leal -44(%esp),%esp
7# Var V located at ebp-4, size=OS_328 pushl %ebx
8 movl %eax,-4(%ebp)9# Var V located in register ebx
9 call fpc_ansistr_incr_ref10# Var S located at ebp-4, size=OS_32
11 movl %eax,%ebx
12# [27] end;
13 movl $0,-4(%ebp)
10 movl $1,%eax14 movl $1,%eax
11 leal -40(%ebp),%edx15 leal -40(%ebp),%edx
12 leal -16(%ebp),%ecx16 leal -16(%ebp),%ecx
13 call fpc_pushexceptaddr17 call fpc_pushexceptaddr
14 call fpc_setjmp18 call fpc_setjmp
15 pushl %eax19 pushl %eax
16 testl %eax,%eax20 testl %eax,%eax
17 jne .Lj721 jne .Lj11
18# [17] V := V + 'x';22# [25] S := V + 'x';
19 pushl $023 pushl $0
20 movl -4(%ebp),%edx24 movl %ebx,%edx
21 leal -4(%ebp),%eax25 leal -4(%ebp),%eax
22 movl $.Ld1,%ecx26 movl $.Ld1,%ecx
23 call fpc_ansistr_concat27 call fpc_ansistr_concat
24# [18] DoIt(V);28# [26] DoIt(S);
25 movl -4(%ebp),%eax29 movl -4(%ebp),%eax
26 call P$CONSTPARAMETERSTR_$$_DOIT$ANSISTRING30 call P$CONSTPARAMETERSTR_$$_DOIT$ANSISTRING
27.Lj7:31.Lj11:
28 call fpc_popaddrstack32 call fpc_popaddrstack
29# [19] end;
30 leal -4(%ebp),%eax33 leal -4(%ebp),%eax
31 call fpc_ansistr_decr_ref34 call fpc_ansistr_decr_ref
32 popl %eax35 popl %eax
33 testl %eax,%eax36 testl %eax,%eax
34 je .Lj837 je .Lj12
35 call fpc_reraise38 call fpc_reraise
36.Lj8:39.Lj12:
40 popl %ebx
37 movl %ebp,%esp41 movl %ebp,%esp
38 popl %ebp42 popl %ebp
39 ret43 ret
Editor
Original Text
Changed Text
Recommended videos