1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-26 05:29:30 +00:00
Commit Graph

80 Commits

Author SHA1 Message Date
Greg King
a6b04f6e97 Changed most "backticks" (grave accents) into apostrophes.
Quotations that are embraced by tick marks now look better, in most fonts.
2019-01-05 14:57:12 -05: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
44e7225ce6 Fixed an internal error that was triggered by an attempt to move an empty list
of instructions in the code segment (Oliver Schmidt).
                       


git-svn-id: svn://svn.cc65.org/cc65/trunk@5419 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-01-21 21:35:49 +00:00
uz
b8d43cee42 Tracked rename of hashstr -> hashfunc.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5156 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-12 15:36:53 +00:00
uz
85f96a7d6f Fixed warnings generated by clang (run by Per Olofsson).
git-svn-id: svn://svn.cc65.org/cc65/trunk@4255 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-09-28 15:59:18 +00:00
uz
dc678e8dcb Improved the code generated for bit-fields.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4096 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-31 14:59:49 +00:00
uz
3ce7717bd2 Don't allow to call subroutines that aren't actual functions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3994 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-04 19:23:15 +00:00
uz
81a30cc888 Fixed source output in generated assembly when -T is used.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3956 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-23 22:11:18 +00:00
uz
82b998117a Added a separate output module that is used to manage the output file.
Fixed the -E switch: Output was always sent to stdout and an empty assembler
output file was generated. Now the output is sent to either <inputstem>.i or
the file named in the -o option.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3955 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-23 21:25:59 +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
cuz
9174f65e54 Make much more usage of dynamic strings (StrBufs) instead of char* and
friends. Since names and other strings are now StrBufs in many places, code
for output had to be changed.
Added support for string literals to StrBuf.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3825 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-03-31 20:54:45 +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
c7490cf060 Some function renaming.
Improved an optimization step.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3642 b7a2c559-68d2-44c3-8de9-860c34a00d81
2005-09-11 12:52:12 +00:00
cuz
ae70828938 Some improvements using the new SB_Printf for string buffers
git-svn-id: svn://svn.cc65.org/cc65/trunk@3335 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-12-16 22:43:52 +00:00
cuz
1fb5967496 Fixed inline assembler problems with instructions where implicit means
actually accumulator addressing. These went through and caused the
optimizer to behave strangely.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3164 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-07-18 09:34:52 +00:00
cuz
d8279302a9 Make the -O and --codesize options stackable.
Copy the current optimization settings into a code segment on creation.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3129 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-06-15 20:29:49 +00:00
cuz
3ac1a08baf Cleaned up the code used for handling jump labels and the label name.
Fixed a problem that caused the optimizer not to detect that flags set by
a load are used, if the use is "hidden" behind an unconditional branch. This
caused the optimizer to remove the load.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3111 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-06-07 21:16:49 +00:00
cuz
b1d7f78bce More debugging output
git-svn-id: svn://svn.cc65.org/cc65/trunk@3084 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-06-04 14:36:36 +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
e6a5b59b42 Don't generate internal errors on duplicate labels
git-svn-id: svn://svn.cc65.org/cc65/trunk@2524 b7a2c559-68d2-44c3-8de9-860c34a00d81
2003-10-15 09:33:01 +00:00
cuz
0293cc4bc0 Fixed a problem with line continuations and -T
git-svn-id: svn://svn.cc65.org/cc65/trunk@1893 b7a2c559-68d2-44c3-8de9-860c34a00d81
2003-01-07 21:45:20 +00:00
cuz
abcc981253 Move the Debug flag into a new module "debugflag" in the common directory.
Remove the const qualifier from the argument of xfree().


