1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-05 21:29:03 +00:00
Commit Graph

1653 Commits

Author SHA1 Message Date
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
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
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
uz
f63964e23c Added several constraints to the optimizer functions to avoid breaking code.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4046 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-20 16:06:20 +00:00
uz
4a93f188a0 Fixed a bug reported by Greg King: Initialized data for constant arrays was
not placed in the RODATA but in the DATA segment.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4044 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-20 10:55:38 +00:00
uz
b9c0d6ac85 Also handle ldaxysp as a valid load insn before a push.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4042 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-19 13:36:26 +00:00
uz
8a0d80bbf0 Inline the left shift routines.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4041 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-19 13:20:28 +00:00
uz
57ef34f041 Apply OptTransfers3 again in a later step, so it gets another chance.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4040 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-19 12:47:30 +00:00
uz
f3b639f835 Generate more predictable code.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4039 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-19 10:17:10 +00:00
uz
2e8d62cf88 Add an additional precondition check for safety.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4038 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-19 10:14:14 +00:00
uz
824ab8b137 Serval improvements, handling of tossubax.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4037 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-18 15:10:15 +00:00
uz
45aa228489 Change order of insns in generated sequence in OptPtrLoad17.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4034 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-17 16:25:54 +00:00
uz
430c13f658 Added/corrected code info.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4033 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-17 16:23:29 +00:00
uz
97c0e45c9f Rewrite of the main function.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4032 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-17 12:52:50 +00:00
uz
548dfd3060 Change order, so that the forced imports for main() go into the global
segments and not the one for main().


git-svn-id: svn://svn.cc65.org/cc65/trunk@4031 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-16 23:37:09 +00:00
uz
1bd4abdc67 Use correct adddressing mode for "asl a".
git-svn-id: svn://svn.cc65.org/cc65/trunk@4030 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-16 21:01:16 +00:00
uz
cbf4884f13 Some more pattern replacements.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4029 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-16 20:56:33 +00:00
uz
e646d35db0 Output an apropriate error message when a floating point type is encountered
(instead of an internal compiler error).


git-svn-id: svn://svn.cc65.org/cc65/trunk@4028 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-16 19:23:07 +00:00
uz
3aa4d74b18 Added more function info
git-svn-id: svn://svn.cc65.org/cc65/trunk@4026 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-16 16:38:25 +00:00
uz
582506b7fc Check also sreg in OptSize1. Added information about shortcut functions for
longs that clear the high word of the right operand on entry.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4024 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-15 21:00:27 +00:00
uz
d0f9a0d6a7 Fixed wrong insertion order that caused problems with labels.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4022 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-15 16:49:46 +00:00
uz
14b00447a8 Fixed wrong insertion order that caused problems with labels.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4021 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-15 16:45:02 +00:00
uz
b4fda62df9 clc should always be the insn before adc.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4020 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-15 16:00:30 +00:00
uz
15c420fd39 Some branch improvements.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4019 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-15 15:58:21 +00:00
uz
3381311674 Inline some forms of aslax1
git-svn-id: svn://svn.cc65.org/cc65/trunk@4018 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-15 15:27:43 +00:00
uz
f495a9edc3 Fixed an error
git-svn-id: svn://svn.cc65.org/cc65/trunk@4017 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-15 14:43:59 +00:00
uz
61195d914e Replace ldaxidx by inline code.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4016 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-15 14:20:26 +00:00
uz
33f6c85753 Add more function to the "harmless calls" list.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4015 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-15 14:18:00 +00:00
uz
b391929acb Minor improvement in last change
git-svn-id: svn://svn.cc65.org/cc65/trunk@4014 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-15 13:42:40 +00:00
uz
3717443f3b Try to generate more predictable code.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4013 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-15 13:25:40 +00:00
uz
fbe009a182 Remove even more transfer instructions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4012 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-15 13:16:56 +00:00
uz
14f213cadb Remove unnecessary transfer instructions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4011 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-15 12:49:15 +00:00
uz
b68db83a2b Remove more push/pop sequences.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4010 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-15 10:27:41 +00:00
uz
d27664036d Change order of replacement code in OptPtrLoad10 to allow detection in other
steps.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4009 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-15 10:14:04 +00:00
uz
0c4144c586 Don't generate inlined codes for integers shifts. If necessary the optimizer
can do that. 


