mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
a40586d092
The compiler now implements the copy builtin directly instead of calling sliceCopy. The length is calculated with the llvm.umax.* intrinsics, and the move is performed by llvm.memmove.*. Both of these operations are easily understood by LLVM's optimization passes. The type's alignment is also provided to llvm.memmove.*, which is useful when rewriting the move. Interp no longer needs to reimplement sliceCopy. Some edge case handling was implemented by sliceCopy but not llvm.memmove.*/llvm.memcpy.*. I copied this over, so copies of external slices should work now. Volatile moves/copies are now run at runtime by interp. There is a 4-byte size increase due to some confusing length logic in sendUSBPacket. I will look at sendUSBPacket in a future PR.
12 lines
347 B
LLVM
12 lines
347 B
LLVM
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64--linux"
|
|
|
|
@uminResult = local_unnamed_addr global i32 12
|
|
@sminResult = local_unnamed_addr global i32 -1
|
|
@umaxResult = local_unnamed_addr global i32 -1
|
|
@smaxResult = local_unnamed_addr global i32 12
|
|
|
|
define void @runtime.initAll() local_unnamed_addr {
|
|
ret void
|
|
}
|