creating a C function with a given size in the text segment

后端 未结 4 1688
梦谈多话
梦谈多话 2021-02-19 11:48

I\'m programming an embedded powerpc 32 system with a 32 kbyte 8-way set associative L2 instruction cache. To avoid cache thrashing we align functions in a way such that the tex

4条回答
  •  情歌与酒
    2021-02-19 12:17

    Use GCC's __attribute__(( aligned(size) )).

    Or, pass -falign-functions=n on your GCC command line.

    • GCC Function Attributes
    • GCC Optimize Options

提交回复
热议问题