1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-22 12:30:41 +00:00
Commit Graph

654 Commits

Author SHA1 Message Date
Bob Andrews
4dfbccfafd
Merge pull request #2522 from kugelfuhr/kugelfuhr/code-optimizations
Improve generated code for AND/EOR/ORA
2024-10-05 15:03:46 +02:00
Bob Andrews
270aa4417b
Merge pull request #2524 from kugelfuhr/kugelfuhr/fix-2523
Fix some issues with preprocessor expressions
2024-10-05 14:14:29 +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
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
001fa05d48 Move the test to the test/standard directory. 2024-09-13 19:18:31 +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
6113dc5995 Removed casts from stdint.h. Added a test. Fixes #2505. 2024-09-10 08:12:31 +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
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
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
Colin Leroy-Mira
55d3a6ea39 Optimize stpcpy's size and speed 2024-09-07 21:24:53 +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
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
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
Kugel Fuhr
cc0db26e20 Added some tests. 2024-09-01 20:22:29 +02:00
Bob Andrews
601deab3a2
Merge pull request #2492 from kugelfuhr/kugelfuhr/alternative-pragma-names
Allow alternative names for pragmas that contain underlines instead of dashes
2024-09-01 17:57:38 +02:00
Kugel Fuhr
b4aef6eac4 Fix macro preprocessing for #include. Arguments enclosed in "" or <> must not
be preprocessed. See ISO/IEC 9899 1990 (E) section 6.8.2.
2024-09-01 13:16:35 +02:00
Kugel Fuhr
e40058257e Added a test for the available #pragmas. 2024-09-01 10:23:29 +02:00
Bob Andrews
03d824e13b
Merge pull request #2464 from SvenMichaelKlose/stpcpy
Add stpcpy().
2024-07-16 01:47:11 +02:00
Sven Michael Klose
677cd8ff4e Use standard library's exit() code constants. 2024-07-15 17:54:43 +02:00
Sven Michael Klose
9558ebad62 Add test for stpcpy(). 2024-07-15 17:35:28 +02:00
Sven Michael Klose
816bcabe5a Move strtok() test to correct section. 2024-07-14 23:12:59 +02:00
Sven Michael Klose
c385e52c12 Merge branch 'master' into test_strtok 2024-07-14 13:59:18 +02:00
Sven Michael Klose
cdb2d49e3a Test strtok(). 2024-07-07 01:02:32 +02:00
Sven Michael Klose
871bafa5b3 Keep gcc-14 from aborting with errors due to new defaults.
Adds -Wno-error=implicit-int -Wno-error=int-conversion to CFLAGS.

Tested with gcc-12.4 and gcc-14.1.
2024-07-07 00:48:15 +02:00
Bob Andrews
0541b65aa4
Merge pull request #2434 from colinleroy/strcasestr
Implement strcasestr
2024-06-22 15:00:17 +02:00
mrdudz
86e5acd679 fix race condition as proposed in #2420 2024-05-16 18:57:08 +02:00
Evgeny Vrublevsky
f789316f86 Add a test for the unnamed labels. 2024-04-07 13:34:49 +03:00
Colin Leroy-Mira
82165c1a77 Implement strcasestr 2024-03-18 19:51:50 +01:00
mrdudz
b993d88339 second half of #2420 - don't use the loop macro. Fixes -j13 for me 2024-03-17 17:19:42 +01:00
Bob Andrews
a06431a8f9
Merge pull request #2402 from colinleroy/a-bit-of-65c02-optimisations
a BIT of 65C02 optimisations
2024-02-02 21:58:04 +01:00
Bob Andrews
eb503cc542
Merge pull request #2390 from colinleroy/implement-shifts-by-7
Implement aslax7/shlax7/asrax7/shrax7
2024-02-02 20:17:48 +01:00
Colin Leroy-Mira
1fab179cb4 a BIT of 65C02 optimisations
Use BIT immediate instead of AND when reloading A is required
afterwards.
Add an fread unit test as the optimisation touches fread.
Sprinkle a few zero page indexed while we're at it.
2024-02-02 19:45:49 +01:00
Bob Andrews
2a03e5d8c9
Merge pull request #2392 from colinleroy/asm-fputc-fputs
Asm fputc fputs
2024-02-02 19:41:23 +01:00
Bob Andrews
128f261c3a
Merge pull request #2389 from colinleroy/fix-2388
Fix #2388
2024-02-02 18:25:39 +01:00
Bob Andrews
54b423a99e
fix test 2024-02-02 13:13:57 +01:00
acqn
96d55e3703 Fixed optimization for char-size bitwise XOR/OR/AND when the rhs operand is complicated. 2024-02-02 19:00:33 +08:00
Colin Leroy-Mira
1e300bf768 Add test case for issue #2395 2024-02-01 22:06:56 +01:00
Colin Leroy-Mira
ce606bb19e Fix tests... 2024-01-31 08:40:36 +01:00
Colin Leroy-Mira
1a5a7d67a7 Rewrite fputc in assembly
-36 bytes, -12% cycles
2024-01-30 17:19:13 +01:00
Colin Leroy-Mira
ba36071022 Rewrite fputs in assembly
-28 bytes, -1% cycles
2024-01-30 17:12:52 +01:00
Colin Leroy-Mira
7594af553a Fix #2388
Reopen stdin in binary mode instead of closing/opening
2024-01-30 09:39:44 +01:00
Colin Leroy-Mira
7d7cf2d1e0 Implement aslax7/shlax7/asrax7/shrax7 2024-01-29 07:59:11 +01:00