linux x86汇编器到llvm汇编器

时间:2018-12-27 11:38:24

标签: assembly x86 clang gnu nspr

我正在尝试将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

......

0 个答案:

没有答案