1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-27 04:54:54 +00:00
Commit Graph

65 Commits

Author SHA1 Message Date
cuz
5548b6fd56 Work on better type casts - not yet finished
git-svn-id: svn://svn.cc65.org/cc65/trunk@1476 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-11-01 15:16:16 +00:00
cuz
4389b0c438 Fixed a small bug
git-svn-id: svn://svn.cc65.org/cc65/trunk@1426 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-10-03 09:00:57 +00:00
cuz
257005696f Improve type casts for ints.
Allow the second and third operand of the :? operator to be of type int.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1395 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-09-18 20:14:51 +00:00
cuz
8d8458032d Fixed a bug
git-svn-id: svn://svn.cc65.org/cc65/trunk@1371 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-07-26 19:27:55 +00:00
cuz
02c26efdd3 Replace calls to memset with _bzero if the fill value is zero and -Oi in
effect.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1359 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-07-16 11:01:51 +00:00
cuz
7c9bf720d8 Fixed a bug
git-svn-id: svn://svn.cc65.org/cc65/trunk@1350 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-07-12 08:45:42 +00:00
cuz
f93eb903ba Fixed/worked around a bug
git-svn-id: svn://svn.cc65.org/cc65/trunk@1343 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-07-10 21:04:02 +00:00
cuz
a96da498f5 Renamed the functions working with "struct Function".
Fixed a problem with K&R functions: In a function with no return type
specified, the compiler did not allow a simple "return" statement. However,
there was no "void" type at that time, so it was not possible to specify
something else. The solution is to allow omission of a return value in a
K&R function with an implicit int type. Other types or an explicit int is
still checked.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1302 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-06-12 12:12:04 +00:00
cuz
21afe25e90 Indirect fastcall functions with no parameters may be called as if it were
cdecl functions, this generates better code.
Remove a small error that caused indirect non fastcall function to always be
handled as variadic, which meant a useless load of the Y register was added.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1292 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-05-26 11:08:17 +00:00
cuz
3292569a89 One less bug in sizeof ("ABC").
git-svn-id: svn://svn.cc65.org/cc65/trunk@1274 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-05-16 17:05:36 +00:00
cuz
c6fe12ef6b Fixed a code generation bug
git-svn-id: svn://svn.cc65.org/cc65/trunk@1215 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-04-06 14:51:27 +00:00
cuz
83e73742c8 Prepare for separate ASM name in symbol table entry
git-svn-id: svn://svn.cc65.org/cc65/trunk@1202 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-03-18 20:04:03 +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
3d838849da Fixed an error in struct assignment
git-svn-id: svn://svn.cc65.org/cc65/trunk@1169 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-03-06 07:56:33 +00:00
cuz
0a4799c975 Fixed several const related bugs
git-svn-id: svn://svn.cc65.org/cc65/trunk@1165 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-03-06 06:38:48 +00:00
cuz
3b5808788b Add #pragma charmap()
Cosmetical changes.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1162 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-02-18 08:40:11 +00:00
cuz
940fba4d54 Fixed a bug
git-svn-id: svn://svn.cc65.org/cc65/trunk@1105 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-11-07 10:32:51 +00:00
cuz
e17ab75ab3 Fixed a bug
git-svn-id: svn://svn.cc65.org/cc65/trunk@1023 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-10-11 09:52:02 +00:00
cuz
c8415fc17c More source splitting.
Remove the -Wno-unused-parameter in favour of __atribute__((unused)).


git-svn-id: svn://svn.cc65.org/cc65/trunk@986 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-09-30 21:56:45 +00:00
cuz
5d0a52b7ac Finished indirect function calls.
Debugged zero page location tracking.


git-svn-id: svn://svn.cc65.org/cc65/trunk@968 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-09-25 10:30:48 +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
8f057fd84d Fixed a few warnings
git-svn-id: svn://svn.cc65.org/cc65/trunk@936 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-09-15 12:13:33 +00:00
cuz
c322febd66 Cosmetic change
git-svn-id: svn://svn.cc65.org/cc65/trunk@896 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-09-12 18:20:42 +00:00
cuz
23fbf3ff2a Adding functionality to StrBuf
git-svn-id: svn://svn.cc65.org/cc65/trunk@885 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-09-09 20:49:20 +00:00
cuz
56b8ead112 Move inline asm parsing into a separate module
git-svn-id: svn://svn.cc65.org/cc65/trunk@880 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-09-09 09:33:06 +00:00
cuz
d799cc283f Add special routines for processing the boolean || and && operators in
preprocessor mode to work around limitations in the existing ones (constant
expressions are not detected).


