diff options
author | Ayke <[email protected]> | 2019-01-05 11:46:25 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2019-01-05 11:46:25 +0100 |
commit | 107fccb288f8ba6258d417c5e14921d4d97f3e64 (patch) | |
tree | db3affb155be28686e50132671818d3f60a7a05c /src/runtime/arch_arm64.go | |
parent | f44dff6f59782a33ebaa33761643fbbfd6a29cb6 (diff) | |
download | tinygo-107fccb288f8ba6258d417c5e14921d4d97f3e64.tar.gz tinygo-107fccb288f8ba6258d417c5e14921d4d97f3e64.zip |
all: add support for more architectures and GOOS/GOARCH (#118)
This commit does two things:
* It adds support for the GOOS and GOARCH environment variables. They
fall back to runtime.GO* only when not available.
* It adds support for 3 new architectures: 386, arm, and arm64. For
now, this is Linux-only.
Diffstat (limited to 'src/runtime/arch_arm64.go')
-rw-r--r-- | src/runtime/arch_arm64.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/runtime/arch_arm64.go b/src/runtime/arch_arm64.go new file mode 100644 index 000000000..09b7b3148 --- /dev/null +++ b/src/runtime/arch_arm64.go @@ -0,0 +1,11 @@ +package runtime + +const GOARCH = "arm64" + +// The bitness of the CPU (e.g. 8, 32, 64). +const TargetBits = 64 + +// Align on word boundary. +func align(ptr uintptr) uintptr { + return (ptr + 7) &^ 7 +} |