title: GCC: Prohibit use of some registers
body: <p>This is a strange request but I have a feeling that it could be possible. What I would like is to insert some pragmas or directives into areas of my code (written in C) so that GCC's register allocator will <em>not</em> use them.</p>
  
  <p>I understand that I can do something like this, which <em>might</em> set aside this register for this variable</p>
  
  <pre><code>register int var1 asm ("EBX") = 1984;
  register int var2 asm ("r9") = 101;
  </code></pre>
  
  <p>The problem is that I'm inserting new instructions (for a hardware simulator) directly and GCC and GAS don't recognise these yet. My new instructions can use the existing general purpose registers and I want to make sure that I have some of them (i.e. r12->r15) reserved.</p>
  
  <p>Right now, I'm working in a mockup environment and I want to do my experiments quickly. In the future I will append GAS and add intrinsics into GCC, but right now I'm looking for a quick fix.</p>
  
  <p>Thanks!</p>