git-svn-id: svn://svn.cc65.org/cc65/trunk@864 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-09-08 13:59:32 +00:00
cuz
254948fcfe Minor changes
git-svn-id: svn://svn.cc65.org/cc65/trunk@835 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-08-03 06:45:30 +00:00
cuz
f249ae345e More renaming. Remove the case label limit by using a collection to store
the switch entries.


git-svn-id: svn://svn.cc65.org/cc65/trunk@807 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-07-17 21:53:17 +00:00
cuz
c571214513 More renaming
git-svn-id: svn://svn.cc65.org/cc65/trunk@806 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-07-17 21:29:21 +00:00
cuz
cc83744882 Renamed struct expent
git-svn-id: svn://svn.cc65.org/cc65/trunk@805 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-07-17 21:24:19 +00:00
cuz
84f85293f1 Fixed more E_MCONST issues
git-svn-id: svn://svn.cc65.org/cc65/trunk@758 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-24 18:26:20 +00:00
cuz
b0324b6041 Bugfix
git-svn-id: svn://svn.cc65.org/cc65/trunk@757 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-24 09:16:11 +00:00
cuz
3a272d93af More polishing to get the line info right
git-svn-id: svn://svn.cc65.org/cc65/trunk@742 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-22 16:54:47 +00:00
cuz
0e80187cec Added the lineinfo module. Changed the complete code generation to use the
supplied data structures. Re-added the -T option which is much more exact
now because of the better line info stuff.
Cleanups in the scanner (remove old #defines).


git-svn-id: svn://svn.cc65.org/cc65/trunk@740 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-22 09:32:24 +00:00
cuz
c1b6680a92 Working
git-svn-id: svn://svn.cc65.org/cc65/trunk@737 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-21 06:43:46 +00:00
cuz
a961f00997 Several bug fixes
git-svn-id: svn://svn.cc65.org/cc65/trunk@720 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-07 22:07:59 +00:00
cuz
8a3bacd7f4 Working on the new backend
git-svn-id: svn://svn.cc65.org/cc65/trunk@707 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-03 20:16:41 +00:00
cuz
239cbdcb2b Working on the backend
git-svn-id: svn://svn.cc65.org/cc65/trunk@702 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-01 16:57:43 +00:00
cuz
9d1940a124 Working on the new backend
git-svn-id: svn://svn.cc65.org/cc65/trunk@700 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-01 09:21:32 +00:00
cuz
9cb63b679c Renamed GetLabel to GetLocalLabel
git-svn-id: svn://svn.cc65.org/cc65/trunk@692 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-04-19 06:49:08 +00:00
cuz
67aed641db Fixed an internal error on too few params in function call
git-svn-id: svn://svn.cc65.org/cc65/trunk@685 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-04-04 20:20:48 +00:00
cuz
2eab65ad24 Remove the hardcoded limit from the literal pool.
git-svn-id: svn://svn.cc65.org/cc65/trunk@678 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-03-26 21:57:07 +00:00
cuz
2fead58243 Allow a more exact specification which growth factor is allowed when
generating code and favouring speed over size.


git-svn-id: svn://svn.cc65.org/cc65/trunk@668 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-03-24 23:33:38 +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
59bcc726b6 Make AddConstSym from AddEnumSym
git-svn-id: svn://svn.cc65.org/cc65/trunk@660 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-03-23 21:27:48 +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
594a941ee9 Make __fixargs__ an actual symbol table entry. Add a new pseudo variable
__argsize__.


git-svn-id: svn://svn.cc65.org/cc65/trunk@646 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-03-23 10:16:50 +00:00
cuz
00706daa49 Fix a compiler crash that happens after a function definition with two or
more identical parameter names. The input is of course wrong, but the
compiler shouldn't crash.


git-svn-id: svn://svn.cc65.org/cc65/trunk@644 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-03-22 20:54:52 +00:00
cuz
4d34ce83d7 Remove unused flags
git-svn-id: svn://svn.cc65.org/cc65/trunk@577 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-12-09 21:09:52 +00:00
cuz
0ab45f63f0 Fixed a bug
git-svn-id: svn://svn.cc65.org/cc65/trunk@550 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-12-04 21:01:50 +00:00