translator: add memory debug information to x86
This commit is contained in:
@@ -2,12 +2,14 @@
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-pc-linux-gnu"
|
||||
|
||||
declare i8* @malloc_heap(i32) #1
|
||||
|
||||
; Function Attrs: nounwind uwtable
|
||||
define weak i32 @malloc_array(i32 %x) #0 {
|
||||
%1 = alloca i32, align 4
|
||||
store i32 %x, i32* %1, align 4
|
||||
%2 = load i32* %1, align 4
|
||||
%3 = call i8* @malloc(i32 %2)
|
||||
%3 = call i8* @malloc_heap(i32 %2)
|
||||
%4 = ptrtoint i8* %3 to i32
|
||||
ret i32 %4
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user