1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-05 06:28:57 +00:00
cc65/test/val
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
..
add1.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
add2.c use uint16_t instead of magic ifdefs, leaving support for bit type in there incase we support it some day 2020-07-22 00:09:48 +02:00
add3.c added makefile and common include 2014-11-22 16:59:31 +01:00
add3a.c Removed executable bit. 2020-07-12 23:11:43 +02:00
add4.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
add5.c Added a cc65 regression test for pointer and offset addition operations. 2016-01-01 11:39:55 -05:00
and1.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
and2.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
anon-struct1.c Made a C union declaration know the sizes of anonymous struct/union members when it determines its size. 2018-05-13 18:54:45 -04:00
anon-struct2.c Made a C union declaration know the sizes of anonymous struct/union members when it determines its size. 2018-05-13 18:54:45 -04:00
assign-use1.c Fixed a bug that didn't preserve the accumulator's value when a simple 16-bit fetch-and-store is optimized. (#637) 2018-05-12 13:46:16 -04:00
atoi-test.c move a bunch of tests from testcode/lib to test/val (and a failing one to test/todo) 2020-07-13 21:25:13 +02:00
binlit.c binlit: Add a few random leading zeros 2019-07-20 17:21:42 +02:00
bitfield-union.c Add test of union of bit-field from mailing list 2020-08-17 09:54:31 +02:00
bitfield.c change "the cc65 authors" to "The cc65 Authors" as per jmrs request 2020-08-18 22:41:42 +02:00
bool1.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
bool3.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
bss-name-decl.c Fix regression of #pragma bss-name 2017-03-21 22:35:25 +01:00
bss-name.c Fix regression of #pragma bss-name 2017-03-21 22:35:25 +01:00
bug170.c Use C89 semantics for integer conversions 2020-08-15 19:14:31 +02:00
bug250.c Moved bug250.c to test/val as it is fixed. 2020-08-26 09:40:32 +08:00
bug327.c Fixed Issue #327. 2020-08-22 13:44:18 +02:00
bug367.c Fix for multiplication optimization issue #367 2019-04-02 16:34:22 +02:00
bug735.c Testcase added. 2018-10-16 09:45:30 +02:00
bug830.c Fix for #830 supplied by UvB 2019-04-25 15:19:53 +02:00
bug895.c bug895 test: more specific description comment 2019-05-27 10:03:25 +02:00
bug975.c move (now working) tests to test/val 2020-07-21 19:24:39 +02:00
bug1047.c Allow char bit-fields 2020-09-08 14:24:04 +02:00
bug1050.c Add enum size test case for #1050 2020-08-02 01:18:28 +02:00
bug1071.c test related to issue #1071 2020-07-09 15:57:51 +02:00
bug1075.c move test for issue #1075 to test/var 2020-07-21 20:02:51 +02:00
bug1077.c move test for issue #1077 to test/val 2020-07-22 15:12:02 +02:00
bug1094.c Fix ICE for bit-fields with typedef 2020-10-03 15:04:31 +02:00
bug1095.c change "the cc65 authors" to "The cc65 Authors" as per jmrs request 2020-08-18 22:41:42 +02:00
bug1108.c Made a regression test increment a variable after, instead of before, using it. 2020-07-20 17:16:11 -04:00
bug1139.c Handle bit-field test after shift/mask 2020-07-31 19:33:28 +02:00
bug1143warn.c added test related to issue #1143 2020-08-18 00:40:29 +02:00
bug1178.c added test related to issue #1178 2020-08-14 19:58:58 +02:00
bug1181.c added test related to issue #1181 2020-08-14 16:12:17 +02:00
bug1201.c added test related to issue #1201 2020-08-26 23:20:28 +02:00
bug1211-ice-move-refs-1.c CS_MergeLabels: Keep labels referenced by data 2020-10-08 12:11:03 +02:00
bug1221.c test related to issue #1221 2020-09-24 00:08:36 +02:00
bug1222.c test related to issue #1222 2020-09-24 12:23:18 +02:00
bug1244.c test related to issue #1244 2020-09-23 23:57:36 +02:00
bug1245.c test related to issue #1245 2020-09-23 23:57:25 +02:00
bug1267.c Fix ICE for bit-fields with typedef 2020-10-03 15:04:31 +02:00
call1.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
casttochar.c Removed executable bit. 2020-07-12 23:11:43 +02:00
cc65091020.c removed common.h reference 2014-11-23 12:50:47 +01:00
cc65141002.c Removed executable bit. 2020-07-12 23:11:43 +02:00
cc65141011.c Removed executable bit. 2020-07-12 23:11:43 +02:00
cc65141022.c Removed executable bit. 2020-07-12 23:11:43 +02:00
cc65150311.c patch from Uz that makes some illegal operations on pointers error out 2015-07-10 14:27:49 +02:00
char-bitfield.c Allow char bit-fields 2020-09-08 14:24:04 +02:00
char-promote.c Use u16 codegen for u8 x u8 ops 2020-11-09 21:19:22 +01:00
common.h added makefile and common include 2014-11-22 17:02:46 +01:00
compare1.c Changed most "backticks" (grave accents) into apostrophes. 2019-01-05 14:57:12 -05:00
compare2.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
compare3.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
compare4.c use uint16_t instead of magic ifdefs, leaving support for bit type in there incase we support it some day 2020-07-22 00:09:48 +02:00
compare5.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
compare6.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
compare7.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
compare8.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
compare9.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
compare10.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
computedgoto.c again, some TABs slipped into the code... 2019-04-30 18:21:13 +02:00
cq4.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq9.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq22.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq25.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq26.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq61.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq71.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq72.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq81.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq84.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq85.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq86.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq88.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq241.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq243.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq244.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq626.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq714.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq714b.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq715.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq757.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
cq7813.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
div-char-char.c tests for issue #169 2020-07-09 16:05:57 +02:00
div-common.h tests for issue #169 2020-07-09 16:05:57 +02:00
div-int-int.c tests for issue #169 2020-07-09 16:05:57 +02:00
div-long-long.c tests for issue #169 2020-07-09 16:05:57 +02:00
duffs-device.c Added Duff's Device to tests. 2016-08-15 11:26:03 -07:00
enum-bitfield.c Allow char bit-fields 2020-09-08 14:24:04 +02:00
fields.c move (now working) tests to test/val 2020-07-21 19:24:39 +02:00
for.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
jmp-callax.c again, some TABs slipped into the code... 2019-04-30 18:21:13 +02:00
lib_common_atoi.c Added further optimizations and unit tests. 2017-03-05 02:09:12 +01:00
lib_common_ctype.c Changes resulting from 2nd code review 2020-02-03 20:45:09 +01:00
lib_common_memmove.c Removed workaround. 2017-04-04 15:45:24 +02:00
lib_common_mulxx.c Code review adaptations, removed "cc65_" prefix from functions 2019-03-29 22:53:04 +01:00
lib_common_strcat.c Removed workaround. 2017-04-04 15:51:00 +02:00
lib_common_strchr.c Added further optimizations and unit tests. 2017-03-05 02:09:12 +01:00
lib_common_strcspn.c Removed workaround. 2017-04-04 15:52:01 +02:00
lib_common_strncat.c Removed workaround. 2017-04-04 15:52:37 +02:00
lib_common_strol.c Added further optimizations and unit tests. 2017-03-05 02:09:12 +01:00
lib_common_strrchr.c Added further optimizations and unit tests. 2017-03-05 02:09:12 +01:00
lib_common_strspn.c Removed workaround. 2017-04-04 15:53:14 +02:00
lib_common_strtoul.c Added further optimizations and unit tests. 2017-03-05 02:09:12 +01:00
lz4.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
Makefile Avoid cl65 in tests. 2020-08-26 20:39:34 +02:00
mult1.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
nestfor.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
or1.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
plain-int-bitfield.c change "the cc65 authors" to "The cc65 Authors" as per jmrs request 2020-08-18 22:41:42 +02:00
pointed-array.c Removed some trailing whitespace; and, expanded a tab. 2015-07-01 10:09:11 -04:00
pointer1.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
postdec-8-8.c added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
postdec-8-16.c added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
postdec-16-8.c added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
postdec-16-16.c added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
postinc-8-8.c added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
postinc-8-16.c added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
postinc-16-8.c added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
postinc-16-16.c added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
postincdec.c remote TABs in doc/ and test/ 2019-02-12 22:50:49 +01:00
pptest1.c reworked pptest1/4/5 into executable tests and moved to test/val 2020-07-21 14:58:15 +02:00
pptest3.c reworked pptest3 into an exectutable test and moved to test/val 2020-07-21 15:30:35 +02:00
pptest4.c reworked pptest1/4/5 into executable tests and moved to test/val 2020-07-21 14:58:15 +02:00
pptest5.c reworked pptest1/4/5 into executable tests and moved to test/val 2020-07-21 14:58:15 +02:00
pr1102.c added a test related to pr#1102 - we can now return structs by value when they are max. 4 bytes 2020-07-21 21:04:41 +02:00
pr1110a.c added tests related to pr #1110 2020-07-22 15:52:04 +02:00
predec-8-8.c added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
predec-8-16.c added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
predec-16-8.c added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
predec-16-16.c added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
preinc-8-8.c added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
preinc-8-16.c added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
preinc-16-8.c added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
preinc-16-16.c added various tests related to bug #1045 2020-06-23 00:46:12 +02:00
ptrfunc.c remove ifdef magic 2020-07-22 00:21:23 +02:00
rand.c rand() use XOR to break up unwanted pair correlation (#1107) 2020-07-21 23:38:18 +02:00
return-struct.c move/fix bug264.c as suggested in issue #1122 2020-08-19 22:25:18 +02:00
rotate1.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
rotate2.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
rotate3.c use uint16_t instead of magic ifdefs, leaving support for bit type in there incase we support it some day 2020-07-22 00:09:48 +02:00
rotate4.c use uint16_t instead of magic ifdefs, leaving support for bit type in there incase we support it some day 2020-07-22 00:09:48 +02:00
rotate5.c use uint16_t instead of magic ifdefs, leaving support for bit type in there incase we support it some day 2020-07-22 00:09:48 +02:00
rotate6.c use uint16_t instead of magic ifdefs, leaving support for bit type in there incase we support it some day 2020-07-22 00:09:48 +02:00
rotate7.c use uint16_t instead of magic ifdefs, leaving support for bit type in there incase we support it some day 2020-07-22 00:09:48 +02:00
rotate8.c Added a regression test program for the changes in the right-shift optimizer. 2015-12-14 11:46:30 -05:00
shift-test.c move a bunch of tests from testcode/lib to test/val (and a failing one to test/todo) 2020-07-13 21:25:13 +02:00
signal-test.c some tweaks to the moved tests to make them more suitable for automatic testing 2020-07-13 21:26:07 +02:00
snprintf-test.c some tweaks to the moved tests to make them more suitable for automatic testing 2020-07-13 21:26:07 +02:00
static-1.c Improved test case for Issue #191. 2020-08-14 18:33:54 +02:00
static-fwd-decl.c Add regression test for #204. 2017-03-09 20:40:20 +01:00
staticassert.c change "the cc65 authors" to "The cc65 Authors" as per jmrs request 2020-08-18 22:41:42 +02:00
strncmp-test.c some tweaks to the moved tests to make them more suitable for automatic testing 2020-07-13 21:26:07 +02:00
strnicmp-test.c some tweaks to the moved tests to make them more suitable for automatic testing 2020-07-13 21:26:07 +02:00
strpbrk-test.c some tweaks to the moved tests to make them more suitable for automatic testing 2020-07-13 21:26:07 +02:00
strtol-test.c move a bunch of tests from testcode/lib to test/val (and a failing one to test/todo) 2020-07-13 21:25:13 +02:00
strtoul-test.c move a bunch of tests from testcode/lib to test/val (and a failing one to test/todo) 2020-07-13 21:25:13 +02:00
struct1.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
sub1.c use uint16_t instead of magic ifdefs, leaving support for bit type in there incase we support it some day 2020-07-22 00:09:48 +02:00
sub2.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
switch1.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00
switch2.c Updated switch statement comments. 2016-08-19 20:21:10 -07:00
time-test.c some tweaks to the moved tests to make them more suitable for automatic testing 2020-07-13 21:26:07 +02:00
time.c Increased consistency. 2018-08-02 15:45:57 +02:00
trampoline-params.c Changed empty parameter lists into (void) lists on functions with asm() statements. 2019-07-16 13:16:02 -04:00
trampoline-varargs.c Changed empty parameter lists into (void) lists on functions with asm() statements. 2019-07-16 13:16:02 -04:00
trampoline.c Changed empty parameter lists into (void) lists on functions with asm() statements. 2019-07-16 13:16:02 -04:00
unittest.h Added further optimizations and unit tests. 2017-03-05 02:09:12 +01:00
void-size1.c Made C's sizeof operator work with initialized void variables. 2017-03-12 14:41:32 -04:00
while.c Fixed the handling of "while (0) {}". 2017-04-07 09:26:58 -04:00
xor.c added tests as prepared by oliver 2014-09-25 21:38:34 +02:00