1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-28 19:29:53 +00:00
Commit Graph

8601 Commits

Author SHA1 Message Date
Jesse Rosenstock
878e4a57c8 Make Makefiles more -j friendly
Add .$1.$2 to outputs missing them.
2020-07-10 13:08:19 +02:00
Jesse Rosenstock
f5afc75cbd ar65/LibClose: Include filename in error messages
```
ar65: Error: Problem deleting temporary library file '../lib/apple2enh.lib.temp': No such file or directory
```
is the error I'm getting with `make -j 19` when trying
to debug #1080.
2020-07-09 21:56:02 +02:00
mrdudz
579b50f0c5 test for issue #927 2020-07-09 16:18:08 +02:00
mrdudz
2428285694 test for issue #327 2020-07-09 16:17:31 +02:00
mrdudz
ff18218b0a test for issue #170 2020-07-09 16:17:16 +02:00
mrdudz
5925a7f8ee test for issue #1077 2020-07-09 16:16:46 +02:00
mrdudz
4b8b15a07a tests for issue #169 2020-07-09 16:05:57 +02:00
mrdudz
93f0df58e5 test related to issue #1071 2020-07-09 15:57:51 +02:00
acqn
85e73e91f8 Only enable signed div replacements with shift according to the code size factor settings.
Also with better comments.
2020-07-09 10:00:50 +02:00
acqn
09bcff0862 Added support for changing divisions by negative power-of-2 denominators into bit shifts,
and fixed #169 including the case of -2147483648 which is negative but appears positive.
2020-07-09 10:00:50 +02:00
acqn
30835e3d9d More optimized codegen for the correct cases of the Issue #169 fix. 2020-07-09 10:00:50 +02:00
acqn
e98fe04cc2 Almost fixed Issue #169. The only denominator not working right now is -2147483648. 2020-07-09 10:00:50 +02:00
Jesse Rosenstock
82c8bd6e2b Replace unary negation with subtraction
Remove MSVC pragma.
2020-07-09 09:49:24 +02:00
Jesse Rosenstock
2c16453a9f Guard MSVC pragma with ifdef _MSC_VER
Fix broken travis-ci with gcc -Werror [-Werror=unknown-pragmas].
2020-07-09 09:49:24 +02:00
Jesse Rosenstock
9e5b8d99a3 Fix MSVC build broken by #1058
MSVC complains about unary negation of unsigned, but it's
intended.  Suppress the warning.

https://github.com/cc65/cc65/pull/1058#discussion_r451757967

"Tested" with godbolt.org.
2020-07-09 09:49:24 +02:00
Jesse Rosenstock
359da1ae76 Update bit-field tests after #1058 merge 2020-07-08 17:20:15 +02:00
Jesse Rosenstock
8449c9eaa0 Add zlib license text 2020-07-08 17:20:15 +02:00
Jesse Rosenstock
532e6b2554 Add copyright notice 2020-07-08 17:20:15 +02:00
Jesse Rosenstock
6f85ee9d95 Add another test for bit-field unit overlap
Test when there is another field after bit-fields with
allocation unit overlap.
2020-07-08 17:20:15 +02:00
Jesse Rosenstock
2f456ce4e2 Add comment explaining four_bits_with_int 2020-07-08 17:20:15 +02:00
Jesse Rosenstock
8a331ee7ec Print to stdout instead of stderr
Print number of failures.

This makes it consistent with the other val/ tests.
2020-07-08 17:20:15 +02:00
Jesse Rosenstock
a70ac6be30 Add test of bit-field packing for #1054 and #1055 2020-07-08 17:20:15 +02:00
Jesse Rosenstock
6dc2bf1226 Rename PaddingBitWidth to PaddingBits 2020-07-08 16:46:34 +02:00
Jesse Rosenstock
9858e47dfd Pad bit-fields only to the next byte
Fixes #1054.

Previously, bit-fields followed by another field were aligned
to two bytes.  Bit-fields ending the struct were (and continue
to be) aligned only to a single byte.

```
struct s {
  unsigned int x : 4;
};

struct t {
  unsigned int x : 4;
  unsigned int y;
};
```

Before: `sizeof(struct s) == 1`, sizeof(struct t) == 4`
After: `sizeof(struct s) == 1` sizeof(struct t) == 3`
2020-07-08 16:46:34 +02:00
Jesse Rosenstock
9e881a497e Fix formatting 2020-07-08 16:45:00 +02:00
Jesse Rosenstock
c273c90bf2 Fix formatting 2020-07-08 16:45:00 +02:00
Jesse Rosenstock
527df094ca Use xrealloc in cl65
Previously, xmalloc and xfree were used.
2020-07-08 16:45:00 +02:00
Jesse Rosenstock
416adbce82 Add blank line 2020-07-08 16:44:06 +02:00
Jesse Rosenstock
021362fb75 cl65: Remove temporary .o files 2020-07-08 16:44:06 +02:00
Greg King
410e4502ee Added a 160x192x2 TGI (graphics) driver to the VIC-20 library.
The driver requires a special linker configuration: "vic20-tgi.cfg".
The VIC-20 computer needs at least 8K of expansion RAM!

