mirror of
https://github.com/cc65/cc65.git
synced 2024-12-27 15:29:46 +00:00
Merge pull request #2398 from acqn/OptFix
[cc65] Fixed optimization for char-size bitwise XOR/OR/AND when the rhs operand is complicated
This commit is contained in:
commit
d5c84e7828
@ -1488,7 +1488,7 @@ static const OptFuncDesc FuncTable[] = {
|
||||
};
|
||||
|
||||
static const OptFuncDesc FuncRegATable[] = {
|
||||
{ "tosandax", Opt_a_tosand, REG_NONE, OP_NONE },
|
||||
{ "tosandax", Opt_a_tosand, REG_NONE, OP_RHS_REMOVE_DIRECT | OP_RHS_LOAD_DIRECT },
|
||||
{ "toseqax", Opt_a_toseq, REG_NONE, OP_NONE },
|
||||
{ "tosgeax", Opt_a_tosuge, REG_NONE, OP_NONE },
|
||||
{ "tosgtax", Opt_a_tosugt, REG_NONE, OP_NONE },
|
||||
@ -1496,13 +1496,13 @@ static const OptFuncDesc FuncRegATable[] = {
|
||||
{ "tosleax", Opt_a_tosule, REG_NONE, OP_NONE },
|
||||
{ "tosltax", Opt_a_tosult, REG_NONE, OP_NONE },
|
||||
{ "tosneax", Opt_a_tosne, REG_NONE, OP_NONE },
|
||||
{ "tosorax", Opt_a_tosor, REG_NONE, OP_NONE },
|
||||
{ "tosorax", Opt_a_tosor, REG_NONE, OP_RHS_REMOVE_DIRECT | OP_RHS_LOAD_DIRECT },
|
||||
{ "tossubax", Opt_a_tossub, REG_NONE, OP_RHS_REMOVE_DIRECT | OP_RHS_LOAD_DIRECT },
|
||||
{ "tosugeax", Opt_a_tosuge, REG_NONE, OP_NONE },
|
||||
{ "tosugtax", Opt_a_tosugt, REG_NONE, OP_NONE },
|
||||
{ "tosuleax", Opt_a_tosule, REG_NONE, OP_NONE },
|
||||
{ "tosultax", Opt_a_tosult, REG_NONE, OP_NONE },
|
||||
{ "tosxorax", Opt_a_tosxor, REG_NONE, OP_NONE },
|
||||
{ "tosxorax", Opt_a_tosxor, REG_NONE, OP_RHS_REMOVE_DIRECT | OP_RHS_LOAD_DIRECT },
|
||||
};
|
||||
|
||||
#define FUNC_COUNT(Table) (sizeof(Table) / sizeof(Table[0]))
|
||||
|
@ -40,12 +40,5 @@ int main(void) {
|
||||
}
|
||||
printf("%d errors\n", fails);
|
||||
|
||||
#ifdef __OPT__
|
||||
return fails;
|
||||
#else
|
||||
/* Force exit failure on non-optimised version, which works,
|
||||
* otherwise it breaks the build
|
||||
*/
|
||||
return 1;
|
||||
#endif
|
||||
}
|
Loading…
Reference in New Issue
Block a user