简体   繁体   English

如何生成具有Arm指令集的汇编输出

[英]How to generate the assembly output which has arm instruction set

i have a windows machine(intel processor) and gcc installed. 我安装了Windows计算机(英特尔处理器)和gcc。
gcc -save-temps "filename.c" gcc -save-temps“ filename.c”
generated the intermediate files and i viewed the assembly file (.s file) which is intel x86 instructions. 生成了中间文件,我查看了汇编文件(.s文件),它是intel x86指令。

my question is how to generate the assembly which is ARM instruction set architecture equivalent on the same machine? 我的问题是如何在同一台机器上生成与ARM指令集体系结构等效的程序集?

gcc is always built for a single target. gcc始终是为单个目标构建的。 https://developer.arm.com/open-source/gnu-toolchain is where you get your arm-gcc cross-compiler toolchain. https://developer.arm.com/open-source/gnu-toolchain是您获得arm-gcc交叉编译器工具链的地方。 Clang on the other hand can generate code for multiple targets. 另一方面,Clang可以为多个目标生成代码。

Both are available on https://www.godbolt.org to see the assembly directly. 两者都可以在https://www.godbolt.org上找到,以直接查看该程序集。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM