This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I vaguely remember having to escape "%" with "%%" in some cases. Try %%d1 for the first instance of %d1. >From: "William A. Gatliff" <bgat@saturn.billgatliff.com> >To: crossgcc@sources.redhat.com >Subject: Trouble with inline asm on m68k >Message-ID: <20020105213757.A11651@saturn.billgatliff.com> >Reply-To: bgat@billgatliff.com >Mime-Version: 1.0 >Content-Type: text/plain; charset=us-ascii >Content-Disposition: inline >User-Agent: Mutt/1.2.5i >Content-Length: 1076 >Status: O >Guys: >Maybe it's just too late in the evening, maybe I'm just not reading >the info pages closely enough... >I'm trying to do this on a CPU32, m68k-elf-gcc (2.95.3): >*** >int len; >... >__asm__ __volatile__ ("move.l %0, %d1" : : "r" (len) : "%d1"); > >[bgat@mars] m68k-elf-gcc -c -mcpu32 test.c >test.c:41: invalid 'asm': operand number out of range >*** > >Seems like gcc is getting tripped up on the %d1 in the opcode, >thinking it is an operand number instead of a register name. Turning >the "%d1" into just "d1" makes gcc happy, but causes an unresolved >reference to "d1" at link time. The assembler doesn't know it is a >register (which makes sense). > >I'm binding to an asm API, so I have to call out the register name. > >I can't be the first person to have this problem. What's the solution? >Or better yet, what section of the infopages do I need to re-read? > >Thanks! >b.g. >-- >Bill Gatliff >bgat@billgatliff.com >------ >Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ >Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com Tim Miller Glenayre Electronics ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |