This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: pre-processor symbols and gcc -v


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


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