This is the mail archive of the gcc@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]

Is it possible to have non-optimised block within a source file.


I have a need to ask the compiler not to optimise certain sections of code
within a source file. Specifically, I don't want source insertion or
re-ordering to be done at certain points  when in general -O2 optimisation
is requested.

a) Is there away of achieving this?
b) if not, does anyone have a feel for the difficulty of implementing such
as device with perhaps a #pragma directive?


Why I ask these questions is because I'd like the ability to jump from an
in-line assembler section to a c coded block. I know that jumps in
assembler are not visibkle to the compiler. I have a hooking mechanism
where the jump target us switched dynamically - or rather i'd like one. Yes
there are other ways to implement hooks, but this mechanism gives certain
performance advantages.


Thanks,

Richard


Richard Moore -  RAS Project Lead - Linux Technology Centre (ATS-PIC).
http://oss.software.ibm.com/developerworks/opensource/linux
Office: (+44) (0)1962-817072, Mobile: (+44) (0)7768-298183
IBM UK Ltd,  MP135 Galileo Centre, Hursley Park, Winchester, SO21 2JN, UK


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