Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-03

Compiler allocates 40 bytes on the stack

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Carsten Bager

I have written a procedure TestVar

Procedure TestVar;
Begin
End;

If I look at the assembler code, it looks like the compiler allocates 40 bytes on the stack. Is there anybody who knows the reason for this?

Regards Carsten

Free Pascal Compiler version 2.0.2 [2006/02/28] for arm Copyright (c) 1993-2005 by Florian Klaempfl
Target OS: Linux for ARM

# [205] begin
.globl P$LED_TESTVAR
.type P$LED_TESTVAR,#function
P$LED_TESTVAR:
# Temps allocated between r11-40 and r11-40
mov r12,r13
stmfd r13!,{r11,r12,r14,r15}
sub r11,r12,#4
sub r13,r13,#40
.Ll121:
# [207] end;
ldmea r11,{r11,r13,r15}