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
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue