github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/interp/testdata/slice-copy.out.ll (about)

     1  target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
     2  target triple = "x86_64--linux"
     3  
     4  @main.sliceSrcTaint.buf = internal global [2 x i8] c"cd"
     5  @main.sliceDstTaint.buf = internal global [2 x i8] zeroinitializer
     6  
     7  declare i64 @runtime.sliceCopy(ptr, ptr, i64, i64, i64) unnamed_addr
     8  
     9  declare void @runtime.printuint8(i8) local_unnamed_addr
    10  
    11  declare void @runtime.printint16(i16) local_unnamed_addr
    12  
    13  declare void @use(ptr) local_unnamed_addr
    14  
    15  define void @runtime.initAll() unnamed_addr {
    16  entry:
    17    call void @use(ptr @main.sliceSrcTaint.buf)
    18    %copy.n4 = call i64 @runtime.sliceCopy(ptr @main.sliceDstTaint.buf, ptr @main.sliceSrcTaint.buf, i64 2, i64 2, i64 1)
    19    ret void
    20  }
    21  
    22  define void @main() unnamed_addr {
    23  entry:
    24    call void @runtime.printuint8(i8 3)
    25    call void @runtime.printuint8(i8 3)
    26    call void @runtime.printint16(i16 5)
    27    call void @runtime.printint16(i16 5)
    28    call void @runtime.printuint8(i8 97)
    29    %sliceDstTaint.val = load i8, ptr @main.sliceDstTaint.buf, align 1
    30    call void @runtime.printuint8(i8 %sliceDstTaint.val)
    31    ret void
    32  }