This is the mail archive of the gcc@gcc.gnu.org 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: builtin_str{,n}cmp bug on s390{,x}


Jakub Jelinek wrote:

> See PR optimization/10339.
> Before that GCC was doing equally bad thing, but on all arches
> (transforming strcmp/strncmp into memcmp).
> IMNSHO that patch should be backported to gcc-3_3-branch (I have it on
> gcc-3_3-rhl-branch for quite some time already), but unlike other arches
> it will make zilch changes on s390*.

Oh well, I guess having two different patterns would be the 
best way to solve this problem.  We don't have an instruction
to implement strncmp semantics on s390 unfortunately (however
we do have an instruction to implement strcmp - CLST - which
is currently not used at all by gcc ...).

B.t.w. the i370 cmpstr pattern behaves the same as the s390 one
in that respect.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de


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