1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-25 13:29:41 +00:00
Commit Graph

42 Commits

Author SHA1 Message Date
uz
724d1b9160 Fixed an error: When determining where to place initialized data, the compiler
didn't look "deep enough" into nested arrays to determine the constness
correctly.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5622 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-24 14:28:59 +00:00
uz
54740da820 More preparations for an extension of the calling conventions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4650 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-04-29 20:30:49 +00:00
uz
03e206a44f Make the SIZEOF_XXX constants resolve to unsigned values.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4087 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-30 08:36:56 +00:00
uz
bd872a6324 Added code to parse bit fields and enter them into the symbol table. They're
not supported in code generation until now.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4072 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-29 17:38:53 +00:00
uz
32348f5778 Fixed an error: If an expression is loaded into the primary, a function must
be converted to pointer-to-function and an array to pointer-to-member resp.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3977 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-28 18:56:16 +00:00
uz
17ac0cb4fa Fixed the macro versions of several inline functions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3900 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-31 18:31:18 +00:00
uz
1e46bc16e4 More changes to support address size qualifiers.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3899 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-31 18:24:33 +00:00
uz
cc36f8a93a Moved the fascall and near/far flags from the function desriptor into the
type. Started to add general handling of address size flags in types.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3891 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-24 17:33:30 +00:00
uz
0b4f6426e2 Some more floating point support.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3886 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-11 17:51:00 +00:00
cuz
10c949062b Fixed a bug: The compiler evaluated constant expressions internally always
using signed integers as data types. This led to wrong results for mod, div
and compares.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3797 b7a2c559-68d2-44c3-8de9-860c34a00d81
2007-08-26 18:53:46 +00:00
cuz
4c0720709b Fixed a few errors in the macros used by the Watcom compiler.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3712 b7a2c559-68d2-44c3-8de9-860c34a00d81
2006-03-30 19:49:03 +00:00
cuz
f196e7c5c9 Cleanup. Added a few general purpose functions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3710 b7a2c559-68d2-44c3-8de9-860c34a00d81
2006-02-19 15:53:11 +00:00
cuz
de3a20a898 Changed the low level type representation from a strung of unsigned short
elements to a string of structs, each representing one type element. This
should fix problems on unusual architectures, since it is no longer necessary
to embedd pointers and other data converted to numbers in the string of
unsigned shorts.
Increased the TypeCode length to unsigned long to make room for more type
bits.
Inline more functions in datatype.h.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3709 b7a2c559-68d2-44c3-8de9-860c34a00d81
2006-02-19 12:29:37 +00:00
cuz
1375c85405 Removed an unneeded struct forward
git-svn-id: svn://svn.cc65.org/cc65/trunk@3708 b7a2c559-68d2-44c3-8de9-860c34a00d81
2006-02-18 12:23:07 +00:00
cuz
64921852dd Parse the C99 "restrict" keyword correctly (but ignore it otherwise).
git-svn-id: svn://svn.cc65.org/cc65/trunk@3706 b7a2c559-68d2-44c3-8de9-860c34a00d81
2006-02-17 20:19:35 +00:00
cuz
dd9ee0ae37 New function PtrConversion
git-svn-id: svn://svn.cc65.org/cc65/trunk@3168 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-08-02 16:37:00 +00:00
cuz
daf8e0d1e6 Added license information preproc.h
git-svn-id: svn://svn.cc65.org/cc65/trunk@3135 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-06-29 20:26:27 +00:00
cuz
651c6e5cbf Add predefined type strings for float and double
git-svn-id: svn://svn.cc65.org/cc65/trunk@3105 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-06-06 10:49:59 +00:00
cuz
3a144965fa Added T_SIZE_T as an alias for T_UINT
git-svn-id: svn://svn.cc65.org/cc65/trunk@3090 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-06-04 17:52:19 +00:00
cuz
f817b05fa9 Allow initialization of flexible array struct members
git-svn-id: svn://svn.cc65.org/cc65/trunk@1928 b7a2c559-68d2-44c3-8de9-860c34a00d81
2003-02-05 22:02:48 +00:00
cuz
c123666d24 Added flexible array members for structs
git-svn-id: svn://svn.cc65.org/cc65/trunk@1925 b7a2c559-68d2-44c3-8de9-860c34a00d81
2003-02-03 22:14:20 +00:00
cuz
5f666a19b8 Replaced the solution for the array conversion problem by a better one.
git-svn-id: svn://svn.cc65.org/cc65/trunk@1784 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-12-17 12:12:44 +00:00
cuz
ede471904c Reenable register variables
git-svn-id: svn://svn.cc65.org/cc65/trunk@1625 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-11-24 23:31:54 +00:00
cuz
c6abc5d9d4 Make small functions inline
git-svn-id: svn://svn.cc65.org/cc65/trunk@1519 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-11-14 22:51:39 +00:00
cuz
dadd136ae1 Use constants for datatype sizes
git-svn-id: svn://svn.cc65.org/cc65/trunk@1480 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-11-02 12:39:10 +00:00
cuz
8810e38bb7 Move the assignment parser into a separate module.
When assigning structures, copy them using the primary register when the
size is 1, 2, or 4.
When assigning structures, allow structures by value when the size is 1,
2, or 4. These structures are expected to be in the primary register. The
only case when this can happen is by return from function, so this change
makes div() work.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1477 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-11-01 21:27:31 +00:00
cuz
872c2b4453 Made a lot of short functions inline
git-svn-id: svn://svn.cc65.org/cc65/trunk@1456 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-10-10 20:23:41 +00:00
cuz
d92676ef60 Add SB_GetNumber to scanstrbuf.c.
Rewrite of CharMapPragma in pragma.c
Fixed bug in scanner.c: Invalid octal constants containing the numbers 8
and 9 were accepted by the compiler.
Moved SignExtendChar from scanner.c to datatype.c.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1416 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-09-30 18:46:08 +00:00
cuz
0355c34199 Fixed problems with incomplete types (structs and arrays) that could cause
internal compiler errors in several places.
An old cc65 extension (variables of type void) was broken and did no longer
work. Fixed that.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1184 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-03-10 20:44:58 +00:00
cuz
f4fbbc3dcc Track usage of the sreg and several other zero page registers and remove
unused stores into these registers.
Because of this, the old code using regsave does no longer work. Started
to rewrite it.


