------- Comment #3 from pinskia at gmail dot com 2009-01-23 04:39 ------- Subject: Re: CX isn't preserved with shift
Sent from my iPhone On Jan 22, 2009, at 8:34 PM, "hjl dot tools at gmail dot com" <gcc-bugzi...@gcc.gnu.org > wrote: > > > ------- Comment #2 from hjl dot tools at gmail dot com 2009-01-23 > 04:34 ------- > How about this one: > > --- > extern void abort (void); > > void > foo (int x) > { > if (x != 8) > abort (); > } > > void > bar (int g) > { > register int x __asm__("ecx"); > register int y __asm__("eax"); > x = 5; > foo (1 << g); > asm ("mov %1, %0": "=r" (y): "r" (x)); Again still undefined because there is still inbetween the assignment and the inline-asm. > > if (x != 5) > abort (); > if (y != 5) > abort (); > } > > int > main () > { > bar (3); > return 0; > } > --- > > > -- > > hjl dot tools at gmail dot com changed: > > What |Removed |Added > --- > --- > ---------------------------------------------------------------------- > Summary|CX isn't preserved with |CX isn't preserved > with > |shift |shift > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38941 > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38941