All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nai Xia <nai.xia@gmail.com>
To: Andi Kleen <ak@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Linux-MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Question about missing "cld" in x86 string assembly code
Date: Sat, 17 Dec 2011 22:52:26 +0800	[thread overview]
Message-ID: <201112172252.26439.nai.xia@gmail.com> (raw)

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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Nai Xia <nai.xia@gmail.com>
To: Andi Kleen <ak@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	"Linux-MM" <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Question about missing "cld" in x86 string assembly code
Date: Sat, 17 Dec 2011 22:52:26 +0800	[thread overview]
Message-ID: <201112172252.26439.nai.xia@gmail.com> (raw)

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

             reply	other threads:[~2011-12-17 14:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-17 14:52 Nai Xia [this message]
2011-12-17 14:52 ` Question about missing "cld" in x86 string assembly code Nai Xia
  -- strict thread matches above, loose matches on Subject: below --
2011-12-17 14:58 Nai Xia
2011-12-17 14:58 ` Nai Xia
2011-12-17 17:08 ` Brian Gerst
2011-12-17 17:08   ` Brian Gerst
2011-12-17 18:39   ` Linus Torvalds
2011-12-17 18:39     ` Linus Torvalds
2011-12-22 15:52     ` nai.xia
2011-12-22 15:52       ` nai.xia
2011-12-22 15:34   ` nai.xia
2011-12-22 15:34     ` nai.xia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201112172252.26439.nai.xia@gmail.com \
    --to=nai.xia@gmail.com \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.