bd872a6324
Added 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
82919fa2f8
Another tiny code improvement for integer compares.
uz
2009-08-29 11:31:28 +00:00
c741f06ac1
Fixed a problem with local variables (stack offset for RHS was not corrected).
uz
2009-08-29 11:31:06 +00:00
53372ae1c1
Just comment and formatting changes.
uz
2009-08-29 10:54:59 +00:00
5918306fe2
Change mode constants for ParseDecl to an enum.
uz
2009-08-28 21:34:28 +00:00
73e2a72a2a
Reorder optimimization steps to get better results.
uz
2009-08-28 21:03:17 +00:00
a9f540fb27
Added more code to improve compares.
uz
2009-08-28 19:34:35 +00:00
cd568ef898
Fixed a bug introduced by recent changes.
uz
2009-08-28 17:38:24 +00:00
2a2c0fbaf1
Increase count to 16384. Simplify complex expression.
uz
2009-08-28 17:21:58 +00:00
f66cd4a13f
Changed 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
1b2e0f66cc
Change code generated for compares for special cases.
uz
2009-08-28 13:44:03 +00:00
7f143d77d1
Added -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
e0643a9f77
Relax the precondition for OPtStackOps somewhat.
uz
2009-08-28 09:29:11 +00:00
c214fa6395
When preprocessing, all compares evaluate to constants, so don't print a warning in this case.
uz
2009-08-27 22:09:46 +00:00
08d6d96264
Added better code to replace tossubax.
uz
2009-08-27 22:07:28 +00:00
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.
uz
2009-08-27 22:00:18 +00:00
55e8f67640
Try to generate more predicable code. clc always before adc or sbc.
uz
2009-08-27 16:59:26 +00:00
1b4e2111c3
Check 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
7c55f30627
Fixed a problem with OptPtrLoad6 (must correct stack pointer).
uz
2009-08-27 16:13:17 +00:00
1b40f00573
Added the --force-import option also to the cl65 utility.
uz
2009-08-27 15:30:52 +00:00
ee6028993e
Added a new "--force-import" command line option to the linker.
uz
2009-08-27 14:43:44 +00:00
2b15f40424
Use the new AddrSizeFromStr function.
uz
2009-08-27 14:19:47 +00:00
6f39a15eff
Added an AddrSizeFromStr function.
uz
2009-08-27 14:11:07 +00:00
23dae5a04b
Fixed two more function that didn't clear the high byte of the function result.
uz
2009-08-23 21:40:36 +00:00
4c4071b34a
Fixed 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
8fa42540c1
Disable handling of tossubax since it won't work as implemented in many cases.
uz
2009-08-20 21:01:01 +00:00
f63964e23c
Added several constraints to the optimizer functions to avoid breaking code.
uz
2009-08-20 16:06:20 +00:00
4a93f188a0
Fixed 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
c4763e9007
Special cased the division 16 by 8.
uz
2009-08-19 14:51:16 +00:00
b9c0d6ac85
Also handle ldaxysp as a valid load insn before a push.
uz
2009-08-19 13:36:26 +00:00
8a0d80bbf0
Inline the left shift routines.
uz
2009-08-19 13:20:28 +00:00
57ef34f041
Apply OptTransfers3 again in a later step, so it gets another chance.
uz
2009-08-19 12:47:30 +00:00
f3b639f835
Generate more predictable code.
uz
2009-08-19 10:17:10 +00:00
2e8d62cf88
Add an additional precondition check for safety.
uz
2009-08-19 10:14:14 +00:00
824ab8b137
Serval improvements, handling of tossubax.
uz
2009-08-18 15:10:15 +00:00
acd1233bf2
Greatly 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
b5a44f9542
Added a multiplication test program.
uz
2009-08-17 20:37:36 +00:00
45aa228489
Change order of insns in generated sequence in OptPtrLoad17.
uz
2009-08-17 16:25:54 +00:00
430c13f658
Added/corrected code info.
uz
2009-08-17 16:23:29 +00:00
97c0e45c9f
Rewrite of the main function.
uz
2009-08-17 12:52:50 +00:00
548dfd3060
Change 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
1bd4abdc67
Use correct adddressing mode for "asl a".
uz
2009-08-16 21:01:16 +00:00
cbf4884f13
Some more pattern replacements.
uz
2009-08-16 20:56:33 +00:00
e646d35db0
Output 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
bfc8bd6d74
Added an entry point that clears the high word of rhs.
uz
2009-08-16 16:38:52 +00:00
3aa4d74b18
Added more function info
uz
2009-08-16 16:38:25 +00:00
aa7d419165
More entry points for long ops that clear the high word of the lhs.
uz
2009-08-15 21:06:06 +00:00
582506b7fc
Check 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
b1f772e9be
Added additional entry points that clear the high word of the right operand.
uz
2009-08-15 20:58:35 +00:00
d0f9a0d6a7
Fixed wrong insertion order that caused problems with labels.
uz
2009-08-15 16:49:46 +00:00
14b00447a8
Fixed wrong insertion order that caused problems with labels.
uz
2009-08-15 16:45:02 +00:00
b4fda62df9
clc should always be the insn before adc.
uz
2009-08-15 16:00:30 +00:00
15c420fd39
Some branch improvements.
uz
2009-08-15 15:58:21 +00:00
3381311674
Inline some forms of aslax1
uz
2009-08-15 15:27:43 +00:00
f495a9edc3
Fixed an error
uz
2009-08-15 14:43:59 +00:00
61195d914e
Replace ldaxidx by inline code.
uz
2009-08-15 14:20:26 +00:00
33f6c85753
Add more function to the "harmless calls" list.
uz
2009-08-15 14:18:00 +00:00
b391929acb
Minor improvement in last change
uz
2009-08-15 13:42:40 +00:00
3717443f3b
Try to generate more predictable code.
uz
2009-08-15 13:25:40 +00:00
fbe009a182
Remove even more transfer instructions.
uz
2009-08-15 13:16:56 +00:00
14f213cadb
Remove unnecessary transfer instructions.
uz
2009-08-15 12:49:15 +00:00
b68db83a2b
Remove more push/pop sequences.
uz
2009-08-15 10:27:41 +00:00
d27664036d
Change order of replacement code in OptPtrLoad10 to allow detection in other steps.
uz
2009-08-15 10:14:04 +00:00
ec8280cc52
Use __asm__() instead of asm().
uz
2009-08-15 09:08:03 +00:00
0c4144c586
Don't generate inlined codes for integers shifts. If necessary the optimizer can do that.
uz
2009-08-14 22:17:47 +00:00
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.
uz
2009-08-14 22:10:04 +00:00
6a26b6e3b4
Added tosicmp0, a special entry point that clears the X register.
uz
2009-08-14 22:08:28 +00:00
fdfa1678d4
Tell the compiler more about the runtime library functions.
uz
2009-08-14 20:21:47 +00:00
4a5ceb13c7
Removed debug code
uz
2009-08-14 18:32:11 +00:00
50b410eb32
Do size improvements always if they have no impact on speed.
uz
2009-08-14 18:23:29 +00:00
f374e746af
Improvements in array index code.
uz
2009-08-14 17:28:32 +00:00
a9b2226956
Moved part of codeopt into coptptrload for better modularization.
uz
2009-08-14 17:09:24 +00:00
3ea6be8f72
Fix definition for CIA (Stefan Haubenthal).
uz
2009-08-06 20:27:19 +00:00
f8d3fccc01
get_tv() implementation for the CBM610 by Stefan Haubenthal.
uz
2009-08-06 20:24:41 +00:00
f5a2022f32
Remove 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
cb1870de74
Fixed an off-by-one error (reported by Greg King - thanks).
uz
2009-08-05 14:29:30 +00:00
3ce7717bd2
Don't allow to call subroutines that aren't actual functions.
uz
2009-08-04 19:23:15 +00:00
70d2d9e50f
Fixed an off-by-one bug
uz
2009-08-04 19:22:15 +00:00
ca73116a03
New function IsLocalLabelName.
uz
2009-08-04 19:12:34 +00:00
3d95c9453f
There's no longer a need to link in the startup file, it's done my magic instead.
uz
2009-07-31 13:39:07 +00:00
4a6a0357e3
There are no more startup object modules.
uz
2009-07-31 12:56:36 +00:00
7ecf7a7e58
Adjust geos startup code to new compiler handling. Introduce __STARTUP__ symbol, remove geos.o.
uz
2009-07-31 12:46:38 +00:00
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.
uz
2009-07-31 12:05:42 +00:00
66391bfc25
Inline shifts in g_asl as is already the case in g_scale.
uz
2009-07-30 19:41:25 +00:00
043acb1d98
Calculate time in seconds, not ticks. Implement pager output for primes.
uz
2009-07-30 19:25:59 +00:00
a3eed9016f
Fix problem with R3904: Chars on the lhs of opeq must still be accessed as such.
uz
2009-07-30 15:15:13 +00:00
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.
uz
2009-07-30 14:45:50 +00:00
a4a1c729c8
Allow registers in sweet16 mode also to be specified as constant numbers instead of Rx. Suggestion and sample code by Gabriele Galeotti.
uz
2009-07-30 13:05:41 +00:00
e1866ed9f8
Correct sweet16 addressing bug with SUB instr. Patch by Gabriele Galeotti.
uz
2009-07-29 14:37:58 +00:00
f62b7a564e
The "inc" target needed for the snapshot build script seems to have been lost.
uz
2009-07-28 19:40:23 +00:00
778f79c436
Add a dummy return to fix a Watcom warning.
uz
2009-07-28 19:36:44 +00:00
5ee49abd12
Fixed a compatibility problem in TypeCmp: Subtracting pointers with different signedness is not allowed.
uz
2009-07-28 19:29:11 +00:00
fb9c097981
Fixed a problem with function pointer conversion.
uz
2009-07-28 19:21:38 +00:00
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.
uz
2009-07-28 18:56:16 +00:00
dff0e86458
Prepared the code for referencing a symbol that forces the startup code to get linked in.
uz
2009-07-28 18:55:23 +00:00
81464a1214
Removed setoserror as an external.
uz
2009-07-27 18:48:03 +00:00
931add050e
Added a systime implementation by Stefan Haubenthal with a few changes. The routine reads the TOD clock of CIA1 on the C64 and C128. Since systime was a dummy routine common for all CBMs before, this change adds an individual dummy routine for all other CBM systems. CBM510/610 do also have a TOD clock, so a similar function as in the C64 could be used ...
uz
2009-07-27 18:44:37 +00:00
087ae8173a
Be sure to read disk errors after sending the command on the command channel.
uz
2009-07-27 18:42:37 +00:00
2363a6f5c7
Move common data and ex-/imports into an assembler include named time.inc.
uz
2009-07-27 17:59:27 +00:00