git-svn-id: svn://svn.cc65.org/cc65/trunk@4007 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-14 22:17:47 +00:00
uz
0b7b9354dc Don'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.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4006 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-14 22:10:04 +00:00
uz
fdfa1678d4 Tell the compiler more about the runtime library functions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4004 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-14 20:21:47 +00:00
uz
4a5ceb13c7 Removed debug code
git-svn-id: svn://svn.cc65.org/cc65/trunk@4003 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-14 18:32:11 +00:00
uz
50b410eb32 Do size improvements always if they have no impact on speed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4002 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-14 18:23:29 +00:00
uz
f374e746af Improvements in array index code.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4001 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-14 17:28:32 +00:00
uz
a9b2226956 Moved part of codeopt into coptptrload for better modularization.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4000 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-14 17:09:24 +00:00
uz
cb1870de74 Fixed an off-by-one error (reported by Greg King - thanks).
git-svn-id: svn://svn.cc65.org/cc65/trunk@3996 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-05 14:29:30 +00:00
cpg
9cafacaf6d introduce STARTUP segment to Atari platform
git-svn-id: svn://svn.cc65.org/cc65/trunk@3995 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-04 20:04:41 +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
70d2d9e50f Fixed an off-by-one bug
git-svn-id: svn://svn.cc65.org/cc65/trunk@3993 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-04 19:22:15 +00:00
uz
ca73116a03 New function IsLocalLabelName.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3992 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-04 19:12:34 +00:00
uz
3d95c9453f There's no longer a need to link in the startup file, it's done my magic
instead.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3991 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-31 13:39:07 +00:00
uz
8216bf1d6a Force an import of the special symbol __STARTUP__ in the C compiler when
main() is encountered. Define this symbol in the startup code. This will
automatically force linking of the startup code which can then reside inside
the standard library as any other object file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3988 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-31 12:05:42 +00:00
uz
66391bfc25 Inline shifts in g_asl as is already the case in g_scale.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3987 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-30 19:41:25 +00:00
uz
a3eed9016f Fix problem with R3904: Chars on the lhs of opeq must still be accessed as
such.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3985 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-30 15:15:13 +00:00
uz
37157a31a8 Fixed problems with R3977: While the solution was correct, the generated code
is bad, since information is lost when converting functions and arrays to
pointers and cannot be regained easily. So I've reverted the change and fixed
the problem in a less general manner.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3984 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-30 14:45:50 +00:00
uz
a4a1c729c8 Allow registers in sweet16 mode also to be specified as constant numbers
instead of Rx. Suggestion and sample code by Gabriele Galeotti.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3983 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-30 13:05:41 +00:00
uz
e1866ed9f8 Correct sweet16 addressing bug with SUB instr. Patch by Gabriele Galeotti.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3982 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-29 14:37:58 +00:00
uz
f62b7a564e The "inc" target needed for the snapshot build script seems to have been lost.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3981 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-28 19:40:23 +00:00
uz
778f79c436 Add a dummy return to fix a Watcom warning.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3980 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-28 19:36:44 +00:00
uz
5ee49abd12 Fixed a compatibility problem in TypeCmp: Subtracting pointers with different
signedness is not allowed.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3979 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-28 19:29:11 +00:00
uz
fb9c097981 Fixed a problem with function pointer conversion.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3978 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-28 19:21:38 +00:00
uz
32348f5778 Fixed an error: If an expression is loaded into the primary, a function must
be converted to pointer-to-function and an array to pointer-to-member resp.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3977 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-28 18:56:16 +00:00
uz
dff0e86458 Prepared the code for referencing a symbol that forces the startup code to get
linked in.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3976 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-28 18:55:23 +00:00
uz
5b0323771a Add some code that avoids outputing a forward label in the same line as a
normal label. It works but looks bad.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3971 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-06 20:33:06 +00:00
uz
8e8993de7e Support for the .BANKBYTES, .LOBYTES and .HIBYTES pseudo functions contributed
by Kevin Schuetz <scrapdog@runbox.com>.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3965 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-05-18 16:11:34 +00:00
uz
ffa8e7be82 New functions LIWarning and LIError.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3961 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-03-08 14:54:53 +00:00
uz
b607a61866 "S" is a keyword in 65816 mode only.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3958 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-03-06 09:56:22 +00:00
uz
60f525346f Fixed asm code to source line relation in switch statements. The switch code
was incorrectly attributed to the line following the switch statement.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3957 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-23 22:19:23 +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
bf810bf001 When generating forward references to functions, use the default code address
size.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3948 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-22 16:38:07 +00:00
uz
4dd9c523e7 Check for division by/modulo by zero when parsing the /= and %= operators.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3937 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-17 21:09:59 +00:00
uz
c4dac550a8 Small change to avoid endless error loops (aborted by the maximum error count)
if an unexpected token is encountered in Primary().


git-svn-id: svn://svn.cc65.org/cc65/trunk@3936 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-17 20:56:13 +00:00
uz
c94e82f8b2 Check for and flag address size modifiers that are invalid for the choosen CPU.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3927 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-10 21:10:50 +00:00