www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/06/04:37:27

Message-Id: <199605060827.EAA00632@delorie.com>
Date: Mon, 06 May 96 11:19:53 LIT
From: Martynas Kunigelis <martynas DOT kunigelis AT VM DOT KTU DOT LT>
Subject: GAS bugs
To: DJGPP mainling list <djgpp AT delorie DOT com>
Thread: Frames, NoFrames, TwoWindows

On Fri, 03 May 1996 10:05:34 GMT you said:
>I have found something "curious" in as. For example, assembling:
>       movw $1234,%fs:wops
>       incl %fs:wops
>goes ok, but replacing the constant with a register:
>       movw %ax,%fs:wops
>just generates
>       movw %ax,wops
>which is not, preciselly, what we wanted, as it drops the segment
>       fs
>       movw %ax,wops
>generates the correct code.
>Can someone else test it and tell me something?  My as is dated Feb 02
>1996, 2:08a.
>Fernando Marcos

 Yes, GAS has a lot of bugs, especially with segment overrides. Charles
Sandmann said it sometimes depends on the comments he puts in the code ;)
I've noticed one more thing: if you write pushw %ds, GAS generates an extra
16-bit opcode prefix 0x66, which is unnecessary with segment registers.
Still, if you write push %ds, GAS acts right. So: do not use the operand size
attribute with segment registers, as this may [slightly] slow down the code
and icrease the exec size. Cheers!


- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2014   by DJ Delorie     Updated Aug 2014