Skip to content

Commit 39029cc

Browse files
Run Nick G's spellchecker github.com/client9/misspell, carefuly fix what it found (#4235)
1 parent 7122755 commit 39029cc

39 files changed

+48
-48
lines changed

compileopts/target.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type TargetSpec struct {
2626
Inherits []string `json:"inherits,omitempty"`
2727
Triple string `json:"llvm-target,omitempty"`
2828
CPU string `json:"cpu,omitempty"`
29-
ABI string `json:"target-abi,omitempty"` // rougly equivalent to -mabi= flag
29+
ABI string `json:"target-abi,omitempty"` // roughly equivalent to -mabi= flag
3030
Features string `json:"features,omitempty"`
3131
GOOS string `json:"goos,omitempty"`
3232
GOARCH string `json:"goarch,omitempty"`

compiler/compiler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,7 +2181,7 @@ func (b *builder) createExpr(expr ssa.Value) (llvm.Value, error) {
21812181
return llvm.Value{}, b.makeError(expr.Pos(), "todo: indexaddr: "+ptrTyp.String())
21822182
}
21832183

2184-
// Make sure index is at least the size of uintptr becuase getelementptr
2184+
// Make sure index is at least the size of uintptr because getelementptr
21852185
// assumes index is a signed integer.
21862186
index = b.extendInteger(index, expr.Index.Type(), b.uintptrType)
21872187

@@ -2557,7 +2557,7 @@ func (b *builder) createBinOp(op token.Token, typ, ytyp types.Type, x, y llvm.Va
25572557
sizeY := b.targetData.TypeAllocSize(y.Type())
25582558

25592559
// Check if the shift is bigger than the bit-width of the shifted value.
2560-
// This is UB in LLVM, so it needs to be handled seperately.
2560+
// This is UB in LLVM, so it needs to be handled separately.
25612561
// The Go spec indirectly defines the result as 0.
25622562
// Negative shifts are handled earlier, so we can treat y as unsigned.
25632563
overshifted := b.CreateICmp(llvm.IntUGE, y, llvm.ConstInt(y.Type(), 8*sizeX, false), "shift.overflow")

compiler/llvmutil/llvm.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Package llvmutil contains utility functions used across multiple compiler
2-
// packages. For example, they may be used by both the compiler pacakge and
2+
// packages. For example, they may be used by both the compiler package and
33
// transformation packages.
44
//
55
// Normally, utility packages are avoided. However, in this case, the utility
@@ -28,7 +28,7 @@ func CreateEntryBlockAlloca(builder llvm.Builder, t llvm.Type, name string) llvm
2828
}
2929

3030
// CreateTemporaryAlloca creates a new alloca in the entry block and adds
31-
// lifetime start infromation in the IR signalling that the alloca won't be used
31+
// lifetime start information in the IR signalling that the alloca won't be used
3232
// before this point.
3333
//
3434
// This is useful for creating temporary allocas for intrinsics. Don't forget to

loader/goroot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func listGorootMergeLinks(goroot, tinygoroot string, overrides map[string]bool)
214214
return merges, nil
215215
}
216216

