This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Vector return on ARM

On May 12, 2005, at 10:34 AM, Josh Conner wrote:

On May 12, 2005, at 6:21 AM, Julian Brown wrote:

Paul Brook wrote:

Yes, Josh's patch doesn't break anything new, it just doesn't fix that particular vector return bug. I'll see if I can figure out what's going on with that.



This code in output_return_instruction() is making r3 be restored unnecessarily:

                  /* If we can't use ldmib (SA110 bug),
                     then try to pop r3 instead.  */
                  if (stack_adjust)
                    live_regs_mask |= 1 << 3;

Sure enough, there's a conflict of assumptions -- output_return_instruction() assumes that r3 can be safely clobbered (which it does to work around ldmib not behaving properly on SA-110 devices). And, use_return_insn() assumes that only r0 will be used for return values.

Attached is a patch that updates use_return_insn() so that it actually checks which registers are being used for return values (regtested on arm-none-elf with strictly better results). OK for mainline?

Do we also want to consider removing support for the SA110 workaround, or at least making it command-line conditional? The errata is against a fairly old set of rev A devices that have been replaced (see arm/sa110-update.pdf). The workaround does infer a slight penalty on anyone not using the erroneous device.

- Josh

2005-05-13 Josh Conner <>

        * config/arm/arm.c (use_return_insn): Include test of which
        registers are being used to hold return values, to accommodate
        vector return values.

Attachment: epilogue.patch
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]