(inline assembly in C) Assembler messages: Error: unknown pseudo-op:

后端 未结 1 1310
梦如初夏
梦如初夏 2021-01-15 12:27

I have written a short C \"wrapper\" function for an asm inline assembly, as below. The assembly code consists of a while loop, computing several vector dot product

1条回答
  •  迷失自我
    2021-01-15 13:14

    Because your .while is not defined as a label, it's being seen as a [non-existent] pseudo-op.

    Change:

    ".while%=\n\t"
    

    Into:

    ".while%=:\n\t"
    

    UPDATE:

    Per your request.

    A "pseudo-op" is [terminology for] an assember directive that doesn't correspond to an instruction.

    Some examples:

    .globl main to specify that the main label is a global variable.

    .text to specify that what follows should be placed in the "text" segment (likewise for .data).

    The . prefix is [generally] reserved for pseudo ops. That's why you got the Error: unknown pseudo-op: message.

    If you had done "while%=\n\t" instead [still wrong because there was no : to denote a label], you would have gotten a different message: Error: no such instruction:

    0 讨论(0)
提交回复
热议问题