1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-24 09:29:06 +00:00
Commit Graph

2821 Commits

Author SHA1 Message Date
Oliver Schmidt
18b0aaf9f2 Removed help for non-existent option. 2017-04-15 23:12:19 +02:00
Greg King
1aab287189 Fixed the handling of "while (0) {}".
It's a corner case; but, conditional macroes might create it -- better safe than sorry.
2017-04-07 09:26:58 -04:00
Oliver Schmidt
be772c0198 Bumped version.
As suggested the incompatibility resulting from 02daf9f8b5 makes a new version appropriate.
2017-04-06 12:22:39 +02:00
Greg King
dce5783dc9 Fixed the simulations of the stack pointer and the "break" and decimal-mode flags.
* The pointer wraps around the stack page.
* The break flag exists on only the stack, and only after an interrupt.
* 65C02 interrupts clear the decimal-mode flag.
2017-04-04 13:23:44 -04:00
Oliver Schmidt
02daf9f8b5 So far the built-in inlining of several known standard function was always (!) enabled and the option -Os enabled additional, potentially unsafe inlining of some of those functions.
There were two aspects of this behavior that were considered undesirable:
- Although the safe inlining is in general desirable it should only be enabled if asked for it - like any other optimization.
- The option name -Os implies that it is a safe option, the potentially unsafe inlining should have a more explicit name.

So now:
- The option -Os enables the safe inlining.
- The new option --eagerly-inline-funcs enables the potentially unsafe inlining (including the safe inlining).

