More work on .sizeof

git-svn-id: svn://svn.cc65.org/cc65/trunk@2702 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-12-02 22:09:45 +00:00
parent 3a7c054f6b
commit 1a9a5f2687
8 changed files with 261 additions and 113 deletions

View File

@@ -33,6 +33,9 @@
/* common */
#include "addrsize.h"
/* ca65 */
#include "sizeof.h"
#include "symtab.h"
@@ -80,3 +83,21 @@ SymEntry* GetSizeOfSymbol (SymEntry* Sym)
SymEntry* DefSizeOfScope (SymTable* Scope, long Size)
/* Define the size of a scope and return the size symbol */
{
SymEntry* SizeSym = GetSizeOfScope (Scope);
SymDef (SizeSym, GenLiteralExpr (Size), ADDR_SIZE_DEFAULT, SF_NONE);
}
SymEntry* DefSizeOfSymbol (SymEntry* Sym, long Size)
/* Define the size of a symbol and return the size symbol */
{
SymEntry* SizeSym = GetSizeOfSymbol (Sym);
SymDef (SizeSym, GenLiteralExpr (Size), ADDR_SIZE_DEFAULT, SF_NONE);
}