title: Switching between Intel and ATT mode in GCC
body: <p>So I have this inline assembly code along with my C code, and I want to use intel syntax for this particular call to asm(), however I need to switch back to ATT syntax or else it will give a long list of errors.</p>
  
  <pre><code>asm(".intel_syntax prefix");
       asm volatile (
          "add %0, $1 \n\t"
           : "=r" (dst)
           : "r" (src)); 
  
  asm(".att_syntax prefix");
  </code></pre>
  
  <p>Now it gives the following error</p>
  
  <pre><code>/tmp/ccDNa2Wk.s: Assembler messages:
  /tmp/ccDNa2Wk.s:180: Error: no such instruction: `movl -16(%ebp),%eax'
  /tmp/ccDNa2Wk.s:187: Error: no such instruction: `movl %eax,-12(%ebp)'
  </code></pre>
  
  <p>I dont understand how to fix the error, i have no call to movl in any part of my code.</p>