Re: Unnecessary movzx instruction?

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

 



Justin Lebar <justin.lebar@xxxxxxxxx> writes:

> I'm confused about line 10, |movzx ecl, cl|.  As I understand, this is
> truncating ecx so it's 0 everywhere except the least-significant byte.
>  But we can only get to line 10 if the last write to ecx was in line
> 23, which already truncated the top bits of the register.
>
> If I change |str| in the C code to a signed char, then line 10 becomes
> movsx, which is sensible.  That the instruction has a parallel in the
> signed char case suggests to me that it's probably not an intentional
> nop.
>
> I'd appreciate any help understanding what's going on here.

It's a missed optimization bug.  There are known problems in this area,
although I couldn't turn up a bug report for this specific case.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux