GCC inline assembler, mixing register sizes (x86)

后端 未结 5 932
离开以前
离开以前 2020-12-10 14:14

Does anyone know how I can get rid of the following assembler warning?

Code is x86, 32 bit:

int test (int x)
{
  int y;
  // do a bit-rotate by 8 on          


        
5条回答
  •  一个人的身影
    2020-12-10 14:27

    Gotcha. Well if it's a primitive routine that you're going to be reusing over and over, I have no argument with it... the register naming trick that Chris pointed out is a nice one that I'm going to have to remember.

    It would be nice if it made it into the standard GCC docs too!

提交回复
热议问题