Forcing inline assembly code to be produced

Kristis Makris kristis.makris@asu.edu
Mon Apr 23 18:23:00 GMT 2007


Hello,

I'm facing a problem producing inline assembly code in a C program. It
seems that when assembly code is added in a path that seems to be
unreachable (dead-code I suppose) the assembly code is not produced at
all. I'm using gcc 3.3.5 and as 2.15.

Is there a way to force such assembly code to be produced even though it
may be unreachable ? If not should there be a way ?

I'm attaching a simplified test case I'm using. I'm trying to generate a
symbol with inline assembly.

In a more complicated example, I'm trying to position uncommonly used
code in a separate memory region for better cache locality. One of the
inline assembly statements I'm using is not produced. This results in
not changing back to the ".text" section, resulting in further assembler
problems as described in:

http://lists.gnu.org/archive/html/bug-binutils/2007-04/msg00107.html

Thanks for any help.
Kristis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inline_asm_not_produced.c
Type: text/x-csrc
Size: 241 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20070423/559c1ec3/attachment.bin>


More information about the Gcc-help mailing list