public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bob Plantz <plantz@cds1.net>
To: Robin-Vossen <robin-vossen@hotmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: GNU C++ Inline Assembler
Date: Mon, 11 Aug 2008 06:37:00 -0000	[thread overview]
Message-ID: <1218415637.5988.10.camel@bob-desktop> (raw)
In-Reply-To: <18912389.post@talk.nabble.com>

On Sun, 2008-08-10 at 04:11 -0700, Robin-Vossen wrote:

I'm not aware of any use of the inc instruction that takes two operands:

> __asm{ 
>             mov eax, [INTEGER]
>             inc eax, esp
>             mov [INTEGER], eax
>             mov [CHARACTER], ah
>          }
> return 0;
> }

so I don't completely understand your code.

Have you tried -masm=intel? I've only gone as far as seeing that it
generates intel-style asm from C/C++. I decided that it was better to
follow the "when in Rome..." rule.

The syntax issue seems arbitrary to me. I've used lots of assemblers.
They're all different.

For several years in the 1980s I had contracts with two companies that
used different chips. One assembler used source,destination and the
other destination,source. I would work with one in the morning, the
other in the afternoon. Just had to be careful.

Bob


  reply	other threads:[~2008-08-11  0:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-10 21:39 Robin-Vossen
2008-08-11  6:37 ` Bob Plantz [this message]
2008-08-11 16:35   ` Robin-Vossen
2008-08-11 16:59     ` David Daney
2008-08-11 21:24     ` Andrew Haley
2008-08-12  1:08       ` Bob Plantz
2008-08-12  2:29         ` Brian Dessent
2008-08-12  8:56           ` Bob Plantz
2008-08-13 17:27             ` Robin-Vossen
2008-08-12 15:26           ` Ian Lance Taylor

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=1218415637.5988.10.camel@bob-desktop \
    --to=plantz@cds1.net \
    --cc=gcc-help@gcc.gnu.org \
    --cc=robin-vossen@hotmail.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).