git-svn-id: svn://svn.cc65.org/cc65/trunk@1877 b7a2c559-68d2-44c3-8de9-860c34a00d81
2003-01-04 16:59:51 +00:00
cuz
70755921a9 Re-added register variables.
Changed/added several optimizer steps to detect register variables correctly
or to handle them in a special way.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1636 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-11-25 15:05:15 +00:00
cuz
1647c6783f New functions CS_ResetMarks, CS_ResetAllMarks and CS_IsBasicBlock.
git-svn-id: svn://svn.cc65.org/cc65/trunk@1448 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-10-06 19:01:16 +00:00
cuz
7ce4196829 New/changed optimizations
git-svn-id: svn://svn.cc65.org/cc65/trunk@1443 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-10-05 20:32:31 +00:00
cuz
89e8aae7d7 Increase the size of some buffers, so we are at the assembler level able to
handle any identifiers passed from the C level.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1439 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-10-04 17:54:46 +00:00
cuz
b4326d1930 Place all declarations that are local to a function into the local function
scope. Apart from some other advantages, this works around a bug where having
an external identifier in global scope and using an "extern" declaration for
exactly the same identifier in a function did not work, because the assembler
refused to export and import one and the same identifier. Since the import
now imports into local scope, both identifiers are distinct for the assembler
and the (valid) C code works.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1424 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-10-02 13:00:04 +00:00
cuz
8d02f9a9b3 Added a new CS_RangeHasLabel function
git-svn-id: svn://svn.cc65.org/cc65/trunk@1058 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-10-18 19:20:14 +00:00
cuz
2435aa63b5 Added 65C02 specific optimizations.
Make two runs over the code when generating register info to get info for
backward jumps right.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1049 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-10-13 12:21:46 +00:00
cuz
0fcbb73439 Use a function pointer instead of a flag
git-svn-id: svn://svn.cc65.org/cc65/trunk@1046 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-10-12 18:21:56 +00:00
cuz
9552efc1e4 More work to make user asm labels work
git-svn-id: svn://svn.cc65.org/cc65/trunk@1043 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-10-12 07:58:11 +00:00
cuz
799459fdd5 Allow labels in user supplied asm statements
git-svn-id: svn://svn.cc65.org/cc65/trunk@1041 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-10-11 22:01:47 +00:00
cuz
0a6895ca05 Working on optimizations
git-svn-id: svn://svn.cc65.org/cc65/trunk@985 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-09-29 20:34:31 +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
f28be6d657 Collect more info on zp registers
git-svn-id: svn://svn.cc65.org/cc65/trunk@965 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-09-23 09:20:55 +00:00
cuz
a6aa5512d5 Generate info about zp register usage
git-svn-id: svn://svn.cc65.org/cc65/trunk@964 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-09-21 21:52:50 +00:00
cuz
b3af17126c Allow access to the global segments. Place ".dbg file" statements into the
global text segments so they will appear before any of the ".dbg line"
statements emitted later.


git-svn-id: svn://svn.cc65.org/cc65/trunk@852 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-08-24 15:03:10 +00:00
cuz
0b08eb0e68 More register tracking
git-svn-id: svn://svn.cc65.org/cc65/trunk@815 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-07-24 20:13:10 +00:00
cuz
05eb03b32f Better register tracking in the optimizer
git-svn-id: svn://svn.cc65.org/cc65/trunk@812 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-07-24 17:07:33 +00:00
cuz
c1c402c6ba Fixed a bug in the for loop optimization applied earlier
git-svn-id: svn://svn.cc65.org/cc65/trunk@800 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-07-17 16:46:43 +00:00
cuz
6c34eeb93d Move the increment code of a for loop after the loop body.
git-svn-id: svn://svn.cc65.org/cc65/trunk@799 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-07-17 12:50:38 +00:00
cuz
fe2cd767b2 Working on the backend
git-svn-id: svn://svn.cc65.org/cc65/trunk@771 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-06-04 12:27:16 +00:00
cuz
d27bfe8a7b More renaming
git-svn-id: svn://svn.cc65.org/cc65/trunk@769 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-06-03 09:10:46 +00:00
cuz
f42300ef62 Lots of renaming
git-svn-id: svn://svn.cc65.org/cc65/trunk@768 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-31 21:08:49 +00:00
cuz
a9674c071a Working on the backend
git-svn-id: svn://svn.cc65.org/cc65/trunk@766 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-29 07:41:08 +00:00
cuz
369f59c1bb Working on the backend
git-svn-id: svn://svn.cc65.org/cc65/trunk@762 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-28 06:30:03 +00:00
cuz
916a0879d5 cleanup
git-svn-id: svn://svn.cc65.org/cc65/trunk@760 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-26 10:04:15 +00:00