1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 23:29:39 +00:00
Commit Graph

1761 Commits

Author SHA1 Message Date
uz
41f7757204 Ignore unknown preprocessor directives in an #if group that is excluded.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4534 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-12-30 11:20:09 +00:00
uz
60bc009991 * Moved the BASIC stub that calls the compiled program into it's own segment
named EXEHDR.
* Renamed BASICHDR to EXEHDR for the PET-II machines.
* Moved the call to CHRCH in front of the code that saves the zero page, since
  open files are sometimes remembered in the zero page, so we need to close
  them before we grab a copy.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4507 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-12-09 12:42:24 +00:00
uz
1fae13274e An assignment for the ZPSAVE segment was missing in the linker config for the
32K memory config of the VIC20. Hint from Robert Hurst.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4505 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-12-08 20:41:43 +00:00
uz
7d94dc50a1 New option and #pragma --local-strings that causes string literals to be
output immediately.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4504 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-12-08 20:35:24 +00:00
uz
a467095216 Relax header checking somewhat, so second source fonts are accepted.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4502 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-12-06 12:24:59 +00:00
uz
3976746735 Rewrote literal handling. Literals are now saved together with other function
data, and at the end of compilation merged if possible. Literals for unused
functions are removed together with the function.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4501 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-12-05 22:39:45 +00:00
uz
9b7c16ec4c Fixed problem with last change. Wide string constants were not handled
correctly.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4500 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-12-05 15:14:11 +00:00
uz
50ff6d0768 Create one literal pool per function, so that literal pool data is removed
together with a function, if it is not used. Literal storage can now be
controlled by #pragma writable-strings on a per function basis.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4499 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-12-04 14:12:25 +00:00
uz
1f90ec93a0 Move global segment creation to a better place in source.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4498 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-12-04 13:04:40 +00:00
uz
ff4eeebec2 Makefile patch contributed by Greg King:
I added the "MAKEOPTS=" to the top-level "gcc.mak" that he wants, and I
changed the tool source tree's top-level make-file so that it supports
parallel building.  (I added a rule that builds the common library before
building anything else.)


git-svn-id: svn://svn.cc65.org/cc65/trunk@4497 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-12-02 15:21:22 +00:00
uz
ce931b85be In case of parse errors for structs, don't just set the type of the result to
"int", return a valid lvalue instead.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4483 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-11-24 23:02:58 +00:00
uz
3fb0c660dc Fix a problem with error handling: The E_HAVE_MARKS flag must not be removed
from an expression in case of an error.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4482 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-11-24 22:56:56 +00:00
uz
327c989d8b Support for the HuC6280 (CPU of the PC Engine) contributed by Tobias Gunkel.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4481 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-11-24 20:04:27 +00:00
uz
884aff9191 Prepare for reading keypresses from the X server.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4461 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-11-12 11:19:44 +00:00
uz
6078953baa Do not use a separate byte for an END opcode, instead place the bit into the
previous opcode. This saves one byte per character with the exception of
characters without a vector representation, where we loose one byte, because
we need to add a dummy vector just to apply our END bit.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4433 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-11-02 22:31:32 +00:00
uz
0787e45aee Added macros for jumps after unsigned compares to the "generic" macro package.
Removed BGE/BLT as native instructions for the 65816.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4427 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-11-02 16:26:46 +00:00
uz
23c96f81c0 Some small format changes. Output name is input name + '.tch'.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4413 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-11-01 21:33:28 +00:00
uz
784c709f97 Wrote the actual conversion. Still untested.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4411 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-31 15:42:59 +00:00
uz
b8b3dcce74 Fixed a problem introduced with the last change.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4410 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-31 14:01:22 +00:00
uz
00a1121d8c Fixed a problem with OptJumpTarget3. In a loop over all elements of a
collection that may remove something from the collection, we may not use an
upcounting loop.
                


