I want to read a memory location without polluting the cache. I am working on X86 Linux machine. I tried using MOVNTDQA assembler instruction:
asm(\"movntdqa %
MOVNTDQA is only available with SSE.
Why are you trying to avoid using the cache? CPUs are generally pretty good at deciding what to kick out of the cache when. If do genuinely need to, one way would be to arrange for an alias of the memory area you are reading from to be mapped into your address space with caching disabled and reading from there.
If what you are trying to achieve is actually to minimise your code's impact on another function's working set being held in cache at the time, this should be doable by issuing appropriate prefetch and invalidate instructions.