From 68ff3fb1e2ce42b0071c2c6d4d809e74edd18ed5 Mon Sep 17 00:00:00 2001
From: nickysn <nickysn@gmail.com>
Date: Sat, 12 Apr 2014 16:26:51 +0000
Subject: [PATCH] * tcgloadnode.pass_generate_code: rm the ifdef'd i8086 code
 from the handling of   non-method procsyms by using
 def_cgsize(pd.address_type) to determine the   address size

git-svn-id: trunk@27550 -
---
 compiler/ncgld.pas | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/compiler/ncgld.pas b/compiler/ncgld.pas
index 2ae109a08e..5202225ec7 100644
--- a/compiler/ncgld.pas
+++ b/compiler/ncgld.pas
@@ -575,13 +575,9 @@ implementation
                    end
                  else
                    begin
-                      { def_cgsize does not work for procdef }
-                      location.size:=OS_ADDR;
                       pd:=tprocdef(tprocsym(symtableentry).ProcdefList[0]);
-{$ifdef i8086}
-                      if po_far in pd.procoptions then
-                        location.size:=OS_32;
-{$endif i8086}
+                      { def_cgsize does not work for tprocdef, so we use pd.address_type }
+                      location.size:=def_cgsize(pd.address_type);
                       if not(po_weakexternal in pd.procoptions) then
                         location.reference.symbol:=current_asmdata.RefAsmSymbol(procdef.mangledname)
                       else