aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2023-12-21 21:04:44 -0500
committerMike Frysinger <vapier@gentoo.org>2023-12-21 21:04:44 -0500
commit866a2ad35b75cbc60260c00b82bec2243877355f (patch)
treedd8508d3e0a8cffb1deab99d540d68b364443b27 /sim/ppc
parent3744b73e3bf74a6013661cdb76c8c5ae326cb403 (diff)
downloadgdb-866a2ad35b75cbc60260c00b82bec2243877355f.zip
gdb-866a2ad35b75cbc60260c00b82bec2243877355f.tar.gz
gdb-866a2ad35b75cbc60260c00b82bec2243877355f.tar.bz2
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.
Diffstat (limited to 'sim/ppc')
-rw-r--r--sim/ppc/igen.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sim/ppc/igen.c b/sim/ppc/igen.c
index 8aa19c7..9f64244 100644
--- a/sim/ppc/igen.c
+++ b/sim/ppc/igen.c
@@ -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':
{