This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: x86 leal quirk


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Richard Henderson wrote:

> Because leal doesn't imply _any_ segment.  Only true memory
> references involve a segment.
> 
> leal just reuses part of the address generation logic to do
> a couple of adds and a shift.

I know.

What I meant is that the same address computation is expected then to
work with a movl instruction.  It'll not work for nonzero offsets.  And
as your own test case shows people and programs use the same syntax in
the leal instruction as they'd use in the movl instruction.  This isn't
wrong if the segment offset is zero.

I just would like to have a way to silence the warning beside cryptic
encodings of the (unnecessary) segment prefix in the leal instruction.

- -- 
- ---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9j6jq2ijCOnn/RHQRAsp8AJ4hYn+RLbvPlxAnLZwq0OM10Mba8QCff8Z9
QX7yHG5DN9p207pfzU8SAOs=
=7iW2
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]