"tgidemo.c" needed to be adjusted because the VIC-20's vertical (y) range is greater than its horizontal (x) range -- the opposite of most other platforms.  Also, the circle demo would jam on the VIC-20.
2020-07-08 05:55:30 -04:00
mrdudz
d1833cc441 Fix handling of charcodes 254 and 255, fixes issue #988 2020-07-08 00:48:39 +02:00
acqn
539924249b More complete fix for Issue #1071. 2020-07-07 18:28:56 +02:00
acqn
286da30a26 Quick fix for Issue #1071. 2020-07-07 18:28:56 +02:00
Daniel Serpell
17c5504129 In Atari XEX output format, join memory areas if possible.
This makes executables shorter if two memory areas are consecutive.
2020-07-04 23:28:10 +02:00
Oliver Schmidt
0f8b587bc2 Added directory for currently failing regression tests. 2020-07-01 00:13:55 +02:00
Jesse Rosenstock
8891a896b5 test/ref: Use separate .out files
Use different .out files for different options / targets.
This allows make -j N to work.

Previously all test.*.*.prgs would use the same test.out file.
Now test.*.*.out is also used.
2020-06-29 22:34:44 +02:00
Jesse Rosenstock
d31171164e Fix formatting 2020-06-29 14:49:36 -04:00
Jesse Rosenstock
fae25bc459 CHECK we have at most a partial byte 2020-06-29 14:49:36 -04:00
Jesse Rosenstock
f4a6d08847 Fix full bytes vs full word in comment 2020-06-29 14:49:36 -04:00
Jesse Rosenstock
a00611798d Output bit-field data as chars instead of ints
This prepares for #1058, which will pad bit-fields only to
the next byte, instead of the next sizeof(int) (two bytes).

OutputBitFieldData now outputs chars instead of ints, and
calls to this function loop until there is less than one byte
to output.  A final partial byte is written out with zero padding
as a final partial int was previously.
2020-06-29 14:49:36 -04:00
Jesse Rosenstock
90d1c89bff
Allow overlap of bit-field storage units (#1055)
* Allow overlap of bit-field storage units

Previously,
struct s {
    unsigned int x : 10;
    unsigned int y : 10;
};
had sizeof(struct s) == 4.

With this change, allow the storage units of x and y to overlap,
so sizeof(struct s) == 3, with y stored immediately after x,
with no padding between them.

An int bit-field (the only type currently supported) will still
never occupy more than two bytes.

* ParseStructInit: Fix typo and expand comment

Explain why there are at most 30, not 32 bits.

* ParseStructDecl: Rewrite AddBitFieldCall

No behavior change.

Co-authored-by: Jesse Rosenstock <jmr@users.noreply.github.com>
2020-06-27 15:02:11 +02:00
Oliver Schmidt
5277ea0b73 Add test license description. 2020-06-27 02:23:40 +02:00
Jesse Rosenstock
18246278c5 switch2.c: Remove use of REFCC and UNSIGNED_CHARS
Explicitly use `signed char` or `unsigned char`, rather than
```

signed char k;
char k;

signed char k;
char k;
```
This should have resulted in the same thing; however, note that
`REFCC` was never defined, and `common.h` was not included, so
the old code in fact tested `char` then `unsigned char`,
which are the same.

The only difference is that a switch using plain `char` is not
tested, but since this is the same as either `signed char` or
`unsigned char`, the lack of test coverage seems relatively safe.
2020-06-25 13:18:08 +02:00
Jesse Rosenstock
8fe317e7fa Remove REFCC_UNSIGNED_CHARS from test/ref/
Explicitly use signed char or unsigned char for REFCC.
2020-06-25 13:18:08 +02:00
Jesse Rosenstock
86ba877a99 Define REFCC and REFCC_UNSIGNED_CHARS in reference
switch2.c uses these macros.  With them unset, signed chars
are not tested.
2020-06-25 13:18:08 +02:00
mrdudz
6e6ce4e5ee added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
Dirk Jagdmann
aaecf3cfec replace JMP with BEQ to save 1 byte. 2020-06-22 23:55:45 +02:00
Dirk Jagdmann
3cbe485b94 fix description of Kerberos memory 2020-06-22 23:55:45 +02:00
Dirk Jagdmann
6465c3b687 change order of declarations. 2020-06-22 23:55:45 +02:00
Dirk Jagdmann
9227b0ccaf sort items 2020-06-22 23:55:45 +02:00