From f49f148e01da51248c814c5e00b61332e4a5b67e Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 28 Feb 2009 20:37:01 +0000 Subject: [PATCH] + commented why wrappers for cdecl'd methods use subl/call/subl/ret instead of subl/jmp git-svn-id: trunk@12829 - --- compiler/i386/cgcpu.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/i386/cgcpu.pas b/compiler/i386/cgcpu.pas index d2bd151e3e..af675b789e 100644 --- a/compiler/i386/cgcpu.pas +++ b/compiler/i386/cgcpu.pas @@ -534,6 +534,11 @@ unit cgcpu; set self parameter to correct value call mangledname set self parameter to interface value + ret + + This is different to case (0) because in theory, the caller + could reuse the data pushed on the stack so we've to return + it unmodified because self is const. (2): The wrapper code use %eax to reach the virtual method address set self to correct value