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]

Re: Output file size?


>> Inline assembly code (specified via asm()) is simply missing from the 
>> assembly file generated by 'm68k-coff-gcc -Os -S'. At least, that what 
>> it looks like for one of my actual C files. I'll try with a simplified 
>> example...
>
>Actually, this may have been justified as the code would appear to do 
>nothing because I had made a mistake when setting up the variable templates.
>
>I'm not sure I want the optimiser to touch my assembly code at all, 
>though...

You have to indicate to the compiler the asm operands that are inputs,
outputs, and what gets clobbered in the asm statement.  If the
compiler determines that the asm statement is dead code, then the
optimizer is free to rip it out. 

If you don't want the compiler messing with your assembler code, then
write the whole function in assembler...

Again, if you have an example that shows the compiler is messing with
your asm statements when you think it shouldn't, show it so we can try
to reproduce the bug, suggest a word-around, or even fix the compiler.

-- 
Peter Barada                             Peter.Barada@motorola.com
Wizard                                   781-852-2768 (direct)
WaveMark Solutions(A Motorola Company)   781-270-0193 (fax)

------
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]