1
0
mirror of https://github.com/cc65/cc65.git synced 2025-08-05 01:25:44 +00:00
Commit Graph

11331 Commits

Author SHA1 Message Date
Sven Oliver Moll
41951a1345 updated customizing documentation
"weak = yes" is now "type = weak"
2024-09-26 19:33:26 +02:00
Kugel Fuhr
9c69aac097 Fix some issues with signedness in preprocessor expressions. Do also disallow
comma expressions since the aren't compliant and collide with macro invocations.
2024-09-17 11:45:46 +02:00
Bob Andrews
16258d812b Merge pull request #2521 from kugelfuhr/kugelfuhr/fix-2520
Fix wrong evaluation of ternary expressions in the preprocessor
2024-09-15 19:24:22 +02:00
mrdudz
7dc09fdb05 add test related to bug#2515 / pr#2518 2024-09-15 19:22:16 +02:00
Kugel Fuhr
175ec65af1 Fix #2520. 2024-09-14 21:12:19 +02:00
Bob Andrews
fe6afa621b Merge pull request #2516 from kugelfuhr/kugelfuhr/fix-2514
Make lastline.sh ignore empty files
2024-09-14 01:41:16 +02:00
Bob Andrews
e7c735ed8c Merge pull request #2513 from kugelfuhr/kugelfuhr/fix-2505
Remove casts from stdint.h
2024-09-14 01:38:46 +02:00
Kugel Fuhr
231ab4169b Added a test. 2024-09-13 19:30:38 +02:00
Kugel Fuhr
f43cfd1ad0 Fix the check for CPU flags being used after an instruction that gets removed.
Previously only the next instruction was checked for usage of the CPU flags
but this fails for certain code.
2024-09-13 19:30:38 +02:00
Kugel Fuhr
6e18e0880a Added/improved the optimizations:
* Added a new pass that optimizes PHA/PLA sequences
* Added a new pass that optimizes AND/EOR/ORA when an operand is known
* Added a run of an existing pass at later stages to remove code that
  otherwise goes unchanged.
* Handle binary operations in OptUnusedLoads in addition to real loads.
2024-09-13 19:30:38 +02:00
Kugel Fuhr
001fa05d48 Move the test to the test/standard directory. 2024-09-13 19:18:31 +02:00
Kugel Fuhr
3f83cf81f3 Revert the change to .gitignore so git status doesn't report a clean status as
before.
2024-09-13 19:02:13 +02:00
Bob Andrews
7260c10062 Merge pull request #2518 from kugelfuhr/kugelfuhr/fix-2515
Fix minor preprocessor problems
2024-09-13 17:53:20 +02:00
Bob Andrews
34d8c3ef0a Merge pull request #2517 from kugelfuhr/kugelfuhr/time-improvements
Improved/fixed the time() function
2024-09-13 17:47:14 +02:00
Bob Andrews
b5135b3ae0 Merge pull request #2502 from kugelfuhr/kugelfuhr/fix-2461
Fix issue #2461
2024-09-13 15:53:49 +02:00
Kugel Fuhr
efa2020d93 Improved/fixed the time() function:
- When the underlying clock_gettime function returned an error, the value
  returned via *timep was wrong.
