From: kvigor Date: Fri, 18 Aug 2000 20:30:49 +0000 (+0000) Subject: Fix library build error introduced in last commit X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=0c1776dd09655e4a58b71dfbc4b1982f1ea1729b;p=fw%2Fsdcc 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 --- 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 ) ; + } } }