This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/51455] Possible uninitialized register use when array subscript is unsigned
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 07 Dec 2011 19:30:21 +0000
- Subject: [Bug c/51455] Possible uninitialized register use when array subscript is unsigned
- Auto-submitted: auto-generated
- References: <bug-51455-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51455
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-07 19:30:21 UTC ---
Probably time for you to read the docs.
E.g. AMD 24592 pdf, in 3.1.2 says:
"In general, byte and word operands are stored in the low 8 or 16
bits of GPRs without modifying their high 56 or 48 bits,
respectively. Doubleword operands, however, are normally
stored in the low 32 bits of GPRs and zero-extended to 64 bits."
Of course movzbl insn clears all upper 56 bits of the destination register,
like movzbq, but is one byte shorter.