Is there any other optimization for memory?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Gcc manual describes "memory" clobber in a inline assembly as follows:

If your assembler instructions access memory in an unpredictable
fashion, add `memory' to the list of clobbered registers. This will
cause GCC to not keep memory values cached in registers across the
assembler instruction and not optimize stores or loads to that memory.

I have two questions about it.

1. "This will cause GCC to not keep memory values cached in registers
***across*** the assembler instruction"
What's the exact meaning of "across"? I think that the gcc will reload
a memory value into a register ***after*** the assembler instruction.
Is that the case?

2.  "and not optimize stores or loads to that memory"
Except caching memory values in registers, is there any other
optimizaiton for stores or loads to memory?


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux