我的任务是使用C语言实现排序算法。我必须制作一个C代码,在ARM机器中由gcc -o0(无优化选项)编译时转换为最少数量的指令。
所以,我的想法是首先使用-o1选项进行编译,然后将编译的程序集直接嵌入到我的C代码中。
我成功使用-o1选项进行编译。但是,当我使用-o0选项编译相同的代码时,我得到了以下汇编程序消息。 请帮帮我......
a = [1,2,3,4,5,6];
function withoutReturn () { a.map(i => i); };
function withReturn () { return a.map(i => i); };
console.log('withoutReturn', withoutReturn());
console.log('withReturn', withReturn())
这是我的代码。
user@debian-armel:~gcc -g -O0 mycode4.c -o mycode4
/tmp/cc2Q2Tbh.s: Assembler messages:
/tmp/cc2Q2Tbh.s:77: Warning: destination register same as write-back base