mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 19:29:45 +00:00
Don't create code for a subtraction of zero
git-svn-id: svn://svn.cc65.org/cc65/trunk@267 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
f1a54412b7
commit
3b2f6679b5
@ -3191,6 +3191,11 @@ void g_inc (unsigned flags, unsigned long val)
|
||||
void g_dec (unsigned flags, unsigned long val)
|
||||
/* Decrement the primary register by a given number */
|
||||
{
|
||||
/* Don't dec by zero */
|
||||
if (val == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Generate code for the supported types */
|
||||
flags &= ~CF_CONST;
|
||||
switch (flags & CF_TYPE) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user