git-svn-id: svn://svn.cc65.org/cc65/trunk@966 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-09-24 22:36:35 +00:00
cuz
8eadb8aee0 Working on the new backend
git-svn-id: svn://svn.cc65.org/cc65/trunk@706 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-03 17:34:54 +00:00
cuz
544705e6f4 * Added several type casts to increase C++ compatibility.
* __fixargs__ is now an actual function symbol and no longer handled in the
   scanner.
 * Additional symbol __argsize__ that is a constant in normal functions and
   a const local variable for variadic functions. Using this symbol, the
   va_arg macro gets a lot simpler and smaller.
 * Added special code to handle the fixed parameters of a variadic function.
   The code has some overhead, but the va_fix macro is no longer needed (and
   the compiler generated code is better than va_fix anyway).


git-svn-id: svn://svn.cc65.org/cc65/trunk@652 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-03-23 19:17:04 +00:00
cuz
4357bb4760 Allow __fastcall__ for C function. Contrary to the name, this is a size
optimization for C functions. The last parameter is not pushed onto the
stack by the caller but in the function entry code, so there is no speed
but a size gain.


git-svn-id: svn://svn.cc65.org/cc65/trunk@645 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-03-22 21:02:01 +00:00
cuz
45de0a49ec Replaced several // style comments
git-svn-id: svn://svn.cc65.org/cc65/trunk@586 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-12-20 17:44:12 +00:00
cuz
64dac7e7b7 Working on the new parser
git-svn-id: svn://svn.cc65.org/cc65/trunk@291 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-08-20 09:25:47 +00:00
cuz
7e59a882c5 Working on the new parser
git-svn-id: svn://svn.cc65.org/cc65/trunk@290 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-08-19 21:55:06 +00:00
cuz
2bcb747b58 Added first code for a parse tree implementation.
git-svn-id: svn://svn.cc65.org/cc65/trunk@287 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-08-16 09:10:50 +00:00
cuz
25f5c69efa Reworked type comparison and handling of type qualifiers
git-svn-id: svn://svn.cc65.org/cc65/trunk@285 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-08-14 22:18:26 +00:00
cuz
85417b6d1b Some changes in the way, types and type strings are handled.
Check for and honour const in several places: Assignment to const is flagged
with an error. Const data is placed in the rodata segment.


git-svn-id: svn://svn.cc65.org/cc65/trunk@252 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-08-01 18:45:08 +00:00
cuz
e133416d05 Moved the check module to the common dir.
Replaced the type constants by something more expandable.


git-svn-id: svn://svn.cc65.org/cc65/trunk@248 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-08-01 15:04:35 +00:00
cuz
77e8bffa81 Use gcc function attributes, fix several format related problems
git-svn-id: svn://svn.cc65.org/cc65/trunk@214 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-07-27 21:08:52 +00:00
uz
53dd513176 This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-05-28 13:40:48 +00:00