git-svn-id: svn://svn.cc65.org/cc65/trunk@4409 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-31 10:36:59 +00:00
uz
b86682d29d File reading, verification and comments.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4408 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-30 22:34:08 +00:00
uz
e60544452e Added the chrcvt vector font converter to the top level makefile.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4406 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-30 21:35:25 +00:00
uz
3a9d29d5e2 Created the skeleton of the vector font converter.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4405 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-30 21:34:40 +00:00
uz
07e629a342 Allow fully scoped labels and constants instead of normal ones. This breaks
the barrier between scopes: It is now possible to introduce symbols into a
foreign scope, provided that it's name is known.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4397 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-29 20:30:41 +00:00
uz
c437afd62b Added another optimization step.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4391 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-26 10:17:53 +00:00
uz
7687489a08 Fixed a bug in the last change. For variables that have no initializer, no
storage was allocated if -Cl (static locals) was in effect.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4390 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-26 10:17:17 +00:00
uz
f4b4a812ed Removed an unused table.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4389 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-24 19:37:57 +00:00
uz
bd45df7cad Rearranged/duplicated optimization steps to generate better code in a few
cases.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4387 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-23 10:03:46 +00:00
uz
814be2524b Restructured parts of locals.c. This will also fix a problem where arrays with
unspecified size but an initializer would cause an error when -Cl (static
locals) was in effect.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4385 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-23 09:22:17 +00:00
uz
96b46beee0 Fixed a problem with bit-fields: Values spanning more than a byte must always
be loaded as an int. This was not the case if the expression rhs was a char.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4382 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-20 08:21:12 +00:00
uz
4372d111a2 The CodeEntry buffer array was one entry to small.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4381 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-19 19:37:28 +00:00
uz
3b079c0947 Added another optimization step.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4380 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-19 19:12:50 +00:00
uz
f4acd3eb4f Added a makefile for cc65 for testing purposes.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4379 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-19 18:02:40 +00:00
uz
388ccf4c4b Added missing definitions, fixed copy&paste errors. Formatting.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4378 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-19 18:00:25 +00:00
uz
1ccb6f916d Remove __CC65__ since it doesn't support all attributes gcc does.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4377 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-19 17:55:49 +00:00
uz
399c37273d Mark an unsed parameter as unused. __attribute__ also supported by cc65.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4376 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-19 17:25:43 +00:00
uz
548336a7bd Renamed attribute handling functions. Added SymHasAttr().
git-svn-id: svn://svn.cc65.org/cc65/trunk@4375 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-19 10:19:26 +00:00
uz
a5a9700d19 Changed handling of attributes to a more generic form (it's allowed in each
declaration now) and added a new attribute "unused" to flag unused parameters,
variables or functions that shouldn't be warned about.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4373 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-18 21:42:59 +00:00
uz
5a00b38aab Fixed the existing but unused attribute parsing code. Added
__attribute__((noexit)) that may be used to mark functions that won't return.
Added this attribute to the exit() function in stdlib.h.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4372 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-18 18:31:02 +00:00
uz
0ce362a69b Some cleanup in the code generator. Added a g_drop function. g_drop and
g_space can now handle sizes > 255 bytes.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4370 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-15 21:08:03 +00:00
uz
1f92d6bfa2 Warn when structs are passed by value to a function.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4369 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-15 19:18:34 +00:00
uz
1f489fd9e1 Extend handling for "long branch to RTS" to "long branch to jump leaving
function".


git-svn-id: svn://svn.cc65.org/cc65/trunk@4368 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-15 11:11:20 +00:00
uz
635fae97fb If a conditional branch as an unconditional jump as target, that doesn't jump
to a function-internal label, don't replace the jump target with the final
one, because this has no advantages and makes the code larger.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4367 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-15 10:21:50 +00:00
uz
d9753c2eb7 Allow switching warnings about unused pragmas on or off.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4366 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-14 13:04:38 +00:00
uz
62fdd55fee Fixed a problem with SB_GetSym.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4365 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-14 13:03:47 +00:00
uz
ed2767e65f Changed names of the pragmas to be identical to the corresponding command line
options. This should make use easier. The old names of the pragmas are still
available but will cause warnings.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4364 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-14 12:55:15 +00:00
uz
869a1369c4 Fixed an error in the SB_SkipMultiple macro.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4363 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-14 10:04:20 +00:00
uz
a1fb355a9a Rewrote most of the #pragma parsing code. I'm still not satisfied, but at
least, it's a bit better than before. #pragma warn (...) is now used to switch
single warnings instead of a global on/off switch.



git-svn-id: svn://svn.cc65.org/cc65/trunk@4362 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-13 21:24:32 +00:00
uz
583b9f8fcc Removed an unused function.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4361 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-11 15:10:55 +00:00
uz
e623c87d63 New function SB_SkipMultiple().
git-svn-id: svn://svn.cc65.org/cc65/trunk@4358 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-10 20:51:52 +00:00