0a9c7484adAdd a warning if a function returning something does not contain a return statement.
uz
2009-08-31 13:18:49 +00:00
1ea503a036The pleasp.s module is no longer in use.
uz
2009-08-31 12:56:54 +00:00
7064aafab9Added info about changed leaa0sp and leaaxsp. Rewrote g_leasp to cope with 16 stack offsets, because it's rather easy in this case.
uz
2009-08-31 12:41:38 +00:00
db69c202a4Oh 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
uz
2009-08-31 12:22:13 +00:00
bf9d36a2faRenamed leaasp.s again, this time to leaa0sp.s. Added a new module leaaxsp.s.
uz
2009-08-31 12:15:51 +00:00
a1dd468291Renamed leasp.s to leaasp.s
uz
2009-08-31 12:10:59 +00:00
45d4771584For bit fields contained within single bytes, try to do character operations instead of word sized ops.
uz
2009-08-30 09:01:04 +00:00
0b0353de13Use CHAR_BITS instead of a hardcoded 8 bits/byte.
uz
2009-08-30 08:37:21 +00:00
03e206a44fMake the SIZEOF_XXX constants resolve to unsigned values.
uz
2009-08-30 08:36:56 +00:00
2ddeb069ebAny field without a name is legal but useless in a union.
uz
2009-08-30 08:30:55 +00:00
a09c71b3ffSeparate the functions that parse unions and structs, because they became too different.
uz
2009-08-30 08:28:16 +00:00
829cb7de4cMissing resp. ignored "volatile".
uz
2009-08-30 07:55:21 +00:00
8d5999c3a4Added even more subroutines to the "harmless calls" list.
uz
2009-08-29 23:19:01 +00:00
7a7526ef8bFew small changes. Started a new section about implementation-defined behavior.
uz
2009-08-29 22:03:41 +00:00
b098d8045eCode improvements
uz
2009-08-29 21:58:06 +00:00
7f7dc69290Rewrote the paragraph about compiler limits and standard compliance.
uz
2009-08-29 21:32:14 +00:00
6b4fe90928First implementation of bit fields.
uz
2009-08-29 21:20:13 +00:00
7c6ee79ea9Added more harmless functions to the list, so the stuff gets applied in more cases.
uz
2009-08-29 21:17:28 +00:00
b0a89ff421Improved code for shifts.
uz
2009-08-29 20:16:52 +00:00
b4855e017bThe shift long by 4 functions do also destroy Y.
uz
2009-08-29 20:14:20 +00:00
ddeb171617Info for long shift functions was missing or wrong.
uz
2009-08-29 20:04:18 +00:00
d0c4f85e51Fix wrong check for typedef which caused non allocation of storage for structs after the latest changes.
uz
2009-08-29 19:05:01 +00:00
7ced0a2cebRename Width to BitWidth.
uz
2009-08-29 19:04:21 +00:00
bd872a6324Added code to parse bit fields and enter them into the symbol table. They're not supported in code generation until now.
uz
2009-08-29 17:38:53 +00:00
82919fa2f8Another tiny code improvement for integer compares.
uz
2009-08-29 11:31:28 +00:00
c741f06ac1Fixed a problem with local variables (stack offset for RHS was not corrected).
uz
2009-08-29 11:31:06 +00:00
53372ae1c1Just comment and formatting changes.
uz
2009-08-29 10:54:59 +00:00
5918306fe2Change mode constants for ParseDecl to an enum.
uz
2009-08-28 21:34:28 +00:00
73e2a72a2aReorder optimimization steps to get better results.
uz
2009-08-28 21:03:17 +00:00
a9f540fb27Added more code to improve compares.
uz
2009-08-28 19:34:35 +00:00
cd568ef898Fixed a bug introduced by recent changes.
uz
2009-08-28 17:38:24 +00:00
2a2c0fbaf1Increase count to 16384. Simplify complex expression.
uz
2009-08-28 17:21:58 +00:00
f66cd4a13fChanged code generated for compares. Fixed bugs in OptStackOps. Still generates wrong code in at least one place.
uz
2009-08-28 16:32:58 +00:00
1b2e0f66ccChange code generated for compares for special cases.
uz
2009-08-28 13:44:03 +00:00
7f143d77d1Added -u as an alias for --force-import. Updated command line option infos in the cl65 and ld65 docs.
uz
2009-08-28 10:23:19 +00:00
e0643a9f77Relax the precondition for OPtStackOps somewhat.
uz
2009-08-28 09:29:11 +00:00
c214fa6395When preprocessing, all compares evaluate to constants, so don't print a warning in this case.
uz
2009-08-27 22:09:46 +00:00
08d6d96264Added better code to replace tossubax.
uz
2009-08-27 22:07:28 +00:00
d65928829fAdded 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.
uz
2009-08-27 22:00:18 +00:00
55e8f67640Try to generate more predicable code. clc always before adc or sbc.
uz
2009-08-27 16:59:26 +00:00
1b4e2111c3Check for usage of Y instead of reloading it. The latter will destroy the flags from load of A.
uz
2009-08-27 16:38:27 +00:00
7c55f30627Fixed a problem with OptPtrLoad6 (must correct stack pointer).
uz
2009-08-27 16:13:17 +00:00
1b40f00573Added the --force-import option also to the cl65 utility.
uz
2009-08-27 15:30:52 +00:00
ee6028993eAdded a new "--force-import" command line option to the linker.
uz
2009-08-27 14:43:44 +00:00
2b15f40424Use the new AddrSizeFromStr function.
uz
2009-08-27 14:19:47 +00:00
6f39a15effAdded an AddrSizeFromStr function.
uz
2009-08-27 14:11:07 +00:00
23dae5a04bFixed two more function that didn't clear the high byte of the function result.
uz
2009-08-23 21:40:36 +00:00
4c4071b34aFixed an error in cbm_k_save (on which cbm_save is based): The X register was not cleared on return.
uz
2009-08-23 21:38:11 +00:00
8fa42540c1Disable handling of tossubax since it won't work as implemented in many cases.
uz
2009-08-20 21:01:01 +00:00
f63964e23cAdded several constraints to the optimizer functions to avoid breaking code.
uz
2009-08-20 16:06:20 +00:00
4a93f188a0Fixed a bug reported by Greg King: Initialized data for constant arrays was not placed in the RODATA but in the DATA segment.
uz
2009-08-20 10:55:38 +00:00
c4763e9007Special cased the division 16 by 8.
uz
2009-08-19 14:51:16 +00:00
b9c0d6ac85Also handle ldaxysp as a valid load insn before a push.
uz
2009-08-19 13:36:26 +00:00
8a0d80bbf0Inline the left shift routines.
uz
2009-08-19 13:20:28 +00:00
57ef34f041Apply OptTransfers3 again in a later step, so it gets another chance.
uz
2009-08-19 12:47:30 +00:00
f3b639f835Generate more predictable code.
uz
2009-08-19 10:17:10 +00:00
2e8d62cf88Add an additional precondition check for safety.
uz
2009-08-19 10:14:14 +00:00
824ab8b137Serval improvements, handling of tossubax.
uz
2009-08-18 15:10:15 +00:00
acd1233bf2Greatly improved multiplication routine. Optimized the generic 16x16 one and added special cases for 8x16 and 8x8. The former is directly called by the compiler as tosmula0 and tosumula0 resp.
uz
2009-08-17 20:48:28 +00:00
b5a44f9542Added a multiplication test program.
uz
2009-08-17 20:37:36 +00:00
45aa228489Change order of insns in generated sequence in OptPtrLoad17.
uz
2009-08-17 16:25:54 +00:00
430c13f658Added/corrected code info.
uz
2009-08-17 16:23:29 +00:00
97c0e45c9fRewrite of the main function.
uz
2009-08-17 12:52:50 +00:00
548dfd3060Change order, so that the forced imports for main() go into the global segments and not the one for main().
uz
2009-08-16 23:37:09 +00:00
1bd4abdc67Use correct adddressing mode for "asl a".
uz
2009-08-16 21:01:16 +00:00
cbf4884f13Some more pattern replacements.
uz
2009-08-16 20:56:33 +00:00
e646d35db0Output an apropriate error message when a floating point type is encountered (instead of an internal compiler error).
uz
2009-08-16 19:23:07 +00:00
bfc8bd6d74Added an entry point that clears the high word of rhs.
uz
2009-08-16 16:38:52 +00:00
3aa4d74b18Added more function info
uz
2009-08-16 16:38:25 +00:00
aa7d419165More entry points for long ops that clear the high word of the lhs.
uz
2009-08-15 21:06:06 +00:00
582506b7fcCheck also sreg in OptSize1. Added information about shortcut functions for longs that clear the high word of the right operand on entry.
uz
2009-08-15 21:00:27 +00:00
b1f772e9beAdded additional entry points that clear the high word of the right operand.
uz
2009-08-15 20:58:35 +00:00
d0f9a0d6a7Fixed wrong insertion order that caused problems with labels.
uz
2009-08-15 16:49:46 +00:00
14b00447a8Fixed wrong insertion order that caused problems with labels.
uz
2009-08-15 16:45:02 +00:00
b4fda62df9clc should always be the insn before adc.
uz
2009-08-15 16:00:30 +00:00
15c420fd39Some branch improvements.
uz
2009-08-15 15:58:21 +00:00
3381311674Inline some forms of aslax1
uz
2009-08-15 15:27:43 +00:00
f495a9edc3Fixed an error
uz
2009-08-15 14:43:59 +00:00
61195d914eReplace ldaxidx by inline code.
uz
2009-08-15 14:20:26 +00:00
33f6c85753Add more function to the "harmless calls" list.
uz
2009-08-15 14:18:00 +00:00
b391929acbMinor improvement in last change
uz
2009-08-15 13:42:40 +00:00
3717443f3bTry to generate more predictable code.
uz
2009-08-15 13:25:40 +00:00
fbe009a182Remove even more transfer instructions.
uz
2009-08-15 13:16:56 +00:00
14f213cadbRemove unnecessary transfer instructions.
uz
2009-08-15 12:49:15 +00:00
b68db83a2bRemove more push/pop sequences.
uz
2009-08-15 10:27:41 +00:00
d27664036dChange order of replacement code in OptPtrLoad10 to allow detection in other steps.
uz
2009-08-15 10:14:04 +00:00
ec8280cc52Use __asm__() instead of asm().
uz
2009-08-15 09:08:03 +00:00
0c4144c586Don't generate inlined codes for integers shifts. If necessary the optimizer can do that.
uz
2009-08-14 22:17:47 +00:00
0b7b9354dcDon't generate short code for the tosxxx functions when X is zero or similar. Let the optimizer do it. This reduces the number of possible patterns that must be detected by the optimizer. Add tosicmp0 as a shortcut function.
uz
2009-08-14 22:10:04 +00:00
6a26b6e3b4Added tosicmp0, a special entry point that clears the X register.
uz
2009-08-14 22:08:28 +00:00
fdfa1678d4Tell the compiler more about the runtime library functions.
uz
2009-08-14 20:21:47 +00:00
4a5ceb13c7Removed debug code
uz
2009-08-14 18:32:11 +00:00
50b410eb32Do size improvements always if they have no impact on speed.
uz
2009-08-14 18:23:29 +00:00
f374e746afImprovements in array index code.
uz
2009-08-14 17:28:32 +00:00
a9b2226956Moved part of codeopt into coptptrload for better modularization.
uz
2009-08-14 17:09:24 +00:00
3ea6be8f72Fix definition for CIA (Stefan Haubenthal).
uz
2009-08-06 20:27:19 +00:00
f8d3fccc01get_tv() implementation for the CBM610 by Stefan Haubenthal.
uz
2009-08-06 20:24:41 +00:00
f5a2022f32Remove the top-level Makefile's attempt to install the no-longer-external start-up files. Let the makefile work with command-shells that don't recognize the "test" command's "-e" operator (the Minix OS has that shell). Patch by maintainer Greg King.
uz
2009-08-05 14:31:33 +00:00
cb1870de74Fixed an off-by-one error (reported by Greg King - thanks).
uz
2009-08-05 14:29:30 +00:00
9cafacaf6dintroduce STARTUP segment to Atari platform
cpg
2009-08-04 20:04:41 +00:00