github.com/f-secure-foundry/tamago@v0.0.0-20220307101044-d73fcdd7f11b/soc/bcm2835/timer.s (about)

     1  // BCM2835 SoC support
     2  // https://github.com/f-secure-foundry/tamago
     3  //
     4  // Use of this source code is governed by the license
     5  // that can be found in the LICENSE file.
     6  
     7  // func read_systimer() int64
     8  TEXT ·read_systimer(SB),$0-8
     9  	MOVW	·peripheralBase(SB), R2
    10  	ADD	$0x00003000, R2 // timer peripheral offset
    11  
    12  	MOVW	4(R2), R0 // lower 32-bits
    13  	MOVW	8(R2), R1 // upper 32-bits
    14  
    15  	MOVW	R0, ret_lo+0(FP)
    16  	MOVW	R1, ret_hi+4(FP)
    17  
    18  	RET