Messages in this thread |  | | Subject | Re: test version of 2.1.0 available | From | Tom May <> | Date | 24 Sep 1996 12:32:45 -0700 |
| |
Linus Torvalds <torvalds@cs.helsinki.fi> writes:
> Instead of testing the sign bit, the low-level system call should > probably do something like this: > > ... do system call, return in %eax ... > movl %eax,%edx > addl $4095,%edx > jc error error if return was -1 .. -4095
If you're only testing the carry flag with the "jc" instruction and not using it later, use this instead. Remember "jae" is unsigned, and -4095 is a huge unsigned number:
cmpl $-4095,%eax jae error
Or in C:
if ((unsigned) eax >= (unsigned)-4095) { goto error; } Tom.
|  |