Catherine Moore <clm@codesourcery.com> writes:
I've attached a new patch. It adds the testcases that you asked for
along with the other cleanups. I had trouble with one section -- this
first example:
.set noreorder
1: eret
.set reorder
b 1b
insns_between is called only when the the history insn is not in a
noreorder block.
Hmm, yeah. So the current code doesn't behave as I said after all. ;(
Sorry about that. Serves me right for going on memory.
I still think that what I said is what ought to happen. I can't see
any reason for the current approach to non-24k hazards, where we insert
nops between A and B iff _A_ is not in a noreorder block. Why should
A and B be assymetric in that way?
Since insn1 can't be null, this reduces to:
if (mips_fix_24k)
{
if (insn1->insn_opcode == INSN_ERET
|| insn1->insn_opcode == INSN_DERET)
{
if (insn2 == NULL
|| insn2->insn_opcode == INSN_ERET
|| insn2->insn_opcode == INSN_DERET
|| (insn2->insn_mo->pinfo
& (INSN_UNCOND_BRANCH_DELAY
| INSN_COND_BRANCH_DELAY
| INSN_COND_BRANCH_LIKELY)) != 0)
return 1;
}
}
The patch is OK to apply with those changes, assuming the patch
below goes in first.