Strange output code
Per Lundberg
plundis@chaosdev.org
Sun Oct 31 23:03:00 GMT 1999
On Sat, 2 Oct 1999, Zack Weinberg wrote:
> I believe your problem is that you are not letting the compiler do its
> job.
Yeah, I guess so. I didn't really know what to look for in the
documentation (I've only been using asm for this kind of stuff earlier)
> Your asm constraints make no sense, and you used volatile all
> over the place.
As you may have guessed, I'm not really familiar with gcc:s handling of
stuff like this.
> If you rewrite the function like this:
[...]
It seems to work a lot better, yes. Thanks a lot!
> [What platform is this
chaos ( http://www.chaosdev.org ).
> what happens if the syscall fails
What do you mean? It can't fail. If it fails, it returns an error code in
EAX.
> and why can't you use the stub in the standard library for this call?]
Well, there isn't a standard library. This code will probably be a part of
that library later on.
More information about the Gcc-bugs
mailing list