This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: d30v bsr bundling problem
- To: rth at cygnus dot com
- Subject: Re: d30v bsr bundling problem
- From: Nick Clifton <nickc at cygnus dot com>
- Date: Fri, 21 Apr 2000 10:04:47 -0700
- CC: meissner at cygnus dot com, binutils at sourceware dot cygnus dot com
Hi Richard,
: bsr.s/fx foo
: ldw.s r34, @(sp+, r0)
:
: The assembler was bundling this as
:
: bsr.s/fx -> ldw.s
:
: which doesn't work, as the link register receives the address
: of the next bundle. This patch fixes it, but I'm uncertain
: what case the removed code was supposed to be handling. The
: comment doesn't seem to cover it.
:
: Thoughts?
:
: else if ((opcode1->op->flags_used & (FLAG_JMP | FLAG_JSR)
: ! && ((opcode1->op->flags_used & FLAG_DELAY) == 0)
: ! && ((opcode1->ecc == ECC_AL) || ! Optimizing))
: || opcode1->op->flags_used & FLAG_RP)
: {
: /* We must emit (non-delayed) branch type instructions
: --- 814,820 ----
: }
: }
: else if ((opcode1->op->flags_used & (FLAG_JMP | FLAG_JSR)
: ! && ((opcode1->op->flags_used & FLAG_DELAY) == 0))
: || opcode1->op->flags_used & FLAG_RP)
: {
: /* We must emit (non-delayed) branch type instructions
The deleted line was attempt to implement a feature requested by
Mitsubishi. They asked that GAS should:
> (A) Warn and avoid "Branches (always) -> Any inst."
> (B) Warn and avoid also "Branches (conditional) -> Any inst"
>
> We want GAS to use either of (A) or (B) depending on the given
> option. With -O specified, GAS use the rule (A): it warns and
> avoids codes like "bra -> add" whereas it accepts and produces code
> like "bra/tx -> bra". Without -O, on the other hand, GAS use the
> rule (B), so it warns and avoids code like "bra/tx ->bra".
It turns out however, that this line is unnecessary (and wrong) since
the test is only supposed to be performed on instructions whoes
packing has been explictly specified by the assembly language
programmer. [There is a duplicate of this line slightly earlier on in
the code that is correct. That line even has a comment associated
with it.]
So please do go ahead and apply your patch.
Cheers
Nick