217-
// needsSyscallPackage returns whether the syscall package should be overriden
217+
// needsSyscallPackage returns whether the syscall package should be overridden
218218
// with the TinyGo version. This is the case on some targets.
219219
func needsSyscallPackage(buildTags []string) bool {
220220
for _, tag := range buildTags {

loader/loader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ func (p *Package) parseFiles() ([]*ast.File, error) {
430430
var files []*ast.File
431431
var fileErrs []error
432432

433-
// Parse all files (incuding CgoFiles).
433+
// Parse all files (including CgoFiles).
434434
parseFile := func(file string) {
435435
if !filepath.IsAbs(file) {
436436
file = filepath.Join(p.Dir, file)

src/internal/bytealg/bytealg.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func Count(b []byte, c byte) int {
5757
// Count the number of instances of a byte in a string.
5858
func CountString(s string, c byte) int {
5959
// Use a simple implementation, as there is no intrinsic that does this like we want.
60-
// Currently, the compiler does not generate zero-copy byte-string conversions, so this needs to be seperate from Count.
60+
// Currently, the compiler does not generate zero-copy byte-string conversions, so this needs to be separate from Count.
6161
n := 0
6262
for i := 0; i < len(s); i++ {
6363
if s[i] == c {
@@ -216,7 +216,7 @@ func HashStrRev[T string | []byte](sep T) (uint32, uint32) {
216216
}
217217

218218
// IndexRabinKarpBytes uses the Rabin-Karp search algorithm to return the index of the
219-
// first occurence of substr in s, or -1 if not present.
219+
// first occurrence of substr in s, or -1 if not present.
220220
//
221221
// This function was removed in Go 1.22.
222222
func IndexRabinKarpBytes(s, sep []byte) int {

src/internal/task/task_stack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func Current() *Task {
4444
// This function may only be called when running on a goroutine stack, not when running on the system stack or in an interrupt.
4545
func Pause() {
4646
// Check whether the canary (the lowest address of the stack) is still
47-
// valid. If it is not, a stack overflow has occured.
47+
// valid. If it is not, a stack overflow has occurred.
4848
if *currentTask.state.canaryPtr != stackCanary {
4949
runtimePanic("goroutine stack overflow")
5050
}

src/machine/board_nano-33-ble.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
// SoftDevice (s140v7) must be flashed first to enable use of bluetooth on this board.
2727
// See https://github.com/tinygo-org/bluetooth
2828
//
29-
// SoftDevice overwrites original bootloader and flashing method described above is not avalable anymore.
29+
// SoftDevice overwrites original bootloader and flashing method described above is not available anymore.
3030
// Instead, please use debug probe and flash your code with "nano-33-ble-s140v7" target.
3131
package machine
3232

src/machine/machine_atsamd21.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ func (spi SPI) Transfer(w byte) (byte, error) {
13041304
return byte(spi.Bus.DATA.Get()), nil
13051305
}
13061306

1307-
// Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
1307+
// Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
13081308
// interface, there must always be the same number of bytes written as bytes read.
13091309
// The Tx method knows about this, and offers a few different ways of calling it.
13101310
//
@@ -1459,7 +1459,7 @@ func (tcc *TCC) Configure(config PWMConfig) error {
14591459
for tcc.timer().SYNCBUSY.Get() != 0 {
14601460
}
14611461

1462-
// Return any error that might have occured in the tcc.setPeriod call.
1462+
// Return any error that might have occurred in the tcc.setPeriod call.
14631463
return err
14641464
}
14651465

@@ -1606,7 +1606,7 @@ func (tcc *TCC) Counter() uint32 {
16061606
return tcc.timer().COUNT.Get()
16071607
}
16081608

1609-
// Some constans to make pinTimerMapping below easier to read.
1609+
// Some constants to make pinTimerMapping below easier to read.
16101610
const (
16111611
pinTCC0 = 1
16121612
pinTCC1 = 2
@@ -1759,7 +1759,7 @@ func (tcc *TCC) Set(channel uint8, value uint32) {
17591759
}
17601760
}
17611761

1762-
// EnterBootloader should perform a system reset in preperation
1762+
// EnterBootloader should perform a system reset in preparation
17631763
// to switch to the bootloader to flash new firmware.
17641764
func EnterBootloader() {
17651765
arm.DisableInterrupts()

src/machine/machine_atsamd51.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,7 +1587,7 @@ func (spi SPI) Transfer(w byte) (byte, error) {
15871587
return byte(spi.Bus.DATA.Get()), nil
15881588
}
15891589

1590-
// Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
1590+
// Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
15911591
// interface, there must always be the same number of bytes written as bytes read.
15921592
// The Tx method knows about this, and offers a few different ways of calling it.
15931593
//
@@ -1720,7 +1720,7 @@ func (tcc *TCC) Configure(config PWMConfig) error {
17201720
for tcc.timer().SYNCBUSY.Get() != 0 {
17211721
}
17221722

1723-
// Return any error that might have occured in the tcc.setPeriod call.
1723+
// Return any error that might have occurred in the tcc.setPeriod call.
17241724
return err
17251725
}
17261726

src/machine/machine_atsame5x_can.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func (can *CAN) Configure(config CANConfig) error {
155155
}
156156

157157
// Callbacks to be called for CAN.SetInterrupt(). Wre're using the magic
158-
// constant 2 and 32 here beacuse th SAM E51/E54 has 2 CAN and 32 interrupt
158+
// constant 2 and 32 here because the SAM E51/E54 has 2 CAN and 32 interrupt
159159
// sources.
160160
var (
161161
canInstances [2]*CAN

src/machine/machine_esp32.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ func (spi SPI) Transfer(w byte) (byte, error) {
460460
return byte(spi.Bus.W0.Get()), nil
461461
}
462462

463-
// Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
463+
// Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
464464
// interface, there must always be the same number of bytes written as bytes read.
465465
// This is accomplished by sending zero bits if r is bigger than w or discarding
466466
// the incoming data if w is bigger than r.

src/machine/machine_esp32c3.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ func (uart *UART) configure(config UARTConfig, regs registerSet) error {
312312

313313
initUARTClock(uart.Bus, regs)
314314

315-
// - disbale TX/RX clock to make sure the UART transmitter or receiver is not at work during configuration
315+
// - disable TX/RX clock to make sure the UART transmitter or receiver is not at work during configuration
316316
uart.Bus.SetCLK_CONF_TX_SCLK_EN(0)
317317
uart.Bus.SetCLK_CONF_RX_SCLK_EN(0)
318318

src/machine/machine_esp32c3_spi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ func (spi SPI) Transfer(w byte) (byte, error) {
234234
return byte(spi.Bus.GetW0()), nil
235235
}
236236

237-
// Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
237+
// Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
238238
// interface, there must always be the same number of bytes written as bytes read.
239239
// This is accomplished by sending zero bits if r is bigger than w or discarding
240240
// the incoming data if w is bigger than r.

src/machine/machine_generic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func (spi SPI) Transfer(w byte) (byte, error) {
6666
return spiTransfer(spi.Bus, w), nil
6767
}
6868

69-
// Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
69+
// Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
7070
// interface, there must always be the same number of bytes written as bytes read.
7171
// The Tx method knows about this, and offers a few different ways of calling it.
7272
//

src/machine/machine_nrf.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (p Pin) Get() bool {
108108
func (p Pin) SetInterrupt(change PinChange, callback func(Pin)) error {
109109
// Some variables to easily check whether a channel was already configured
110110
// as an event channel for the given pin.
111-
// This is not just an optimization, this is requred: the datasheet says
111+
// This is not just an optimization, this is required: the datasheet says
112112
// that configuring more than one channel for a given pin results in
113113
// unpredictable behavior.
114114
expectedConfigMask := uint32(nrf.GPIOTE_CONFIG_MODE_Msk | nrf.GPIOTE_CONFIG_PSEL_Msk)

src/machine/machine_nrf51.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func (spi SPI) Transfer(w byte) (byte, error) {
133133
return byte(r), nil
134134
}
135135

136-
// Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
136+
// Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
137137
// interface, there must always be the same number of bytes written as bytes read.
138138
// The Tx method knows about this, and offers a few different ways of calling it.
139139
//

src/machine/machine_nrf52xxx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ func (spi SPI) Transfer(w byte) (byte, error) {
277277
return buf[0], err
278278
}
279279

280-
// Tx handles read/write operation for SPI interface. Since SPI is a syncronous
280+
// Tx handles read/write operation for SPI interface. Since SPI is a synchronous
281281
// write/read interface, there must always be the same number of bytes written
282282
// as bytes read. Therefore, if the number of bytes don't match it will be
283283
// padded until they fit: if len(w) > len(r) the extra bytes received will be

src/machine/machine_rp2040_i2c.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ func (i2c *I2C) tx(addr uint8, tx, rx []byte, timeout_us uint64) (err error) {
348348
}
349349
if abort || last {
350350
// If the transaction was aborted or if it completed
351-
// successfully wait until the STOP condition has occured.
351+
// successfully wait until the STOP condition has occurred.
352352

353353
// TODO Could there be an abort while waiting for the STOP
354354
// condition here? If so, additional code would be needed here

src/machine/machine_rp2040_spi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type SPI struct {
4848
Bus *rp.SPI0_Type
4949
}
5050

51-
// Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
51+
// Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
5252
// interface, there must always be the same number of bytes written as bytes read.
5353
// The Tx method knows about this, and offers a few different ways of calling it.
5454
//

src/machine/machine_stm32l5x2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const APB2_TIM_FREQ = 110e6 // 110MHz
2323
// Configure the UART.
2424
func (uart *UART) configurePins(config UARTConfig) {
2525
if config.RX.getPort() == stm32.GPIOG || config.TX.getPort() == stm32.GPIOG {
26-
// Enable VDDIO2 power supply, which is an independant power supply for the PGx pins
26+
// Enable VDDIO2 power supply, which is an independent power supply for the PGx pins
2727
stm32.PWR.CR2.SetBits(stm32.PWR_CR2_IOSV)
2828
}
2929

src/machine/spi_tx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
package machine
77

8-
// Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
8+
// Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
99
// interface, there must always be the same number of bytes written as bytes read.
1010
// The Tx method knows about this, and offers a few different ways of calling it.
1111
//

src/os/filesystem.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type Filesystem interface {
3030
// OpenFile opens the named file.
3131
OpenFile(name string, flag int, perm FileMode) (uintptr, error)
3232

33-
// Mkdir creates a new directoy with the specified permission (before
33+
// Mkdir creates a new directory with the specified permission (before
3434
// umask). Some filesystems may not support directories or permissions.
3535
Mkdir(name string, perm FileMode) error
3636

src/os/seek_unix_bad.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
// In particular, on i386 and arm, the function syscall.seek is missing, breaking syscall.Seek.
1212
// This in turn causes os.(*File).Seek, time, io/fs, and path/filepath to fail to link.
1313
//
14-
// To temporarly let all the above at least link, provide a stub for syscall.seek.
14+
// To temporarily let all the above at least link, provide a stub for syscall.seek.
1515
// This belongs in syscall, but on linux, we use upstream's syscall.
1616
// Remove once we support Go Assembly.
1717
// TODO: make this a non-stub, and thus fix the whole problem?

src/runtime/chan.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func (b *channelBlockedList) remove(old *channelBlockedList) *channelBlockedList
7676
return b
7777
}
7878

79-
// detatch removes all other channel operations that are part of the same select statement.
79+
// detach removes all other channel operations that are part of the same select statement.
8080
// If the input is not part of a select statement, this is a no-op.
8181
// This must be called before resuming any task blocked on a channel operation in order to ensure that it is not placed on the runqueue twice.
8282
func (b *channelBlockedList) detach() {
@@ -88,7 +88,7 @@ func (b *channelBlockedList) detach() {
8888
// cancel all other channel operations that are part of this select statement
8989
switch {
9090
case &b.allSelectOps[i] == b:
91-
// This entry is the one that was already detatched.
91+
// This entry is the one that was already detached.
9292
continue
9393
case v.t == nil:
9494
// This entry is not used (nil channel).

src/runtime/gc_blocks.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ func GC() {
410410
runGC()
411411
}
412412

413-
// runGC performs a garbage colleciton cycle. It is the internal implementation
413+
// runGC performs a garbage collection cycle. It is the internal implementation
414414
// of the runtime.GC() function. The difference is that it returns the number of
415415
// free bytes in the heap after the GC is finished.
416416
func runGC() (freeBytes uintptr) {
@@ -424,7 +424,7 @@ func runGC() (freeBytes uintptr) {
424424

425425
if baremetal && hasScheduler {
426426
// Channel operations in interrupts may move task pointers around while we are marking.
427-
// Therefore we need to scan the runqueue seperately.
427+
// Therefore we need to scan the runqueue separately.
428428
var markedTaskQueue task.Queue
429429
runqueueScan:
430430
for !runqueue.Empty() {

src/runtime/gc_precise.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// however use a bit more RAM to store the layout of each object.
88
//
99
// The pointer/non-pointer information for objects is stored in the first word
10-
// of the object. It is described below but in essense it contains a bitstring
10+
// of the object. It is described below but in essence it contains a bitstring
1111
// of a particular size. This size does not indicate the size of the object:
1212
// instead the allocated object is a multiple of the bitstring size. This is so
1313
// that arrays and slices can store the size of the object efficiently. The

src/runtime/interrupt/interrupt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func New(id int, handler func(Interrupt)) Interrupt
2626
// and use that in an Interrupt object. That way the compiler will be able to
2727
// optimize away all interrupt handles that are never used in a program.
2828
// This system only works when interrupts need to be enabled before use and this
29-
// is done only through calling Enable() on this object. If interrups cannot
29+
// is done only through calling Enable() on this object. If interrupts cannot
3030
// individually be enabled/disabled, the compiler should create a pseudo-call
3131
// (like runtime/interrupt.use()) that keeps the interrupt alive.
3232
type handle struct {

src/runtime/interrupt/interrupt_esp32c3.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func handleInterrupt() {
169169
// save MSTATUS & MEPC, which could be overwritten by another CPU interrupt
170170
mstatus := riscv.MSTATUS.Get()
171171
mepc := riscv.MEPC.Get()
172-
// Useing threshold to temporary disable this interrupts.
172+
// Using threshold to temporary disable this interrupts.
173173
// FYI: using CPU interrupt enable bit make runtime to loose interrupts.
174174
reg := (*volatile.Register32)(unsafe.Add(unsafe.Pointer(&esp.INTERRUPT_CORE0.CPU_INT_PRI_0), interruptNumber*4))
175175
thresholdSave := reg.Get()

src/runtime/os_darwin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func findGlobals(found func(start, end uintptr)) {
107107
}
108108
}
109109

110-
// Move on to the next load command (wich may or may not be a
110+
// Move on to the next load command (which may or may not be a
111111
// LC_SEGMENT_64).
112112
cmd = (*segmentLoadCommand)(unsafe.Add(unsafe.Pointer(cmd), cmd.cmdsize))
113113
}

src/runtime/runtime_atsamd21.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ func readRTC() uint32 {
318318

319319
// ticks are in microseconds
320320
// Returns true if the timer completed.
321-
// Returns false if another interrupt occured which requires an early return to scheduler.
321+
// Returns false if another interrupt occurred which requires an early return to scheduler.
322322
func timerSleep(ticks uint32) bool {
323323
timerWakeup.Set(0)
324324
if ticks < 7 {

src/runtime/runtime_atsamd51.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ func readRTC() uint32 {
307307

308308
// ticks are in microseconds
309309
// Returns true if the timer completed.
310-
// Returns false if another interrupt occured which requires an early return to scheduler.
310+
// Returns false if another interrupt occurred which requires an early return to scheduler.
311311
func timerSleep(ticks uint32) bool {
312312
timerWakeup.Set(0)
313313
if ticks < 8 {

src/runtime/runtime_avrtiny.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func sleepTicks(d timeUnit) {
115115
// Sleep until the next interrupt happens.
116116
avr.Asm("sei\nsleep\ncli")
117117
if cmpMatch.Get() != 0 {
118-
// The CMP interrupt occured, so we have slept long enough.
118+
// The CMP interrupt occurred, so we have slept long enough.
119119
cmpMatch.Set(0)
120120
break
121121
}

src/runtime/runtime_cortexm_hardfault.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
// This function is called at HardFault.
1010
// Before this function is called, the stack pointer is reset to the initial
11-
// stack pointer (loaded from addres 0x0) and the previous stack pointer is
11+
// stack pointer (loaded from address 0x0) and the previous stack pointer is
1212
// passed as an argument to this function. This allows for easy inspection of
1313
// the stack the moment a HardFault occurs, but it means that the stack will be
1414
// corrupted by this function and thus this handler must not attempt to recover.

src/runtime/runtime_fe310.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func handleInterrupt() {
8585
riscv.MCAUSE.Set(0)
8686
}
8787

88-
// initPeripherals configures periperhals the way the runtime expects them.
88+
// initPeripherals configures peripherals the way the runtime expects them.
8989
func initPeripherals() {
9090
// Configure PLL to output 320MHz.
9191
// R=2: divide 16MHz to 8MHz

0 commit comments

Comments
 (0)