This is the mail archive of the mailing list for the binutils 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: [RFA] MIPS 24K Errata Patch

Hi Richard,
I've attached updated patches for the testsuite and the assembler. I think that I've addressed all of your comments. Do these new patches now look okay?

2011-04-19  Catherine Moore  <>
            David Ung <>

        * config/mips.c (mips_cl_insn): Add new field complete_p.
        (create_insn): Initialize complete_p to zero.
        (BASE_REG_EQ): New.
        (fix_24k_align_to): New.
        (store_info): Declare.
        (fix_24k_sort): New.
        (setup_24k_position_info): New.
        (nops_for_24k): New.
        (nops_for_insn): Call nops_for_24k.
        (append_insn): Move O_constant expression handling.
        Check for stores and mfix-24k.

2011-04-19  Catherine Moore  <>
            David Ung <>

        * gas/mips/24k-branch-delay-1.d: New.
        * gas/mips/24k-branch-delay-1.s: New.
        * gas/mips/24k-triple-stores-1.d: New.
        * gas/mips/24k-triple-stores-1.s: New.
        * gas/mips/24k-triple-stores-2.d: New.
        * gas/mips/24k-triple-stores-2.s: New.
        * gas/mips/24k-triple-stores-3.d: New.
        * gas/mips/24k-triple-stores-3.s: New.
        * gas/mips/24k-triple-stores-4.s: New.
        * gas/mips/24k-triple-stores-4.d: New.
        * gas/mips/24k-triple-stores-5.d: New.
        * gas/mips/24k-triple-stores-5.s: New.
        * gas/mips/24k-triple-stores-6.d: New.
        * gas/mips/24k-triple-stores-6.s: New.
        * gas/mips/24k-triple-stores-7.d: New.
        * gas/mips/24k-triple-stores-7.s: New.
        * gas/mips/24k-triple-stores-8.d: New.
        * gas/mips/24k-triple-stores-8.s: New.
        * gas/mips/24k-triple-stores-9.d: New.
        * gas/mips/24k-triple-stores-9.s: New.
        * gas/mips/24k-triple-stores-10.d: New.
        * gas/mips/24k-triple-stores-10.s: New.
        * gas/mips/24k-triple-stores-11.d: New.
        * gas/mips/24k-triple-stores-11.s: New.
        * gas/mips/mips.exp: Invoke new tests.

On 04/14/2011 04:15 PM, Richard Sandiford wrote:
Catherine Moore<> writes:
+  pos[0].off = address_expr->X_add_number;
+  pos[1].off = fix_24k_offset (hist[0].insn_opcode, hist[0].insn_mo);
+  pos[2].off = fix_24k_offset (hist[1].insn_opcode, hist[1].insn_mo);

I think this ignores situations like:

         sw      $2,%gprel(s1)($28)
         sw	$3,%gprel(s2)($28)
         sw	$4,%gprel(s3)($28)

where the in-place offsets will all be 0.  I think the code will
assume that there is no problem, whereas there could be for certain
offsets of s1, s2 and s3.  It would be nice to have a test for this too.


Also, doesn't this code (incorrectly?) assume that two register-indexed stores followed by an offset store will overlap? fix_24k_offset returns 0 for register-indexed stores, which we'll then treat as having the same offset.


The last case is interesting.  Does the errata still trigger if
a suxc1 instruction straddles a cache boundary?


I've updated the patch to check for non-immediate displacements. The errata will now trigger correctly for all three of these cases.

Thank you for the suggestions and review.


Attachment: 24k.patch-rev2
Description: Text document

Attachment: 24k-testsuite.patch-rev2
Description: Text document

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