[英]Halide: X86 assembly code generation
I'm new in Halide. 我是Halide的新手。 I am trying to compile camera_pipe application from the source code ( https://github.com/halide/Halide/tree/master/apps/camera_pipe ).
我正在尝试从源代码( https://github.com/halide/Halide/tree/master/apps/camera_pipe )编译camera_pipe应用程序。 I have successfully compiled camera_pipe.cpp.
我已经成功编译了camera_pipe.cpp。 It generates "curved.s" assembly code.
它生成“ curved.s”汇编代码。
# Lfunc_begin0:
.loc 3 12 0
#/data/nfs_home/akafi/Halide_CoreIR/src/runtime/posix_allocator.cpp:12:0
.cfi_startproc
#BB#0:
pushq %rbp
.Ltmp0:
.cfi_def_cfa_offset 16
.Ltmp1:
.cfi_offset %rbp, -16
movq %rsp, %rbp
.Ltmp2:
.cfi_def_cfa_register %rbp
#DEBUG_VALUE: default_malloc:user_context <- %RDI
#DEBUG_VALUE: default_malloc:x <- %RSI
.Ltmp3:
#DEBUG_VALUE: default_malloc:alignment <- 128
.loc 3 15 27 prologue_end
#/data/nfs_home/akafi/Halide_CoreIR/src/runtime/posix_allocator.cpp:15:27
subq $-128, %rsi
.Ltmp4:
.loc 3 15 18 is_stmt 0
# /data/nfs_home/akafi/Halide_CoreIR/src/runtime/posix_allocator.cpp:15:18
movq %rsi, %rdi
.Ltmp5:
callq malloc@PLT
movq %rax, %rcx
.Ltmp6:
#DEBUG_VALUE: default_malloc:orig <- %RCX
xorl %eax, %eax
.loc 3 16 14 is_stmt 1
# /data/nfs_home/akafi/Halide_CoreIR/src/runtime/posix_allocator.cpp:16:14
.Ltmp7:
testq %rcx, %rcx
je .LBB0_2
.Ltmp8:
# BB#1:
#DEBUG_VALUE: default_malloc:orig <- %RCX
.loc 3 21 68
# data/nfs_home/akafi/Halide_CoreIR/src/runtime/posix_allocator.cpp:21:68
movq %rcx, %rax
addq $135, %rax
......
......
I have tried to debug the source code. 我试图调试源代码。 I found that he "camera_pipe.cpp" called the "/Halide_CoreIR/src/CodeGen_X86.cpp".
我发现他的“ camera_pipe.cpp”称为“ /Halide_CoreIR/src/CodeGen_X86.cpp”。
The generated assembly doesn't look like X86 assembly. 生成的程序集看起来不像X86程序集。 Then what is the fuction of "CodeGen_X86.cpp"?
那么“ CodeGen_X86.cpp”的功能是什么?
It sounds like you may be building using a very old Halide tree—for quite a while there has not any file camera_pipe.cpp
, the generated output is not called curved.*
, etc. 听起来您可能正在使用一棵非常古老的Halide树进行构建-相当长一段时间以来,没有任何文件
camera_pipe.cpp
,生成的输出不称为camera_pipe.cpp
curved.*
等。
That said, the x86 backend in CodeGen_X86.cpp
does generate x86 code. 也就是说,
CodeGen_X86.cpp
中的x86后端CodeGen_X86.cpp
会生成x86代码。 The curved.s
you posted is x86_64 assembly. 您发布的
curved.s
是x86_64组件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.