This is the mail archive of the binutils@sourceware.org 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: [PATCH v1] Add Loongson2F specific NOP instruction


Wu Zhangjin <wuzhangjin@gmail.com> writes:
> I'm sorry, "addu v0,zero,v0" may make kernel hang at "ld      a0,0(v0)",
> I need to change it be something else.

Also, workarounds like this should generally be under the control
of an -mfix-* option, so that you can get them even when compiling
without -march=loongson*.  For example, a distributor might want
to compile code that runs on both Loongson and non-Loongson
architectures while still avoiding this errata.  (This is how
errata on other MIPS processors are handled.)

Of course, the likelihood of a distributor doing this depends on whether
the errata only affects kernel code.  But then there are two cases:

  - if the errata can only happen in the kernel, we might want
    to compile userspace normally, since I imagine using non-zero
    registers would introduce false pipeline hazards.  -mfix-* would
    be useful to distinguish between kernel and userspace code.

  - if the errata can happen in userspace, -mfix-* would be useful
    to distributors.

It's OK for -march=loongson* to imply -mfix-*, if that seems appropriate.
-march=loongson* musn't trump an explicit -mno-fix-* though.

Any patch along those lines will need a copyright assignment.  Do you
(or your employer) have one on file?

Richard


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