1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-09 01:28:58 +00:00
Commit Graph

1623 Commits

Author SHA1 Message Date
uz
7c613f7a83 Terminate after printing the version number when -V is used.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4110 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-09-01 14:41:37 +00:00
uz
e9eb9eb77c Improved code generation, better tracking.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4108 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-09-01 10:07:02 +00:00
uz
cdc3afa6ef Fixed a problem with OptCmp3 that was in there for a while but is now
triggered because of the new subtraction code sequence.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4107 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-09-01 10:06:39 +00:00
uz
7c4240fe69 Minor code improvement.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4106 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-09-01 09:15:19 +00:00
uz
944057238e Simplify code generated for the ?: operator when type conversion code for the
second operand is necessary. Instead of generating interleaved code with
several jumps, just move the code to the right place.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4105 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-09-01 08:57:36 +00:00
uz
84710f7227 Remember more function infos in the Function struct.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4104 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-31 20:37:54 +00:00
uz
0c08f65872 Fixed a bug in Opt_tosaddax.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4103 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-31 19:36:06 +00:00
uz
c942568af9 Simplify the code somewhat.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4102 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-31 18:18:50 +00:00
uz
30f25ae12d Make the AddOpLow and AddOpHigh functions usable with both, lhs and rhs
operands.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4101 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-31 18:02:44 +00:00
uz
b829bda8cb Print the SVN version number when -V or --version is used.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4100 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-31 17:17:18 +00:00
uz
b3f3b21f80 Fixed a few C99isms that prevented the sources to compile with Watcom-C.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4099 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-31 17:15:59 +00:00
uz
514775cbdf Fixed a copy&paste error in a comment.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4098 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-31 16:48:45 +00:00
uz
7983009e06 Improved code for bit fields.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4097 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-31 15:11:32 +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
0a9c7484ad Add a warning if a function returning something does not contain a return
statement.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4095 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-31 13:18:49 +00:00
uz
7064aafab9 Added info about changed leaa0sp and leaaxsp. Rewrote g_leasp to cope with 16
stack offsets, because it's rather easy in this case.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4093 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-31 12:41:38 +00:00
uz
45d4771584 For bit fields contained within single bytes, try to do character operations
instead of word sized ops.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4089 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-30 09:01:04 +00:00
uz
0b0353de13 Use CHAR_BITS instead of a hardcoded 8 bits/byte.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4088 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-30 08:37:21 +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
2ddeb069eb Any field without a name is legal but useless in a union.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4086 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-30 08:30:55 +00:00
uz
a09c71b3ff Separate the functions that parse unions and structs, because they became too
different.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4085 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-30 08:28:16 +00:00
uz
8d5999c3a4 Added even more subroutines to the "harmless calls" list.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4083 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-29 23:19:01 +00:00
uz
b098d8045e Code improvements
git-svn-id: svn://svn.cc65.org/cc65/trunk@4081 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-29 21:58:06 +00:00
uz
6b4fe90928 First implementation of bit fields.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4079 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-29 21:20:13 +00:00
uz
7c6ee79ea9 Added more harmless functions to the list, so the stuff gets applied in more
cases.
      


git-svn-id: svn://svn.cc65.org/cc65/trunk@4078 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-29 21:17:28 +00:00
uz
b0a89ff421 Improved code for shifts.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4077 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-29 20:16:52 +00:00
uz
b4855e017b The shift long by 4 functions do also destroy Y.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4076 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-29 20:14:20 +00:00
uz
ddeb171617 Info for long shift functions was missing or wrong.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4075 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-29 20:04:18 +00:00
uz
d0c4f85e51 Fix wrong check for typedef which caused non allocation of storage for structs
after the latest changes.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4074 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-29 19:05:01 +00:00
uz
7ced0a2ceb Rename Width to BitWidth.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4073 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-29 19:04:21 +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
82919fa2f8 Another tiny code improvement for integer compares.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4071 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-29 11:31:28 +00:00
uz
c741f06ac1 Fixed a problem with local variables (stack offset for RHS was not corrected).
git-svn-id: svn://svn.cc65.org/cc65/trunk@4070 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-29 11:31:06 +00:00
uz
53372ae1c1 Just comment and formatting changes.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4069 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-29 10:54:59 +00:00
uz
5918306fe2 Change mode constants for ParseDecl to an enum.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4068 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-28 21:34:28 +00:00
uz
73e2a72a2a Reorder optimimization steps to get better results.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4067 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-28 21:03:17 +00:00
uz
a9f540fb27 Added more code to improve compares.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4066 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-28 19:34:35 +00:00
uz
cd568ef898 Fixed a bug introduced by recent changes.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4065 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-28 17:38:24 +00:00
uz
f66cd4a13f Changed code generated for compares. Fixed bugs in OptStackOps. Still
generates wrong code in at least one place.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4063 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-28 16:32:58 +00:00
uz
1b2e0f66cc Change code generated for compares for special cases.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4062 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-28 13:44:03 +00:00
uz
7f143d77d1 Added -u as an alias for --force-import. Updated command line option infos in
the cl65 and ld65 docs.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4061 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-28 10:23:19 +00:00
uz
e0643a9f77 Relax the precondition for OPtStackOps somewhat.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4060 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-28 09:29:11 +00:00
uz
c214fa6395 When preprocessing, all compares evaluate to constants, so don't print a
warning in this case.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4059 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-27 22:09:46 +00:00
uz
08d6d96264 Added better code to replace tossubax.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4058 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-27 22:07:28 +00:00
uz
d65928829f Added a warning if the result of a compare operation is constant. This should
protect against missing parenthesis like in (si & 0x7F == 0). Hopefully
without too many false positives.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4057 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-27 22:00:18 +00:00
uz
55e8f67640 Try to generate more predicable code. clc always before adc or sbc.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4056 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-27 16:59:26 +00:00
uz
1b4e2111c3 Check for usage of Y instead of reloading it. The latter will destroy the
flags from load of A.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4055 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-27 16:38:27 +00:00
uz
7c55f30627 Fixed a problem with OptPtrLoad6 (must correct stack pointer).
git-svn-id: svn://svn.cc65.org/cc65/trunk@4054 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-27 16:13:17 +00:00
uz
1b40f00573 Added the --force-import option also to the cl65 utility.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4053 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-27 15:30:52 +00:00
uz
ee6028993e Added a new "--force-import" command line option to the linker.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4052 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-27 14:43:44 +00:00