public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: kevin diggs <diggskevin38@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: pre-processor symbols and gcc -v
Date: Wed, 02 Mar 2011 23:27:00 -0000	[thread overview]
Message-ID: <mcr8vwx5cj6.fsf@google.com> (raw)
In-Reply-To: <AANLkTi=TgnwY2UFmnTYNSctpvPkAOXipsYy8V3LVJtT+@mail.gmail.com>	(kevin diggs's message of "Wed, 2 Mar 2011 17:07:07 -0600")

kevin diggs <diggskevin38@gmail.com> writes:

> As always thank you VERY much for taking the time to share your VAST
> array of knowledge! I REALLY do appreciate it!!! (You to Jonathon)

You're welcome.


>> gcc -v does not list predefined preprocessor macros.  You can see them
>> by running "gcc -x c /dev/null -E -dM".
>>
> I am trying to figure out if I should apologize for being to stupid to
> figure this out. In my defense and in this case I can't build the
> documentation (gcc 3.4.6 on an old Quadra 700 (mc68040)). makeinfo or
> some such thing is missing. I think it also wants perl. Like I have
> enough disk space on this thing to install (or build) that.

The gcc 3.4.6 manual is online at
http://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/ .

But the -dM command sequence is a bit cryptic.

> Did this change when the pre-processor moved into cc1?

Hmmm.  I'm not sure.  I think it may have worked even before then.


> I apologize for the vagueness. I am referring to usage in embedded asm.
>
>         asm volatile("fmoveml %%fpcr/%%fpsr,%0@\n"
>                 :
>                 :"a"(save)
>         );
>
> Q is address register indirect. I thought I could write this:
>
> fmoveml %%fpcr/%%fpsr,%0\n"
> :
> :"Q"(save)
>
> The compiler pitched a major league hissy fit though:
>
> fmoveml.c: In function `f':
> fmoveml.c:14: error: impossible constraint in `asm'
>
> Are some of these constraints meant to be used only in md files?

You can use "Q" with inline asm, but you have to pass it an operand
which is in memory.  Try passing &save rather than save.  I don't know
if that will work, but something along those lines might.


>>> And while I'm here, anyway to see when an instruction causes an
>>> unimplemented instruction trap (like fcos on a 68040)?
>>
>> I guess I don't understand the question.
>>
> Using ktruss dltest will show lots of diagnostic stuff. If I
> understand it, on a 68040 the fcos instruction has to implemented by a
> trap of some sort. Is there any utility that I can see these happen
> analogous to what ktruss does for system calls?

I don't know.  Sorry.

Ian

      reply	other threads:[~2011-03-02 23:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02 20:24 kevin diggs
2011-03-02 20:54 ` Jonathan Wakely
2011-03-02 22:36   ` kevin diggs
2011-03-02 23:32     ` Ian Lance Taylor
2011-03-02 21:15 ` Ian Lance Taylor
2011-03-02 23:07   ` kevin diggs
2011-03-02 23:27     ` Ian Lance Taylor [this message]

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=mcr8vwx5cj6.fsf@google.com \
    --to=iant@google.com \
    --cc=diggskevin38@gmail.com \
    --cc=gcc-help@gcc.gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).