1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-29 17:56:21 +00:00
cc65/test
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
..
asm Fixed paramcount build. 2020-10-03 14:55:30 +02:00
dasm Avoid cl65 in tests. 2020-08-26 20:39:34 +02:00
err CS_MergeLabels: Keep labels referenced by data 2020-10-08 12:11:03 +02:00
misc Fix ICE for bit-fields with typedef 2020-10-03 15:04:31 +02:00
ref Change line endings from CRLF to LF 2020-09-04 14:01:21 +02:00
todo Add test for issue #1310 2020-11-01 19:09:20 +01:00
val Use u16 codegen for u8 x u8 ops 2020-11-09 21:19:22 +01:00
.gitignore
CPYRIGHT.LCC
isequal.c
Makefile
readme.txt fix typo 2020-09-23 23:51:37 +02:00

This directory contains test code for automatic regression testing of the CC65
compiler.


/val  - The bulk of tests are contained here, individual tests should exit with
        an exit code of EXIT_SUCCESS when they pass, or EXIT_FAILURE on error.

/ref  - These tests produce output that must be compared with reference output.

/err  - contains tests that MUST NOT compile

/todo - These tests fail due to open compiler issues.

        The makefile in this directory _expects_ the tests to fail, because of
        that when an issue was fixed it will break the CI. The test should get 
        moved to /val in the PR fixing the issue, which will make CI pass again.
        No changes to makefiles are required!

/asm  - contains the assembler regression tests

/dasm - contains the disassembler regression tests

/misc - a few tests that need special care of some sort

        Tests that (incorrectly) fail to compile and other tests that fail and
        do NOT return an exit code are collected here. The makefile _expects_
        those tests to fail, so when an issue is fixed it will break the CI.
        When this happens, the PR fixing the issue should also "invert" the
        failing condition in the makefile by adding a $(NOT) before the
        offending line (or removing it when it is already there), which will
        make the CI pass again. The test should then be moved elsewhere later,
        which will require additional changes to the makefile(s).


To run the tests use "make" in this (top) directory, the makefile should exit
with no error.

When a test failed you can use "make continue" to run further tests.

--------------------------------------------------------------------------------

TODO:

- reduce usage of "common.h" to a minimum
- convert more tests from using reference output to returning an exit code