From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16220 invoked by alias); 2 Mar 2006 14:32:05 -0000 Received: (qmail 16195 invoked by uid 48); 2 Mar 2006 14:32:02 -0000 Date: Thu, 02 Mar 2006 14:32:00 -0000 Message-ID: <20060302143202.16194.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/26457] -fstack-protector leaks the upper bits of RAX In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pluto at agmk dot net" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-03/txt/msg00246.txt.bz2 List-Id: ------- Comment #4 from pluto at agmk dot net 2006-03-02 14:32 ------- http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/24592.pdf page 33: [ Zero-Extension of 32-Bit Results. ] (...) when performing 32-bit operations with a GPR destination in 64-bit mode, the processor zero-extends the 32-bit result into the full 64-bit destination. 8-bit and 16-bit operations on GPRs preserve all unwritten upper bits of the destination GPR. This is consistent with legacy 16-bit and 32-bit semantics for partial-width results. Software should explicitly sign-extend the results of 8-bit, 16- bit, and 32-bit operations to the full 64-bit width before using the results in 64-bit address calculations. -- pluto at agmk dot net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pluto at agmk dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26457