lkml.org 
[lkml]   [2001]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: i386 flags register clober in inline assembly
Date
Followup to:  <20011117214041.D3789@atrey.karlin.mff.cuni.cz>
By author: Jan Hubicka <jh@suse.cz>
In newsgroup: linux.dev.kernel
> Actually the main dificulty I see is storing cc0 to variable. CC0 is hard
> register and pretty strange one - you can't move it, you can't spill. Using
> the syntax above you can easilly make cc0 from asm statement to span another
> cc0 set resulting in incorrect code or compiler crash.
> (the code generator may insert any code in between statements as it don't
> know he can't clobber cc0. In fact this is happening in from of if
> construct as deffered stack deallocators are flushed).
>

Why can't you move or spill it? There are a whole lot of ways you
could do either: pushf, sahf, setcc...

-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:13    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site