1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-30 01:29:37 +00:00
Commit Graph

311 Commits

Author SHA1 Message Date
mrdudz
cc040ca04a remove, fucking git 2021-03-19 23:39:56 +01:00
mrdudz
57e69d9647 test related to pr #1425 2021-03-19 23:35:34 +01:00
mrdudz
9ec9d1e20c test for issue #1431 / pr #1424 2021-03-19 20:53:52 +01:00
acqn
6f5ad51816 Added testcase for Issue #1408. 2021-02-23 22:06:21 +01:00
acqn
f1c715c455 Fixed a bug that pointer subtraction results from two absolute addresses are calculated as unsigned long. 2021-02-22 14:14:59 -05:00
acqn
da4cc08b78 Moved and improved test case for Issue #1310. 2021-02-22 14:14:59 -05:00
acqn
24985f1b33 Added testcase for the "deferred ops in unevaluated context" bug. 2021-02-22 11:02:47 +01:00
acqn
131f96eb1e Moved testcase for issue #1397. 2021-02-17 07:03:11 -05:00
mrdudz
ab8bb26868 added testcase for issue #1937 2021-02-09 19:50:08 +01:00
acqn
95830cce29 Fixed test/misc/bug1265.c with its output. 2021-01-30 14:31:51 +01:00
acqn
a040c28cc4 Moved test for #1374. 2021-01-19 14:33:27 +01:00
mrdudz
0846219672 added testprogram for issue #1374 2021-01-16 16:40:58 +01:00
Christian Groessler
ef258bdc19 remove TABs which again slipped in.... 2020-12-25 07:16:26 +01:00
Greg King
b2c1a77bb3 Fixed the cc65 code that optimizes 16-bit compares when the high bytes are known to be equal.
Only the low bytes are compared.  Originally, signed 16-bit compares were optimized into signed 8-bit compares.  But, the sign bits are in the high bytes; and, they're equal.  Therefore, the low bytes always must be compared as unsigned numbers.
Fixes #1348.
2020-12-24 12:27:09 -05:00
Greg King
8b42f570e9 Fixed code that caused a seg-fault after parsing a (deferred) post-count argument followed by a (nested) function-call argument.
The old broken code defers the count until the end of the (parent function's) argument list.  But, a nested function call clears the pointer to the deferred type.  That leads to an access violation.
The new code defers only until the end of each argument.  Fixes #1320.
2020-11-20 17:45:14 -05:00
mrdudz
c11e389a94 move testcase for issue #1320 into test/misc 2020-11-20 17:25:10 +01:00
mrdudz
0d46af2e9c Merge branch 'master' of https://github.com/cc65/cc65 2020-11-19 23:12:46 +01:00
mrdudz
23273584a0 testcase for issue #1348 2020-11-19 23:12:16 +01:00
Zsolt Branyiczky
032b4e3979 Fixed typo 2020-11-19 22:02:07 +01:00
Zsolt Branyiczky
36f5dcbb6e added 6502dtv opdoces testcases and corrected cpudetect 2020-11-19 22:02:07 +01:00
Zsolt Branyiczky
1c5c07406c cpudetect.s needs this file to run its test for 6502dtv cpu 2020-11-19 22:02:07 +01:00
Zsolt Branyiczky
843b94388a added asm test for 6502DTV cpu 2020-11-19 22:02:07 +01:00
Greg King
5ba16654a3 Refined the hints about making new test reference files. 2020-11-17 15:06:05 -05:00
Greg King
b0497f40b2 'test/isequal.c' doesn't change. Don't rebuild it for each test subdirectory. 2020-11-17 13:40:36 -05:00
Greg King
47bceb0eab Streamlined some makefiles.
foreach isn't needed because make automatically iterates through lists of words when substituting patterns.
2020-11-17 13:34:22 -05:00
Greg King
2ffb6af5d9 Simplified a bug test. Gave it an appropriate description, 2020-11-17 08:15:34 -05:00
Jesse Rosenstock
68cb15d0f9 Add test case for #1320
From https://github.com/cc65/cc65/issues/1320#issuecomment-726866015
2020-11-17 09:45:02 +01:00
Jesse Rosenstock
c2c73e7d06 Move #1332 test from todo/ to val/
This bug was fixed by 2915464.
2020-11-16 03:23:52 -05:00
Jesse Rosenstock
83ac2755fe Add test case for #1332 2020-11-15 21:32:45 +01:00
Jesse Rosenstock
93145246fd Add tests for u8 op s16_const
Test expressions like `unsigned char x = ...; ... = x / 2;`
These use `int` constants with values representable by
`unsigned int` / `unsigned char`, so using unsigned codegen should
be possible.

Additional tests for #1308.  These are things we want to generate better
code for, so add tests that the behavior doesn't change.
2020-11-09 21:20:16 +01:00
Jesse Rosenstock
5db74b4b19 Use u16 codegen for u8 x u8 ops
In g_typeadjust, before we apply the integral promotions, we check if
both types are unsigned char.  If so, we promote to unsigned int, rather
than int, which would be chosen by the standard rules.  This is only a
performance optimization and does not affect correctness, as the flags
returned by g_typeadjust are only used for code generation, and not to
determine types of other expressions containing this one.  All unsigned
char bit-patterns are valid as both int and unsigned int and represent
the same value, so either signed or unsigned int operations can be used.
This special case part is not duplicated by ArithmeticConvert.

Partial fix for #1308.
2020-11-09 21:19:22 +01:00
Jesse Rosenstock
0e482c7f92 Add test for issue #1310 2020-11-01 19:09:20 +01:00
Jesse Rosenstock
a686988d0e Add test cases for integral promotion of chars
Both signed and unsigned chars are promoted to int by C's evaluation
rules.  It is more efficient to use unsigned operations when possible,
however.  These tests will help test the correctness of optimizations
doing that.  See #1308.
2020-10-29 13:54:37 +01:00
Jesse Rosenstock
81550ca1ee CS_MergeLabels: Keep labels referenced by data
Partial fix for ICE in #1211.  This may fix enough to allow #1049 to be
fixed.

When merging labels, keep the first label with a ref that has no JumpTo;
this is a data segment label, used by computed gotos.

The real fix is to track and rewrite labels in data, but this is more
involved.
2020-10-08 12:11:03 +02:00
Jesse Rosenstock
b931e65811 Fix ICE for bit-fields with typedef
Fixes #1267

Avoid ICE, but treat plain int bit-fields declared via typedef as
signed rather than unsigned.  It is more efficient to treat them
as unsigned, but this requires distinguishing int from signed int,
and this is curently not done.
2020-10-03 15:04:31 +02:00
Oliver Schmidt
4acdc9ced9 Fixed paramcount build. 2020-10-03 14:55:30 +02:00
mrdudz
b549e83fb2 move program from testcode/assembler to test/asm and remove testcode/assembler 2020-09-29 19:03:42 +02:00
mrdudz
34177d9edd test related to issue #1094 2020-09-25 20:08:32 +02:00
mrdudz
7ff08c85cf Merge branch 'master' of https://github.com/cc65/cc65 2020-09-25 16:25:53 +02:00
mrdudz
61d934fd7b test related to issue #1265 2020-09-25 16:25:32 +02:00
Greg King
47ee179273 Fixed a copy & paste error in the test/misc/ makefile.
Fixed a warning that's changed to an error in Travis CI tests.
2020-09-25 00:31:07 -04:00
mrdudz
5ba9d28488 test related to pr #1189 2020-09-24 16:16:16 +02:00
mrdudz
97a1093ee0 test related to issue #1222 2020-09-24 12:23:18 +02:00
mrdudz
a86644eff1 test related to issue #1221 2020-09-24 00:08:36 +02:00
mrdudz
b3491e3d9a test related to issue #1244 2020-09-23 23:57:36 +02:00
mrdudz
46ebb15c76 test related to issue #1245 2020-09-23 23:57:25 +02:00
mrdudz
6fdd90fa63 fix typo 2020-09-23 23:51:37 +02:00
mrdudz
99121688f8 added test related to issue #1263 2020-09-23 23:51:24 +02:00
Jesse Rosenstock
4e4e4c2d21 Allow char bit-fields
These are not required to be supported (only int, signed int, and
unsigned int are required), but most compilers support it.

https://port70.net/~nsz/c/c89/c89-draft.html#3.5.2.1
https://port70.net/~nsz/c/c89/c89-draft.html#A.6.5.8

For consistency with other integral types, plain `char` bit-fields
are unsigned, regardless of the `--signed-chars` option.

Fixes #1047
2020-09-08 14:24:04 +02:00
Jesse Rosenstock
9a0e4a35e1 Fix enum bit-field ICE #1244
This previously resulted in an ICE:
cc65: Check failed: (Entry->Type->C & T_MASK_SIGN) == T_SIGN_SIGNED,
file 'cc65/symtab.c', line 874

This CHECK is in the code that deals with changing `int` bitfields to
`unsigned int`.

Work around this by treating enum bit-fields as having their signedness
specified, so this type change code does not get called.

Fixes #1244.
2020-09-07 11:21:23 +02:00