interp: implement runtime.sliceCopy

This implements the copy() built-in function. It may not work in all
cases, but should work in most cases.

This commit gets the following 3 packages to compile, according to
tinygo-site/imports/main.go:

  * encoding/base32
  * encoding/base64
  * encoding/pem (was blocked by encoding/base64)
This commit is contained in:
Ayke van Laethem
2019-09-22 00:16:26 +02:00
committed by Ayke
parent 4ea1559d46
commit 582457b81e
8 changed files with 201 additions and 7 deletions
+20
View File
@@ -0,0 +1,20 @@
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64--linux"
declare void @runtime.printuint8(i8) local_unnamed_addr
declare void @runtime.printint16(i16) local_unnamed_addr
define void @runtime.initAll() unnamed_addr {
entry:
ret void
}
define void @main() unnamed_addr {
entry:
call void @runtime.printuint8(i8 3)
call void @runtime.printuint8(i8 3)
call void @runtime.printint16(i16 5)
call void @runtime.printint16(i16 5)
ret void
}