From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx130.postini.com [74.125.245.130]) by kanga.kvack.org (Postfix) with SMTP id 7A3886B004F for ; Sat, 17 Dec 2011 09:52:35 -0500 (EST) Received: by iacb35 with SMTP id b35so5406171iac.14 for ; Sat, 17 Dec 2011 06:52:34 -0800 (PST) From: Nai Xia Reply-To: nai.xia@gmail.com Subject: Question about missing "cld" in x86 string assembly code Date: Sat, 17 Dec 2011 22:52:26 +0800 MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201112172252.26439.nai.xia@gmail.com> Sender: owner-linux-mm@kvack.org List-ID: To: Andi Kleen Cc: Linus Torvalds , Linux-MM , LKML Hi, I notice that all x86 assembly code for string operations containing "scasb, lodsb", etc does not have "cld" at the beginning. Is this 100% safe? Or in other words, how could we be sure that there is no "std" generated by compiler somewhere just before the string operations? Thanks, Nai -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org