From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx162.postini.com [74.125.245.162]) by kanga.kvack.org (Postfix) with SMTP id 9E00A6B004F for ; Sat, 17 Dec 2011 09:58:32 -0500 (EST) Received: by iacb35 with SMTP id b35so5413744iac.14 for ; Sat, 17 Dec 2011 06:58:32 -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:58:24 +0800 MIME-Version: 1.0 Message-Id: <201112172258.24221.nai.xia@gmail.com> Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Andi Kleen Cc: Linus Torvalds , Linux-MM , LKML Hi Andi, Seems I used a stale email address of you from a related git commit log, so this is a resend, sorry. ======= 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