GCC: Prohibit use of some registers

前端 未结 4 805
野的像风
野的像风 2020-12-03 04:59

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 t

4条回答
  •  旧时难觅i
    2020-12-03 05:36

    If you write an inline asm block for your new instructions, there are commands that inform GCC what registers are used by that block and how they are used. GCC will then avoid using those registers or will at least save and reload their contents.

提交回复
热议问题