lkml.org 
[lkml]   [1999]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PATCH - assembler glitches


On Tue, 12 Oct 1999, Martin Dalecki wrote:
>
> The attached patch is sweepping out obvious errors in IA32 assembler
> code.

It's not "obvious errors", as it's actually "non-obvious features". The

movl %ax,%ds

thing actually used to generate the right (32-bit) move on gas, and

movw %ax,%ds

used to generate the WRONG (16-bit) move on gas.

The reason the 32-bit move is the right one is that both the 32-bit and
the 16-bit moves actually do the same thing (the target register is a
16-bit register after all), but the 32-bit move does so in smaller space
and faster due to the lack of a size override.

I'd like somebody to sacrifice their first-borne son, and write in blood
that gas does the right thing every time these days. Otherwise I will keep
the thing that looks strange but has a real explanation for it.

Linus


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.076 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site