assembly - linux x86 汇编器到 llvm 汇编器
问题描述
我正在尝试将 linux x86 汇编器翻译为 llvm 汇编器。
实际上,我没有任何汇编程序,是否可以将 GNU 汇编程序翻译或反编译为 llvm 汇编程序?
如果有,工具是什么?
还是需要用clang反编译和组装?
----------- NSPR 中的 os_Linux_x86.s :
// -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// PRInt32 _PR_x86_AtomicIncrement(PRInt32 *val)
//
// Atomically increment the integer pointed to by 'val' and return
// the result of the increment.
//
.text
.globl _PR_x86_AtomicIncrement
.align 4
_PR_x86_AtomicIncrement:
movl 4(%esp), %ecx
movl $1, %eax
lock
xaddl %eax, (%ecx)
incl %eax
ret
......
解决方案
推荐阅读
- node.js - 如何配置终端以读取 UTF-8 字符?
- javascript - 如何获得所需的输出?2 输入名字和出生日期?
- azure - Azure Site Recovery 受保护的 VM 限制为 10
- swift - 如何阻止我的所有 SWIFTUI 按钮一起切换?
- javascript - Firestore 多 whereFilter 查询
- javascript - 确保对象进入正确的存储桶
- angular - 离子图像未在离子 3 中显示图像
- python - 如何在 GitHub 中安装适用于 python 的 GEM 包?
- python - 如何解析字典字符串中的特定值
- python - python中的gcloud和google-cloud模块有什么区别