| delorie.com/archives/browse.cgi | search |
| From: | "Alexei A. Frounze" <alex DOT fru AT mtu-net DOT ru> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: THE -O2 PROBLEM - PART II |
| Date: | Sat, 15 Apr 2000 12:16:41 +0400 |
| Organization: | MTU-Intel ISP |
| Lines: | 31 |
| Message-ID: | <38F82569.817316A6@mtu-net.ru> |
| References: | <38F20E7A DOT 3330E9A4 AT mtu-net DOT ru> <38F6C64E DOT C7753C6C AT mtu-net DOT ru> <8d7l3g$j3i$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <38F76B94 DOT 5E968BA7 AT mtu-net DOT ru> <38F7A6FE DOT ED9B3E59 AT mtu-net DOT ru> <38F82ABA DOT FEBEB2B0 AT is DOT elta DOT co DOT il> |
| NNTP-Posting-Host: | ppp97-7.dialup.mtu-net.ru |
| Mime-Version: | 1.0 |
| X-Trace: | gavrilo.mtu.ru 955786835 15072 212.188.97.7 (15 Apr 2000 08:20:35 GMT) |
| X-Complaints-To: | usenet-abuse AT mtu DOT ru |
| NNTP-Posting-Date: | 15 Apr 2000 08:20:35 GMT |
| X-Mailer: | Mozilla 4.72 [en] (Win95; I) |
| X-Accept-Language: | en,ru |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
it eliminates C code but not inline asembly.
For example:
if (KeyMap[sTab]) { // key is pressed
do_something();
while (KeyMap[sTab]) {}; // this line is replaced with infinite loop
}
But I need that line AS-IS.
thanks.
Alexei A. Frounze
-----------------------------------------
Homepage: http://alexfru.chat.ru
Mirror: http://members.xoom.com/alexfru
Eli Zaretskii wrote:
>
> "Alexei A. Frounze" wrote:
> >
> > But with optimizations enabled, I simply get faulty code, since compiler
> > eliminates checking of the array. How to prevent this from optimizations?
>
> If the compiler eliminates the entire inline asm block, one way to prevent it
> is with "__asm__ __volatile__" instead of just "__asm__" or "asm".
>
> If that's not the problem, I suggest to post the offending code fragment and
> its surroundings.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |