tinygo/compiler
Ayke van Laethem 9e8739bb47 compiler: replace math aliases with intrinsics
This is really a few more-or-less separate changes:

  * Remove all math aliases that were used in Go 1.16 and below (the
    math.[A-Z] aliases).
  * Replace math aliases with an assembly implementation (the math.arch*
    aliases) with a LLVM intrinsic, where one is available.
  * Include missing math functions in picolibc build.

This leaves just four math aliases:

  * math.archHypot and math.archModf do not have a LLVM builtin
    equivalent. They could be replaced with calls to libm, and I think
    that would be a good idea in the long term.
  * math.archMax and math.archMin do have a LLVM builtin equivalent
    (llvm.maximum.f64, llvm.minimum.f64), but unfortunately they crash
    when used. Apparently these exact operations are not yet widely
    supported in hardware and they don't have a libm equivalent either.

There are more LLVM builtins that we could use for the math package
(such as FMA), but I will leave that to a future change. It could
potentially speed up some math operations.
2022-08-30 17:33:16 +02:00
..
ircheck Fix incorrect formatting arguments 2022-04-10 22:58:16 +02:00
llvmutil builder: free LLVM objects after use 2022-05-30 07:53:28 +02:00
testdata compiler: replace some math operation bodies with fast intrinsics 2022-08-30 17:33:16 +02:00
alias.go compiler: replace math aliases with intrinsics 2022-08-30 17:33:16 +02:00
asserts.go compiler: insert basic blocks at an appropriate location 2022-06-16 07:59:21 +02:00
atomic.go compiler: define atomic intrinsic functions directly 2022-06-24 11:10:24 +02:00
calls.go compiler: implement recover() built-in function 2022-06-16 07:59:21 +02:00
channel.go compiler: avoid zero-sized alloca in channel operations 2021-09-09 11:24:52 +02:00
compiler.go compiler: replace math aliases with intrinsics 2022-08-30 17:33:16 +02:00
compiler_test.go compiler: replace some math operation bodies with fast intrinsics 2022-08-30 17:33:16 +02:00
defer.go darwin: don't clobber X18 and FP registers 2022-07-26 09:02:06 +02:00
errors.go all: fix staticcheck warnings 2021-09-27 15:47:12 +02:00
func.go compiler: remove parentHandle from calling convention 2022-01-19 14:42:02 -05:00
gc.go compiler: track the result of string concatenation 2020-04-02 14:04:25 +02:00
goroutine.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
inlineasm.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
interface.go all: format code according to Go 1.19 rules 2022-08-04 12:18:32 +02:00
interrupt.go transform: refactor interrupt lowering 2021-11-06 09:40:15 +01:00
intrinsics.go compiler: replace math aliases with intrinsics 2022-08-30 17:33:16 +02:00
llvm.go archFamily(): arm64 is aarch64, not arm; fixes #2985 2022-07-15 17:41:39 +02:00
map.go src/runtime: first darft of map growth code 2022-04-28 09:14:45 +02:00
sizes.go compiler: alignof(func) is 1 pointer, not 2 2022-05-25 11:01:00 +02:00
symbol.go compiler: add support for type parameters (aka generics) 2022-06-11 20:41:16 +02:00
syscall.go compiler: drop support for macos syscalls via inline assembly 2022-06-24 12:51:18 +02:00
volatile.go compiler: replace some math operation bodies with fast intrinsics 2022-08-30 17:33:16 +02:00