This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
>
> From: hjl@lucon.org (H.J. Lu)
> Date: Tue, 21 Apr 1998 12:34:46 -0700 (PDT)
>
> > Why not encourage people to write the prefix on a separate line, which
> > works for both a.out and ELF?
> >
>
> That is a separate issue. Since PREFIX_SEPARATOR is wrong on ELF, we
> should fix it. I think we can change it
>
> #define PREFIX_SEPARATOR '\\'
>
> so that everyone will be happy.
>
> I am questioning the need for PREFIX_SEPERATOR at all. I don't see
> any particular reason to use it on ELF if it is not required and if no
> other ELF assembler supports it.
The only reason I can think of is that we may want to treat prefixes
on a separate line differently to prefixes specified "with the
instruction"
eg. We might find it desirable for
ds
lgdt 0
to emit the ds prefix while
ds/ldgt 0 (or whatever the syntax is)
or
lgdt %ds:0
shouldn't. ie. gas realises that ds is the default segment.
Martynas (martynas@nm3.ktu.lt) has been working on a 16 bit capable
gas, and he's keeping track of address size prefixes as a means to
tell the assembler that the next instruction is a 16 bit one.
For instance `addr16; mov 0,%ebx' generates 67 8b 1e 00 00
while `mov 0,%ebx' generates 8b 1d 00 00 00 00
So the `addr16' can't just be emitted; It considerably effects
following code, and not just offset sizes, but modrm bytes too.
I'm wondering if this is really a good idea. Maybe it would be better
if addr16 didn't effect the code generated, and instead we require a
`.code16' directive.
How do other unix assemblers handle 16 bit code? Or don't they?
Can someone with access to Unixware, SCO, etc. assemblers do some
experimentation please?