- Reduced code size by 7 bytes.
- Don't suck in ldeaxi.
2024-09-12 09:14:57 +02:00
Kugel Fuhr
36a810cdb2 Make lastline.sh ignore empty files. Fixes #2514. 2024-09-12 09:10:37 +02:00
Kugel Fuhr
70ca6d4200 Fixed a standard noncompliance: In C99 and above there must be whitespace
between a name of an object like macro and its replacement list.
2024-09-11 19:21:19 +02:00
Kugel Fuhr
2f6f5f0da1 Fix problem with #line when there is no whitespace between line number and
filename.
y
2024-09-11 19:20:01 +02:00
Kugel Fuhr
6113dc5995 Removed casts from stdint.h. Added a test. Fixes #2505. 2024-09-10 08:12:31 +02:00
Bob Andrews
aff8248341 add comment on function prototypes 2024-09-08 17:08:40 +02:00
Bob Andrews
31a0d5cc40 Merge pull request #2503 from colinleroy/master
Optimize stpcpy's size and speed
2024-09-08 16:17:14 +02:00
Bob Andrews
0be5f8f9e1 Merge pull request #2508 from polluks/waitvsync
[ATMOS] waitvsync
2024-09-08 16:14:51 +02:00
Bob Andrews
3a7f0e2d18 Merge pull request #2509 from polluks/extern
Remove explicit keyword
2024-09-08 16:13:55 +02:00
Bob Andrews
e6ff8d9301 Merge pull request #2510 from polluks/better_waitvsync
Faster waitvsync
2024-09-08 16:09:23 +02:00
Bob Andrews
38038fd0d3 Merge pull request #2512 from kugelfuhr/kugelfuhr/fix-2134
Warn for braces around a pointer initializer
2024-09-08 16:05:58 +02:00
Bob Andrews
1771cb6fbd Merge pull request #2511 from coronax/fix-gettime-in-time.s
In time(), set the clock id to CLOCK_REALTIME when calling clock_gettime.
2024-09-08 16:04:27 +02:00
Kugel Fuhr
d825a40add The test needs a main() function. 2024-09-08 09:36:40 +02:00
Kugel Fuhr
3c5269dede Warn for braces around a pointer initializer. 2024-09-08 09:11:47 +02:00
coronax
838c8b48b7 Set the clock id to CLOCK_REALTIME when calling clock_gettime.
Previously, time() allocated stack space for the clock id argument, but didn't actually set a value.
2024-09-07 23:27:54 -05:00
Colin Leroy-Mira
55d3a6ea39 Optimize stpcpy's size and speed 2024-09-07 21:24:53 +02:00
Stefan
461554e616 Update waitvsync.s 2024-09-07 19:17:00 +02:00
Stefan
f5e434c6c8 Update waitvsync.s 2024-09-07 19:14:59 +02:00
Stefan
be5a9f92ec oops 2024-09-07 18:51:20 +02:00
Stefan
b355620939 Optimise waitvsync.s 2024-09-07 18:49:53 +02:00
Stefan
44aa5dca91 Update atari.h 2024-09-07 18:12:37 +02:00
Stefan
c9fa9f0002 Update atari5200.h 2024-09-07 18:08:18 +02:00
Stefan
ab4cdafacb Update atari7800.h 2024-09-07 18:07:35 +02:00
Stefan
f430341d5d Update atmos.h 2024-09-07 17:23:17 +02:00
Stefan
033fd9e0dc Update funcref.sgml 2024-09-07 17:19:21 +02:00
Stefan
38f54875d0 Add files via upload 2024-09-07 17:06:45 +02:00
Bob Andrews
4e2a3bde92 Merge pull request #2499 from kugelfuhr/kugelfuhr/disable-recursive-calls-to-main
Disallow recursive calls to main() in cc65 mode
2024-09-07 14:39:28 +02:00
Bob Andrews
7bd0a1d7f0 Merge pull request #2500 from kugelfuhr/kugelfuhr/better-help-for-W
Improve the usage output for the '-W' option
2024-09-07 14:37:30 +02:00
Kugel Fuhr
d996e20c5f Fix issues #2461. This was always wrong even in cases where it seemed to work.
If it did, it was by coincidence.
2024-09-03 20:21:48 +02:00
Kugel Fuhr
79606c4d20 Overlooked a few target tests that take the address of main(). 2024-09-02 16:55:58 +02:00
Kugel Fuhr
cd4357057f The change from #2495 didn't take into account that recursive calls to main()
are legal in C. With the changes from #2495, such calls will usually crash the
machine. But recursive calls to main() are rare and on the 6502 every byte
saved is precious. So this change limits the effect of #2495 to cc65 mode and
at the same time disallows recursive calls to main() in this mode. If
recursive calls to main() are actually required, the code must be compiled in
c89 or c99 mode.
2024-09-02 10:39:42 +02:00
Kugel Fuhr
e2014611ef Improve the usage output for the '-W' option. 2024-09-02 07:02:41 +02:00
Bob Andrews
5e5dd1d6c4 Merge pull request #2498 from kugelfuhr/kugelfuhr/fix-include-in-macros
Fix .include within .macro/.repeat
2024-09-01 23:26:33 +02:00
Bob Andrews
2680bc8dec Merge pull request #2495 from kugelfuhr/kugelfuhr/dont-save-stuff-in-main
Generate shorter code for main() in some cases
2024-09-01 22:54:45 +02:00
Kugel Fuhr
cc0db26e20 Added some tests. 2024-09-01 20:22:29 +02:00