aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/device
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2022-08-03 16:24:47 +0200
committerAyke <[email protected]>2022-08-04 12:18:32 +0200
commitc7a23183e822b9eebb639902414a0e08a09fbba0 (patch)
tree894a03fe2f4980a728c8401604d8a2c17503fde5 /src/device
parentf936125658e8aef885a0e31d8fc343859defe63c (diff)
downloadtinygo-c7a23183e822b9eebb639902414a0e08a09fbba0.tar.gz
tinygo-c7a23183e822b9eebb639902414a0e08a09fbba0.zip
all: format code according to Go 1.19 rules
Go 1.19 started reformatting code in a way that makes it more obvious how it will be rendered on pkg.go.dev. It gets it almost right, but not entirely. Therefore, I had to modify some of the comments so that they are formatted correctly.
Diffstat (limited to 'src/device')
-rw-r--r--src/device/arm/arm.go58
-rw-r--r--src/device/arm/semihosting.go1
-rw-r--r--src/device/arm64/arm64.go12
-rw-r--r--src/device/asm.go12
-rw-r--r--src/device/avr/avr.go12
-rw-r--r--src/device/riscv/riscv.go12
6 files changed, 54 insertions, 53 deletions
diff --git a/src/device/arm/arm.go b/src/device/arm/arm.go
index d6f44abcd..04637f317 100644
--- a/src/device/arm/arm.go
+++ b/src/device/arm/arm.go
@@ -2,31 +2,31 @@
//
// Original copyright:
//
-// Copyright (c) 2009 - 2015 ARM LIMITED
+// Copyright (c) 2009 - 2015 ARM LIMITED
//
-// All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-// - Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// - Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-// - Neither the name of ARM nor the names of its contributors may be used
-// to endorse or promote products derived from this software without
-// specific prior written permission.
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// - Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// - Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// - Neither the name of ARM nor the names of its contributors may be used
+// to endorse or promote products derived from this software without
+// specific prior written permission.
//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
package arm
import (
@@ -46,12 +46,12 @@ func Asm(asm string)
// effects, as it would otherwise be optimized away. The inline assembly string
// recognizes template values in the form {name}, like so:
//
-// arm.AsmFull(
-// "str {value}, {result}",
-// map[string]interface{}{
-// "value": 1
-// "result": &dest,
-// })
+// arm.AsmFull(
+// "str {value}, {result}",
+// map[string]interface{}{
+// "value": 1
+// "result": &dest,
+// })
//
// You can use {} in the asm string (which expands to a register) to set the
// return value.
diff --git a/src/device/arm/semihosting.go b/src/device/arm/semihosting.go
index 19e9f22c0..10b6497d1 100644
--- a/src/device/arm/semihosting.go
+++ b/src/device/arm/semihosting.go
@@ -60,5 +60,6 @@ const (
// Call a semihosting function.
// TODO: implement it here using inline assembly.
+//
//go:linkname SemihostingCall SemihostingCall
func SemihostingCall(num int, arg uintptr) int
diff --git a/src/device/arm64/arm64.go b/src/device/arm64/arm64.go
index bfd18ab28..7e8cea6c7 100644
--- a/src/device/arm64/arm64.go
+++ b/src/device/arm64/arm64.go
@@ -9,12 +9,12 @@ func Asm(asm string)
// effects, as it would otherwise be optimized away. The inline assembly string
// recognizes template values in the form {name}, like so:
//
-// arm.AsmFull(
-// "str {value}, {result}",
-// map[string]interface{}{
-// "value": 1
-// "result": &dest,
-// })
+// arm.AsmFull(
+// "str {value}, {result}",
+// map[string]interface{}{
+// "value": 1
+// "result": &dest,
+// })
//
// You can use {} in the asm string (which expands to a register) to set the
// return value.
diff --git a/src/device/asm.go b/src/device/asm.go
index f441b6ae2..49ddbc3ef 100644
--- a/src/device/asm.go
+++ b/src/device/asm.go
@@ -9,12 +9,12 @@ func Asm(asm string)
// effects, as it would otherwise be optimized away. The inline assembly string
// recognizes template values in the form {name}, like so:
//
-// arm.AsmFull(
-// "str {value}, {result}",
-// map[string]interface{}{
-// "value": 1
-// "result": &dest,
-// })
+// arm.AsmFull(
+// "str {value}, {result}",
+// map[string]interface{}{
+// "value": 1
+// "result": &dest,
+// })
//
// You can use {} in the asm string (which expands to a register) to set the
// return value.
diff --git a/src/device/avr/avr.go b/src/device/avr/avr.go
index 12f145dd7..1890e18b5 100644
--- a/src/device/avr/avr.go
+++ b/src/device/avr/avr.go
@@ -9,12 +9,12 @@ func Asm(asm string)
// effects, as it would otherwise be optimized away. The inline assembly string
// recognizes template values in the form {name}, like so:
//
-// avr.AsmFull(
-// "str {value}, {result}",
-// map[string]interface{}{
-// "value": 1
-// "result": &dest,
-// })
+// avr.AsmFull(
+// "str {value}, {result}",
+// map[string]interface{}{
+// "value": 1
+// "result": &dest,
+// })
//
// You can use {} in the asm string (which expands to a register) to set the
// return value.
diff --git a/src/device/riscv/riscv.go b/src/device/riscv/riscv.go
index b621a17c4..1c3c3e63a 100644
--- a/src/device/riscv/riscv.go
+++ b/src/device/riscv/riscv.go
@@ -9,12 +9,12 @@ func Asm(asm string)
// effects, as it would otherwise be optimized away. The inline assembly string
// recognizes template values in the form {name}, like so:
//
-// arm.AsmFull(
-// "st {value}, {result}",
-// map[string]interface{}{
-// "value": 1
-// "result": &dest,
-// })
+// arm.AsmFull(
+// "st {value}, {result}",
+// map[string]interface{}{
+// "value": 1
+// "result": &dest,
+// })
//
// You can use {} in the asm string (which expands to a register) to set the
// return value.