From: sandeep <sandeep@codito.com>
To: Martin <asmfreshmeat@gmx.de>
Cc: linux-assembly@vger.kernel.org
Subject: Re: GAS/GCC Assembler Code Modification
Date: Sat, 15 May 2004 15:45:05 +0530 [thread overview]
Message-ID: <40A5EDA9.8080805@codito.com> (raw)
In-Reply-To: <20040515112807.579e4d89@deepblack>
Martin wrote:
> popl %esi
> the gas changes that to
> pop %esi
> Ok I guess this is ok, because the ESI Register is 'only' 32 Bit. So movw (= mov) would be ok.
>
> Next example:
>
> If I try to assemble
> movl $0xb,%eax
> the gas changes that to
> mov $0xb,%eax
There is no optimisation happening here. it's only that gas is using only mov as
mnemonic, irrespective of whether you write movw or movl. I suggest you have a
look at the generated instruction bytecodes.
while on linux, the default it assumes is 32 bit mode. so, though your movw also
it will show as mov, but the generated instruction bytecode will also be
prefixed with a mode byte, compared to had same movw been used in 16 bit mode.
> How can I tell gas that I dont want him to optimize the code?
Do you mean anything other than above as 'optimize the code' ?
I don't know if I cleared some things for you or increased the mess.
--
sandeep
--------------------------------------------------------------------------
I predict that today will be remembered until tomorrow!
--------------------------------------------------------------------------
next prev parent reply other threads:[~2004-05-15 10:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-15 9:28 GAS/GCC Assembler Code Modification Martin
2004-05-15 10:15 ` sandeep [this message]
2004-05-15 13:32 ` peter willy krause
2004-05-15 20:08 ` Martin
2004-05-15 21:45 ` peter willy krause
2004-05-15 21:01 ` Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40A5EDA9.8080805@codito.com \
--to=sandeep@codito.com \
--cc=asmfreshmeat@gmx.de \
--cc=linux-assembly@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).