From 0c1776dd09655e4a58b71dfbc4b1982f1ea1729b Mon Sep 17 00:00:00 2001 From: kvigor Date: Fri, 18 Aug 2000 20:30:49 +0000 Subject: [PATCH] Fix library build error introduced in last commit git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@320 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCsymt.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/SDCCsymt.c b/src/SDCCsymt.c index 02fad1ff..a60dc6b9 100644 --- a/src/SDCCsymt.c +++ b/src/SDCCsymt.c @@ -1016,11 +1016,21 @@ static void checkSClass ( symbol *sym ) /* the storage class to reflect where the var will go */ if ( sym->level && SPEC_SCLS(sym->etype) == S_FIXED) { if ( options.stackAuto || (currFunc && IS_RENT(currFunc->etype))) + { SPEC_SCLS(sym->etype) = (options.useXstack ? S_XSTACK : S_STACK ) ; + } else - SPEC_SCLS(sym->etype) = (options.model ? + { + /* hack-o-matic! I see no reason why the useXstack option should ever + * control this allcoation, but the code was originally that way, and + * changing it for non-390 ports breaks the compiler badly. + */ + extern PORT ds390_port; + bool useXdata = (port == &ds390_port) ? options.model : options.useXstack; + SPEC_SCLS(sym->etype) = (useXdata ? S_XDATA : S_DATA ) ; + } } } -- 2.47.2