From a4a26910691de92569a0ff16dd0bf8a839073062 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 8 Dec 2022 16:43:35 +0900 Subject: [PATCH] New option to fix delay slot crap --- gas/config/tc-mips.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 83dacb2..e2f6caf 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -433,6 +433,8 @@ struct mips_set_options /* Non-zero if we should not autoextend mips16 instructions. Changed by `.set autoextend' and `.set noautoextend'. */ int noautoextend; + // hack for pm + int nogpopt; }; /* This is the struct we use to hold the current set of options. Note @@ -10287,6 +10289,10 @@ s_mipsset (x) mips_opts.noautoextend = 0; else if (strcmp (name, "noautoextend") == 0) mips_opts.noautoextend = 1; + else if (strcmp (name, "gpopt") == 0) + mips_opts.nogpopt = 0; + else if (strcmp (name, "nogpopt") == 0) + mips_opts.nogpopt = 1; else if (strcmp (name, "push") == 0) { struct mips_option_stack *s; @@ -10620,7 +10626,7 @@ nopic_need_relax (sym, before_relaxing) if (sym == 0) return 0; - if (USE_GLOBAL_POINTER_OPT) + if (USE_GLOBAL_POINTER_OPT && !mips_opts.nogpopt) { const char *symname; int change;