gcc - llvm-as和binutils-as的区别,变量的命名
问题描述
我试着组装一个例子
测试.s:
.file "test.c"
.text
.globl f
.type f, @function
f:
.LFB0:
.cfi_startproc
movl $"A,B", %eax
ret
.cfi_endproc
.LFE0:
.size f, .-f
.comm "A,B",4,4
.ident "GCC: (GNU) 7.3.0"
.section .note.GNU-stack,"",@progbits
$ binutils-2.35/bin/as test.s
test.x86.s: Assembler messages:
test.x86.s:8: Warning: missing closing '"'
test.x86.s:8: Warning: missing closing '"'
test.x86.s:8: Error: too many memory references for `mov'
$ clang-9 -c test.s ; echo $?
0
为什么clang-9可以汇编测试而gnu-as不能呢?
PS 基本上,测试是从 python/numba/llvmlite llvm-IR 创建的(作为 llvm 优化的结果?)。
解决方案
推荐阅读
- r - 检查变量中是否有字母的 ifelse 语句
- c - Visual Studio“遇到意外错误”。在尝试编译我的代码之后
- javascript - React 使用预先确定的组件在字符串上添加 HTML 标记(替代 dangerouslySetInnerHTML )
- r - 点图包括垂直线和不同颜色的点
- android - 如何从需要身份验证的链接在 webview 中播放视频?
- angular7 - 在 Angular 7 下拉菜单中设置默认值以外的其他值
- python - 如何在熊猫中连接两个相等的数据帧,通过id区分重复?
- gatling - Wrk vs Gatling 基准测试比较
- python - 图像差异:忽略平移运动
- python - 应用时移