libgo: update to Go1.14beta1
[platform/upstream/gcc.git] / libgo / go / runtime / stubs.go
index a2e1530..ae6134d 100644 (file)
@@ -240,11 +240,16 @@ func asmcgocall(fn, arg unsafe.Pointer) int32 {
        return 0
 }
 
-// round n up to a multiple of a.  a must be a power of 2.
-func round(n, a uintptr) uintptr {
+// alignUp rounds n up to a multiple of a. a must be a power of 2.
+func alignUp(n, a uintptr) uintptr {
        return (n + a - 1) &^ (a - 1)
 }
 
+// alignDown rounds n down to a multiple of a. a must be a power of 2.
+func alignDown(n, a uintptr) uintptr {
+       return n &^ (a - 1)
+}
+
 // checkASM returns whether assembly runtime checks have passed.
 func checkASM() bool {
        return true