1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-02 04:41:35 +00:00
Commit Graph

101 Commits

Author SHA1 Message Date
Greg King
6230b6a813 Completed the cc65 code that recognizes __CDECL__ as a calling convention qualifier. 2015-03-09 19:39:04 -04:00
Greg King
0390c34e88 Changed multi-line C comments into another style.
The left side doesn't look unbalanced.
2014-06-30 16:51:07 -04:00
Oliver Schmidt
4185caf855 Normalized code. 2014-03-04 01:11:19 +01:00
Oliver Schmidt
85885001b1 Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
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
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
bf810bf001 When generating forward references to functions, use the default code address
size.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3948 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-22 16:38:07 +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
uz
a1d7fed128 Fixed several problems with old style (K&R) declarations and a mix of old and
new style decls.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3869 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-03 20:55:36 +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
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
31f85bc23e Renaming and cleanup
git-svn-id: svn://svn.cc65.org/cc65/trunk@3137 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-06-29 20:37:18 +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
a3039d57fc Fixed problems on 64 bit platforms and some other sloopyness when working
with the element count of an array.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3120 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-06-10 13:03:28 +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
a0c1b9fe38 Fixed a bug
git-svn-id: svn://svn.cc65.org/cc65/trunk@3094 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-06-05 11:33:44 +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
d0ea9f34b6 Made several options that can be changed by #pragmas stackable.
Added new #pragma regvars.


git-svn-id: svn://svn.cc65.org/cc65/trunk@2902 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-03-07 21:53:35 +00:00
cuz
8f9a21ae3f Extend the object code format by adding a (currently empty) scope table.
Use the address size for import, export and debug symbols (object code
change).
More changes to support the --memory-model switch and address sizes.


git-svn-id: svn://svn.cc65.org/cc65/trunk@2691 b7a2c559-68d2-44c3-8de9-860c34a00d81
2003-11-28 22:12:14 +00:00
cuz
f1b0fb9763 Added some code to handle floats/doubles.
git-svn-id: svn://svn.cc65.org/cc65/trunk@2487 b7a2c559-68d2-44c3-8de9-860c34a00d81
2003-10-10 11:39:30 +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
ea06b7286e Additional pointer load optimization
git-svn-id: svn://svn.cc65.org/cc65/trunk@1644 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-11-25 17:06:19 +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
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
258133cb0e Fixed a bug
git-svn-id: svn://svn.cc65.org/cc65/trunk@1112 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-11-12 14:20:56 +00:00
cuz
465d208b2b Fixed a bug
git-svn-id: svn://svn.cc65.org/cc65/trunk@1110 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-11-08 09:15: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
e6a5e57b47 Working on the backend
git-svn-id: svn://svn.cc65.org/cc65/trunk@718 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-05 21:42:58 +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
c18453ebcb Inline parameter frame building
git-svn-id: svn://svn.cc65.org/cc65/trunk@661 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-03-24 13:00:16 +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
d341e0ad76 Removed error numbers in favour of literal error messages. The error numbers
were harder to manage, made the code harder to read, and lead no less
verbose messages, since it was effort to add a new message. The new approach
has the drawback that it's more difficult to translate, but this won't
happen anyway.


git-svn-id: svn://svn.cc65.org/cc65/trunk@428 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-11-02 21:22:33 +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
b40d409c4f Output an error message when trying to determine the size of type void.
git-svn-id: svn://svn.cc65.org/cc65/trunk@224 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-07-29 12:07:04 +00:00
cuz
aa8737733f Use the xmalloc module from the common directory.
Rewrote the include file management, keeping a list of all include files
and cleaning up the code while going.


git-svn-id: svn://svn.cc65.org/cc65/trunk@82 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-06-14 21:01:37 +00:00
cuz
9cc25f13b6 Added support for old style (K&R) function declarations.
Several renames for better readibility.
Removed separate struct and enum symbol tables in favour of one tag table.
Check for some more error conditions or dubious constructs.


git-svn-id: svn://svn.cc65.org/cc65/trunk@62 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-06-12 18:31:40 +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