1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-04 17:04:58 +00:00
Commit Graph

4089 Commits

Author SHA1 Message Date
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
1ea503a036 The pleasp.s module is no longer in use.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4094 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-31 12:56:54 +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
db69c202a4 Oh well. Decided to throw away the separate implementation for leaa0sp,
because it's not used too much, may sometimes inlined and can easily be
replaced by another entry in leaaxsp.s


git-svn-id: svn://svn.cc65.org/cc65/trunk@4092 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-31 12:22:13 +00:00
uz
bf9d36a2fa Renamed leaasp.s again, this time to leaa0sp.s. Added a new module leaaxsp.s.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4091 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-31 12:15:51 +00:00
uz
a1dd468291 Renamed leasp.s to leaasp.s
git-svn-id: svn://svn.cc65.org/cc65/trunk@4090 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-31 12:10:59 +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
829cb7de4c Missing resp. ignored "volatile".
git-svn-id: svn://svn.cc65.org/cc65/trunk@4084 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-30 07:55:21 +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
7a7526ef8b Few small changes. Started a new section about implementation-defined
behavior.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4082 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-29 22:03:41 +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
7f7dc69290 Rewrote the paragraph about compiler limits and standard compliance.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4080 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-29 21:32:14 +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
2a2c0fbaf1 Increase count to 16384. Simplify complex expression.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4064 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-28 17:21:58 +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
uz
2b15f40424 Use the new AddrSizeFromStr function.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4051 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-27 14:19:47 +00:00
uz
6f39a15eff Added an AddrSizeFromStr function.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4050 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-27 14:11:07 +00:00
uz
23dae5a04b Fixed two more function that didn't clear the high byte of the function result.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4049 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-23 21:40:36 +00:00
uz
4c4071b34a Fixed an error in cbm_k_save (on which cbm_save is based): The X register was
not cleared on return.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4048 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-23 21:38:11 +00:00
uz
8fa42540c1 Disable handling of tossubax since it won't work as implemented in many cases.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4047 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-20 21:01:01 +00:00