Additionally was added:
- The option --inline-stdfuncs that does like -Os enable the safe inlining but doesn't enable optimizations.
- The pragma inline-stdfuncs that works identical to --inline-stdfuncs.
- The pragma allow-eager-inline that enables the potentially unsafe inlining but doesn't include the safe inlining. That means that by itself it only marks code as safe for potentially unsafe inlining but doesn't actually enable any inlining.
2017-04-03 23:20:26 +02:00
Oliver Schmidt
cbb2833c01 Merge pull request #414 from IrgendwerA8/SED_Fix
Fixed sim65 SED
2017-03-30 12:26:37 +02:00
IrgendwerA8
170d96898f Fixed SED 2017-03-30 12:17:29 +02:00
Oliver Schmidt
5dbacb538e Merge pull request #411 from pfusik/bss-name-regression
Fix regression of #pragma bss-name
2017-03-22 13:44:48 +01:00
Piotr Fusik
8e35a82c91 Fix regression of #pragma bss-name
Closes #409
2017-03-21 22:35:25 +01:00
Oliver Schmidt
669113b595 Added missing line continuation.
Fixes https://github.com/cc65/cc65/issues/408
2017-03-21 20:45:51 +01:00
IrgendwerA8
cc82cd9992 Fixed addressing error for TSB/TSR and enabled tests again. 2017-03-20 21:53:07 +01:00
Oliver Schmidt
3a30669ff6 Merge pull request #405 from IrgendwerA8/65SC02_sim65_support
Added 65SC02 support for simulator.
2017-03-18 23:38:05 +01:00
IrgendwerA8
e14e13abf4 fixed curly brackets for single line scopes 2017-03-18 22:52:13 +01:00
IrgendwerA8
ad003e5991 style changes 2017-03-18 20:27:41 +01:00
IrgendwerA8
0985655ac7 Fixed bug in original sim65 implementation (reason for C&P error in last commit) 2017-03-18 17:02:22 +01:00
IrgendwerA8
c50e4d25e2 additional fix for scrambled code (sorry) 2017-03-18 16:56:36 +01:00
IrgendwerA8
4ba34f2a69 fixed scrambled semicolon 2017-03-18 16:54:00 +01:00
IrgendwerA8
360372420b Added 65SC02 support for simulator. 2017-03-18 16:37:15 +01:00
Greg King
750a527100 Made C's sizeof operator work with initialized void variables.
Added regression tests that check cc65's handling of void variables.
2017-03-12 14:41:32 -04:00
Oliver Schmidt
a780df1fe1 Merge pull request #381 from pfusik/static-forward-decl
"static" forward declarations
2017-03-12 18:26:14 +01:00
Piotr Fusik
d2c89d2ba9 "static int n; int n;" is an error.
Fixes test/err/static-4.c regression.
2017-03-09 19:14:31 +01:00
Piotr Fusik
5988ec37cd Revert "Disallow global variable declarations with an initializer."
This reverts commit 1f12a06f7c.
2017-02-15 18:51:27 +01:00
Christian Groessler
a5fba551d1 Merge remote-tracking branch 'upstream/master' into something_to_pull2 2017-02-13 21:38:38 +01:00
Piotr Fusik
31f19fbc65 Issue an error for duplicate global variables.
Previously it was an assembler error.
2017-02-13 21:10:21 +01:00
Piotr Fusik
730d01a25f Global uninitialized variable is only a tentative definition.
Closes #204
2017-02-13 21:04:45 +01:00
Piotr Fusik
1f12a06f7c Disallow global variable declarations with an initializer.
E.g.
extern int i = 42;
2017-02-13 19:41:05 +01:00
Greg King
7e8bb7b700 Fixed ca65's BRK instruction encoding for the 65816.
BRK is two bytes on all 6502 variants; but, the 65816's maker declared officially that assemblers should support an optional operand.
2017-02-12 14:54:57 -05:00
Oliver Schmidt
5bbf010029 Merge pull request #371 from jedeoric/master
Create an Oric Telestrat target library
2017-02-10 23:47:13 +01:00
jede
9cde534b23 Rollback for *.vcxproj, telestrat.sgml modified for "don't" instead of "did not" for telemon2.4 2017-02-09 18:46:56 +01:00
Christian Groessler
a08f905224 Cleanups for Creativision. 2017-02-01 20:09:03 +01:00
Christian Groessler
07f840f11c Merge remote-tracking branch 'upstream/master' into creativision 2017-02-01 18:15:05 +01:00
jede
b5fef66f37 Merge telemon24 and telemon30 into telestrat target.
Cleaning, and replace tab to spaces
Converting hex lowercase value into uppercase char.
Changing := and = when it was needed
2017-01-31 22:09:14 +01:00
jede
858e952505 Fix 2017-01-29 23:05:18 +01:00
jede
db3b6603e5 Fix 2017-01-29 23:03:01 +01:00
jede
bd82bf6a7f Fix 2017-01-29 22:59:53 +01:00
jede
e21eca942b new pull fix 2017-01-29 22:55:35 +01:00
jede
2697499b3c Fixing old pull request 2017-01-29 22:53:50 +01:00
jede
0f8fb4d79d Merge with current version 2017-01-29 22:39:51 +01:00
Florent Flament
c1aac0de0e Add C support for Atari 2600 (VCS) 2017-01-13 21:12:22 +01:00
Chris Cacciatore
66b30f0c7a Added 'any' to --list-opt-steps. 2016-12-15 09:06:15 -08:00
jede
252e4afb9c Adding files for telemon30 2016-12-14 21:22:10 +01:00
Peter Ferrie
8a08413263 fix build break on da65 2016-12-03 20:54:14 -08:00
Alan Cox
e4aee2ba34 cc65: remove un-needed logic from octal parsing
We no longer need the extra error handling logic for octal parsing so simplify
it as requested by Greg King.

Signed-off-by: Alan Cox <etchedpixels@gmail.com>
2016-11-20 18:02:45 +00:00
Alan Cox
6ee1fd2a67 scanner: Correct handling of \0101
The C language has this oddity that octal constants are 3 bytes so the sequence
"\0101" is two bytes and well defined by the langage. cc65 currently misparses
this as a 1 byte octal code. Add a count to fix this.

