- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am writing AVX code inside asm blocks (don"t want to use avx intrinsics).
A lot of gp registers are used and so they are mixed with the ones generated by the compiler and thus it is screwing the behavior of the code pretty fast.
Is there an automatic or manual way to avoid these register overlaps ?
Any link to documentation would be great.
I would like also to use asm blocks in fortan with ifort, but didn't find the way yet.
Thanks
Vincent
- Tags:
- Intel® Advanced Vector Extensions (Intel® AVX)
- Intel® Streaming SIMD Extensions
- Parallel Computing
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What are you trying to achieve?
Usually asm block code will not be optimized by compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to compare the performance of compiler generated code vs handcoded assembly code from a FLOPS perspective. Just want to get an idea of the relative performance of both implementations for one function.
The function is now implemented in AVX but this register 'overlap' issue makes it unusable. Heard of clobbered registers but I'm not sure what it does, whether it might help me or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The clobbered register list allows you to tell the compiler which registers are affected by your inline assembly code, so it doesn't assume that their values persist across it. This applies to Gnu-style inlined assembly. For more information, see Agner Fog http://www.agner.org/optimize/optimizing_assembly.pdf, section 6.2. You should also look near the end of that document for information on how to measure code performance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@berthou
Which function are you trying to compare?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page