sim: ppc: igen: fix -G handling

We weren't using the enable_p flag to see whether the option should
be enabled or disabled, and we weren't breaking out when done parsing.
This commit is contained in:
Mike Frysinger 2023-12-21 21:04:44 -05:00
parent 3744b73e3b
commit 866a2ad35b

View File

@ -439,15 +439,22 @@ main(int argc,
{
case '=':
icache_size = atoi (argp + strlen ("gen-icache") + 1);
code |= generate_with_icache;
if (enable_p)
code |= generate_with_icache;
else
code &= ~generate_with_icache;
break;
case '\0':
code |= generate_with_icache;
if (enable_p)
code |= generate_with_icache;
else
code &= ~generate_with_icache;
break;
default:
error ("Expecting -Ggen-icache or -Ggen-icache=<N>\n");
}
}
break;
}
case 'I':
{