Messages in this thread |  | | | From | "H. J. Lu" <> | | Subject | Re: [PATCH] APM support doesn't compile with binutils 2.8.1.0.24 | | Date | Wed, 25 Mar 1998 10:51:38 -0800 (PST) |
| |
> > > > On Wed, 25 Mar 1998, Bernhard Rosenkraenzer wrote: > > > > According to the binutils people, it's related to bogus asm in apm_bios.c > > - the patch I've attached fixes it. > > Are the binutils people aware that the size prefix _does_ make a > difference for segment loads? > > If you do a 16-bit "mov seg -> reg", the operation will write only the low > 16 bits, while if you do a 32-bit version it will actually write all 32 > bits (high bits zero, I do believe). > > (Just to confuse matters: if the destination is memory, it seems to be > always written 16 bits at a time regardless of the size of the operand. > Don't you all love Intel?) > > Anyway, this does mean that people can quite _deliberately_ need both the > 16- and 32-bit versions, and gas _should_ accept a "w" or "l" at the > instruction to imply which one is needed. > > The old gas bug was that it defaulted to 16-bit mode which is slower and > bigger (and is also strange, considering that gas always otherwise > defaults to 32-bit mode when not told otherwise). But the new gas > behaviour is equally buggy in that it appears to not support the 16-bit > mode at all, and even complains when explicitly given a (legal) size. > > The "b" case (8-bit) is illegal and should not be allowed (which was my > original complaint about the patch that Ingo posted). > > In short: > > push %ds : legal, should default to 32-bit mode, no override > pushl %ds : legal, 32-bit, no override > pushw %ds : legal, 16-bit, operand size override > pushb %ds : illegal > > mov %ds,%eax : legal, should default to 32-bit mode, no override > mov %ds,%ax : if gas notices that "%ax" is 16-bit it would be great. > movw %ds,%ax : 16-bit, operand size override REQUIRED > movl %ds,%eax : 32-bit, no override >
There are no pushw/pushb for cs/ds/es/fs/gs/ss in my Intel reference manual. You can only use push %ds or pop %ds. I will fix mov in binutils 2.8.1.0.26.
H.J.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
|  |