Signed-off-by: Alan Cox <etchedpixels@gmail.com>
2016-11-19 13:02:19 +00:00
Sven Oliver Moll
2d76d0a657 da65: 4510 support
- cleaned up unnecessary static function
- adjusted table formatting
2016-09-23 13:10:38 +02:00
Sven Oliver Moll
d0ed84c2d0 da65: adding support for 4510 cpu of c65 2016-09-20 17:37:10 +02:00
Sven Oliver Moll
ae3f9bbd77 Added assembler pseudo commands .P4510 and .IFP4510 together with docs and testcase 2016-09-07 19:21:24 +02:00
Christian Groessler
3531bcbf3e Fix some typos. 2016-09-06 15:13:44 +02:00
Greg King
4b2e3be2fc Fixed some bugs in da65's HuC6280 section. 2016-09-02 14:24:29 -04:00
Oliver Schmidt
9c38521ea8 Merge pull request #343 from SvOlli/release
Add 4510 support for C65/C64DX
2016-08-31 22:05:49 +02:00
Sven Oliver Moll
48f64de720 4510 support: yet another round up little updates 2016-08-31 20:18:54 +02:00
Sven Oliver Moll
4384603eeb 4510 support: added some other small improvements:
- fixed typo in doc/ca65.sgml
- Greg found a way to get rid of one extra opcode handling in total
2016-08-30 22:58:40 +02:00
Sven Oliver Moll
91f8e09bcc 4510 support: fixed some cosmetical stuff and documentation 2016-08-29 23:29:31 +02:00
Sven Oliver Moll
0538184699 Add 4510 support for C65/C64DX 2016-08-29 10:45:18 +02:00
Greg King
1dee57bf1f Made cc65 not warn us when we change character code 0x00 back to itself. 2016-08-26 08:08:44 -04:00
Chris Cacciatore
e9295b2a98 Updated comment regarding curly braces. 2016-08-20 09:42:29 -07:00
Chris Cacciatore
7919812378 Updated switch statement comments.
* Now comments represent the fact that there may not be curly braces.
2016-08-19 20:21:10 -07:00
Chris Cacciatore
3bd3fd8749 Removed check for LCURLY in switch statements. 2016-08-15 11:03:02 -07:00
Chris Cacciatore
bad8412131 All programs print version and exit successfully.
* All programs are now using the ProgName variable as well.
2016-08-12 08:54:41 -07:00
Chris Cacciatore
f9482a1b72 Fixed test negation. (#329)
Fixed test negation.
2016-08-09 15:46:51 -04:00
Oliver Schmidt
d90dff5861 Merge pull request #328 from cacciatc/print-sym-name-incompatible-ptr-types
Reporting sym name for incompatible pointer types.
2016-08-05 13:31:34 +02:00
Greg King
33b1d82791 Added the WDC65c02S WAI and STP mnemonics to the disassembler. 2016-08-02 16:38:39 -04:00
Chris Cacciatore
9accf983e1 Reporting sym name for incompatible pointer types. 2016-08-02 11:31:09 -07:00
David M. Lloyd
8f0146f14a Add missing WDC instructions 2016-07-28 11:55:25 -05:00
Christian Groessler
85d755f214 fix indentation 2016-07-05 17:10:10 +02:00
Christian Groessler
97b517a892 sim65: add command line parameter to print number of CPU cycles at exit 2016-07-05 17:07:39 +02:00
Greg King
a6eb7d0763 Fixed how ca65 handles some debug info from cc65.
ca65 used to claim that an assembler error/warning was found on a C code line; and, that an Assembly line is only indirectly related to it.
Now, ca65 says that the Assembly line has the problem; and, that the Assembly line was produced from the C line.
2016-07-03 07:07:09 -04:00
Greg King
90b2f5aff8 Fixed some code that adjusts an index after a deletion from a collection. 2016-07-02 10:26:33 -04:00
Greg King
573381a340 Allowed character code zero to be remapped with other character codes. 2016-06-11 06:43:19 -04:00
Oliver Schmidt
6f0b57fe51 Added chrcvt65 to the Visual Studio project. 2016-06-03 11:37:15 +02:00
Oliver Schmidt
8dd003d2b3 Added --print-target-path option.
If cc65 is installed and used as designed there's no need whatsoever for CC65_HOME (both on *IX and Windows) from the perspective of the cc65 binaries. If the user however has to access files from the 'target' directory thenhe ends up with some assumption on the cc65 installation path nevertheless :-(

In order to avoid this I added the --print-target-path option. It "exports" the logic used by the cc65 binaries to locate their files to the user thus allowing him to leverage the same logic to locate the target files in his build scripts / Makefiles.
2016-06-03 11:08:53 +02:00
Lauri Kasanen
8951e74ba7 ld65: Be more verbose in token errors 2016-05-27 20:03:58 +03:00
Greg King
8d5717b57a Small optimization of some cc65-generated loops.
"bne" means also branch-on-not-zero.  Therefore, this optimization doesn't put a compare-to-zero between an increment and a "bne".
2016-05-24 15:52:12 -04:00
Greg King
2c7ccca210 Added the optional C keyword "volatile" to the __asm__ statement grammar.
It prevents the statement's Assembly code from being optimized (e.g., moved or removed).  Optimization is disabled for that statement's entire function (other functions aren't affected).
2016-04-22 11:33:52 -04:00
Oliver Schmidt
62c2177599 Merge pull request #283 from polluks/sp65
Fixed CPU definition of Lynx.
2016-04-14 11:28:25 +02:00
Polluks
b14021e9ac Fixed CPU definition of Lynx. Removed nonsense target vc20. 2016-04-12 23:58:30 +02:00
Oliver Schmidt
e809d6bf0d Merge pull request #281 from polluks/sp65
sp65: A forgotten option. Empty arguments are not silent anymore.
2016-04-10 21:13:02 +02:00
KORISNIK
7f06405bdb A forgotten option. Empty arguments are not silent anymore. 2016-04-10 02:21:36 +02:00
Greg King
fac246c799 Moved a warning message, about misaligned segments, to a configuration function.
It used to be shown only if the segment was written into a binary file.  Now, it's shown for all badly-aligned segments.
2016-03-29 05:40:12 -04:00
Oliver Schmidt
8b685763d4 Renamed chrcvt to chrcvt65 and added it to the build.
The /Makefile presumes that all binaries are are named *65 so chrcvt had to be renamed in order to be added to the build.
2016-03-27 19:09:00 +02:00
Oliver Schmidt
ab1600b346 Merge pull request #269 from jbrandwood/squarebracket
New ".feature" to use brackets instead of parens for 6502 indirect addressing.
2016-03-03 09:07:21 +01:00
mrdudz
0dc85268c4 fix merge fxxxup 2016-02-28 19:11:04 +01:00
Oliver Schmidt
54e09fdd03 Added basic frame for new target 'creativision'.
Kym Greenshields <kym.greenshields@gmail.com> has expressed interest
in contributing and maintaining support for the VTech CreatiVision system.

this resembles commit 8e6b8dd0af from oliver
2016-02-28 19:05:40 +01:00
Bob Andrews
25f4482641 Merge pull request #238 from mrdudz/gamate
Bit Corporation 'Gamate' support
2016-02-27 18:44:26 +01:00
John Brandwood
d23db09f7f Add optional feature to use brackets instead of parens for 6502 indirect addressing. 2016-02-25 12:40:31 -08:00
Greg King
7a39b85e30 Fixed how ca65's CONDES-type pseudo-instructions save line numbers (for error messages). 2016-01-15 17:18:09 -05:00
polluks
cb3700ef66 Changed stdout to stderr to separate sim65's output streams. Suggested doc edit. 2016-01-05 17:45:18 +01:00
Greg King
7e14dde07b Fixed the cc65 code that handled an addition of a pointer to a 32-bit offset.
It didn't demote the offset to int because it looked at the pointer (instead of the offset) which already was 16 bits.
2015-12-31 17:41:48 -05:00
Greg King
3b303396bf Made cc65 accept comparisons between pointers with different qualifiers (similarly to subtractions between pointers). 2015-12-29 04:18:17 -05:00
Oliver Schmidt
02e4b5bfe3 Merge pull request #249 from polluks/master
My first PR
2015-12-27 13:40:20 +01:00
polluks
11786b198e Amiga support #192 2015-12-27 01:26:28 +01:00
Greg King
bdbf75372c Added another op-code to the test pattern for a right-shift optimizer in cc65. 2015-12-14 11:50:43 -05:00
Greg King
651b1b40ec Extended a signed char shift optimization, to handle shifts that are longer than 4 bits. 2015-12-13 17:10:31 -05:00
Greg King
4716083f3f Fixed a signed char shift optimization so that it won't be used on signed int also.
(It would lose significant bits from the high byte.)
2015-12-13 17:04:43 -05:00
mrdudz
8a499fdf4e fixup conio.c some more. also includes merge of upstream/master because git is retarded. 2015-12-02 00:13:32 +01:00
mrdudz
9fbf8a4299 conio and most other stuff working now 2015-11-29 01:14:59 +01:00
f
4dc4ea60ee Implemented escaping of spaces in ca65 dependency files. Largely based on input.c from cc65 (WriteEscaped was copied verbatim). 2015-11-26 19:00:47 +02:00
mrdudz
88e7b5776a some more fiddling 2015-11-22 19:02:47 +01:00
Greg King
3c8c62c6ab Fixed the ca65 Assembly-code variable ".paramcount".
Fixed how it's described in the ca65 document.
2015-11-17 14:21:40 -05:00
mrdudz
60285097e3 initial import of the gamate stuff 2015-11-14 13:15:29 +01:00