This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

can't find a register in class 'GENERAL_REGS' while reloading 'asm'

Hi guys.

   I'm new for ARM programming. Now I'm using Assembler in my C code under Android OS.

  I meet a problem that I don't know how to solve.

when I compile the code , output is :

       /media/51a24454-12a3-411c-850b-46b77bfb99ad/cmpbmp/phone/neon/1-26/jni/neon.cpp: In function 'void GetMD_neon(unsigned char*, int, int, unsigned char*)':

       /media/51a24454-12a3-411c-850b-46b77bfb99ad/cmpbmp/phone/neon/1-26/jni/neon.cpp:271:3: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'

      /media/51a24454-12a3-411c-850b-46b77bfb99ad/cmpbmp/phone/neon/1-26/jni/neon.cpp:271:3: error: 'asm' operand has impossible constraints

     make: *** [/media/51a24454-12a3-411c-850b-46b77bfb99ad/cmpbmp/phone/neon/1-26/obj/local/armeabi-v7a/objs/main/neon.o] Error 1

My Question is what does "error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'" mean? And What is  the possible reason for this error?

Thank you.

Parents
  • It looks like you may be running out of general purpose registers. How many are you using or is it possible you're accidently using a reserved register? Is your code _asm_ section of code its own function call where you're letting the compiler stack the previous register context and use or are you inlining it and not stacking? If you're inlining without stacking, you might be fighting the compiler for general purpose registers. It is tough to tell without seeing your code but I suggest reviewing your register use.

Reply
  • It looks like you may be running out of general purpose registers. How many are you using or is it possible you're accidently using a reserved register? Is your code _asm_ section of code its own function call where you're letting the compiler stack the previous register context and use or are you inlining it and not stacking? If you're inlining without stacking, you might be fighting the compiler for general purpose registers. It is tough to tell without seeing your code but I suggest reviewing your register use.

Children
No data