Re: [RFC] Optimize swab operations on mips_r2 cpu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > ...the only significant thing which -march=4ksd will do differently from
> > -march=mips32r2 is to allow the compiler to generate branch-likely
> > instructions -- they're deprecated for generic mips32 code but carry no
> > penalty on the 4K core. It will also cause the compiler's "4kc" pipeline
> > description to be used for instruction scheduling, instead of the
> > default "24kc", but that should only change the order of instructions
> 
> Do you mean that the code can be run faster when using -march=4ksd ?

Not necessarily, if it's just a question of branch-likelies.  It could be a little
faster, but it could also be a little slower.  In any case, the effect should be
minor.
 
> > and shouldn't really make a significant difference to the code size.
> 
> yes but I have :(

You report a 33K delta on the Linux kernel.  I would imagine that you're
probably building a pretty small kernel configuration, but even if you've got
it down to 1MB of text, that's still only about 3% bloat.  Undesirable, but
not catastrophic.

If we want to do something about this, however, I would argue that it should
not be strictly in the context of the 4KSd, because it's not only for that core
that people may have an interest in having the smallest possible kernel, and
it's not only that compiler option that could have an effect on the footprint.
I postulate (without proposing to actually do the work ;o) some kind of
CONFIG_<mumble>_COMPACT configuration option that would do
things like (but not limited to) forcing the use of branch-likely where appropriate,
regardless of the ISA level selected.

            Regards,

            Kevin K.


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux