📄 hal_power.ms
字号:
ld.w %r7,0x0
ld.b [%sp+0x0],%r7 ; xld.b [%sp],%r7
.loc 173
ld.w %r0,0x3 ; xld.w %r0,0x00000003 ; 3
.loc 174
ld.w %r1,0x2 ; xld.w %r1,0x00000002 ; 2
__LX37: ; __L37:
.loc 178
and %r3,0xf ; xand %r3,%r3,0x0000000f
.loc 179
ext 0xf ; xand %r2,%r2,0x000003ff
and %r2,0x3f
.loc 180
and %r0,0x3 ; xand %r0,%r0,0x00000003
.loc 183
ld.w %r12,0x1 ; xld.w %r12,0x00000001 ; 1
ext PowerSaveMode@rm ; xcall PowerSaveMode
call PowerSaveMode@rl
.loc 184
ld.w %r13,%r3
sll %r13,0x8 ; xsll %r13,12
sll %r13,0x4
ld.w %r10,%r2
sll %r10,0x2 ; xsll %r10,2
or %r13,%r10
or %r13,%r0
ld.uh %r13,%r13
ld.w %r12,0xe ; xld.w %r12,0x0000000e ; 14
ext halWriteReg16@rh ; xcall halWriteReg16
ext halWriteReg16@rm
call halWriteReg16@rl
.loc 185
ld.w %r12,0x10 ; xld.w %r12,0x00000010 ; 16
ld.w %r13,%r1
sll %r13,0x8 ; xsll %r13,12
sll %r13,0x4
ext halWriteReg16@rh ; xcall halWriteReg16
ext halWriteReg16@rm
call halWriteReg16@rl
.loc 186
ld.w %r12,0x12 ; xld.w %r12,0x00000012 ; 18
ld.w %r13,0x0
ext halWriteReg16@rh ; xcall halWriteReg16
ext halWriteReg16@rm
call halWriteReg16@rl
.loc 190
ld.w %r12,0x0
ext PowerSaveMode@rm ; xcall PowerSaveMode
call PowerSaveMode@rl
.loc 192
ld.ub %r10,[%sp+0x0] ; xld.ub %r10,[%sp]
.loc 193
.def bend, scl 110, type 0x0, endef
add %sp,0x1 ; xadd %sp,%sp,4
popn %r3
ret
.def end, scl 111, type 0x0, endef
.align 1
.def GetPll, val GetPll, scl 2, type 0x2f, endef
.global GetPll
.loc 202
.def ent, scl 101, type 0x0, endef
GetPll:
; .frame %sp,24,$31 # vars= 4, regs= 5/0, args= 0, extra= 0
; .mask 0x800f0000,-4
; .fmask 0x00000000,0
pushn %r3
sub %sp,0x1 ; xsub %sp,%sp,4
ld.w %r1,%r13
.def WhichPll, val 12, scl 17, type 0xd, endef
.def error, val 1, scl 17, type 0x15, endef
.loc 203
.def begin, scl 100, type 0x0, endef
.def N, val 11, scl 4, type 0xf, endef
.def L, val 10, scl 4, type 0xf, endef
.def V, val 0, scl 4, type 0xf, endef
.def pll, val 2, scl 4, type 0xf, endef
.def Kv, val 12, scl 4, type 0xf, endef
.def reg, val 12, scl 4, type 0xd, endef
.def factor, val 11, scl 4, type 0xf, endef
.def tmp, val 0, scl 1, type 0x5, endef
.loc 209
cmp %r1,0x0
jrne __LX54 ; xjrne __L54
.loc 210
ld.w %r1,%sp
__LX54: ; __L54:
.loc 212
ld.w %r14,0x0
ld.w [%r1],%r14 ; xld.w [%r1],%r14
.loc 214
ld.uh %r10,%r12
cmp %r10,0x0
jreq __LX55 ; xjreq __L55
.loc 216
ld.w %r10,0x1 ; xld.w %r10,0x00000001 ; 1
ld.w [%r1],%r10 ; xld.w [%r1],%r10
.loc 217
ld.w %r10,0x0
jp __LX67 ; xjp __L67
__LX55: ; __L55:
.loc 220
ld.w %r12,0xe ; xld.w %r12,0x0000000e ; 14
ext halReadReg16@rh ; xcall halReadReg16
ext halReadReg16@rm
call halReadReg16@rl
ld.w %r12,%r10
.loc 222
ld.uh %r10,%r12
ld.w %r11,%r10
srl %r11,0x8 ; xsrl %r11,12
srl %r11,0x4
.loc 223
srl %r10,0x2 ; xsrl %r10,2
ext 0xf ; xand %r10,%r10,0x000003ff
and %r10,0x3f
.loc 225
ext 0x1 ; xadd %r2,%r11,1
add %r2,%r11
add %r10,0x1 ; xadd %r10,%r10,1
mlt.w %r2,%r10
ld.w %r2,%alr
ext HalInfo+0x120@h ; xld.w %r11,HalInfo+288
ext HalInfo+0x120@m
ld.w %r11,HalInfo+0x120@l
ld.w %r10,[%r11] ; xld.w %r10,[%r11]
mlt.w %r2,%r10
ld.w %r2,%alr
.loc 231
ext 0x28 ; xld.w %r10,[%r11+40]
ld.w %r10,[%r11]
ext 0x2 ; xand %r10,%r10,0x00000080
and %r10,0x0
jrne __LX56 ; xjrne __L56
.loc 234
ld.w %r10,%r12
and %r10,0x3 ; xand %r10,%r10,0x00000003
ld.w %r3,0x1 ; xld.w %r3,0x00000001 ; 1
ld.w %r0,%r3
ld.w %r9,%r10 ; xsll %r0,%r10
and %r9,0x1f
cmp %r9,0x8
jrle 4
sll %r0,0x8
jp.d -3
sub %r9,0x8
sll %r0,%r9
.loc 235
ld.w %r12,0x10 ; xld.w %r12,0x00000010 ; 16
ext halReadReg16@rh ; xcall halReadReg16
ext halReadReg16@rm
call halReadReg16@rl
ld.uh %r10,%r10
ld.w %r12,%r10
srl %r12,0x8 ; xsrl %r12,12
srl %r12,0x4
.loc 237
mlt.w %r2,%r0
ld.w %r11,%alr
.loc 239
ld.w %r10,%r11 ; xsub %r10,%r11,100000000
ext 0xbe
ext 0x1784
sub %r10,0x0
ext 0x24f ; xcmp %r10,310000000
ext 0x8e6
cmp %r10,0x0
jrugt __LX57 ; xjrugt __L57
.loc 241
ext 0xbe ; xcmp %r10,100000000
ext 0x1784
cmp %r10,0x0
jrugt __LX58 ; xjrugt __L58
.loc 243
cmp %r12,0x2 ; xcmp %r12,2
jreq __LX56 ; xjreq __L56
.loc 244
ld.w [%r1],%r3 ; xld.w [%r1],%r3
.loc 245
jp __LX56 ; xjp __L56
__LX58: ; __L58:
.loc 246
ld.w %r10,%r11 ; xsub %r10,%r11,200000001
ext 0x17d
ext 0xf08
sub %r10,0x1
ext 0xbe ; xcmp %r10,99999999
ext 0x1783
cmp %r10,0x3f
jrugt __LX61 ; xjrugt __L61
.loc 248
cmp %r12,0x5 ; xcmp %r12,5
jreq __LX56 ; xjreq __L56
.loc 250
jp __LX57 ; xjp __L57
__LX61: ; __L61:
.loc 251
ld.w %r10,%r11 ; xsub %r10,%r11,300000001
ext 0x23c
ext 0x68c
sub %r10,0x1
ext 0xd1 ; xcmp %r10,109999999
ext 0x19dd
cmp %r10,0x3f
jrugt __LX56 ; xjrugt __L56
.loc 253
cmp %r12,0x7 ; xcmp %r12,7
jreq __LX56 ; xjreq __L56
__LX57: ; __L57:
.loc 258
ld.w %r10,0x1 ; xld.w %r10,0x00000001 ; 1
ld.w [%r1],%r10 ; xld.w [%r1],%r10
__LX56: ; __L56:
.loc 261
ld.w %r10,%r2
__LX67: ; __L67:
.loc 262
.def bend, scl 110, type 0x0, endef
add %sp,0x1 ; xadd %sp,%sp,4
popn %r3
ret
.def end, scl 111, type 0x0, endef
.align 1
.def GetPllPowerDown, val GetPllPowerDown, scl 2, type 0x2d, endef
.global GetPllPowerDown
.loc 271
.def ent, scl 101, type 0x0, endef
GetPllPowerDown:
; .frame %sp,4,$31 # vars= 0, regs= 1/0, args= 0, extra= 0
; .mask 0x80000000,-4
; .fmask 0x00000000,0
.loc 272
ld.w %r12,0x12 ; xld.w %r12,0x00000012 ; 18
ext halReadReg16@rh ; xcall halReadReg16
ext halReadReg16@rm
call halReadReg16@rl
and %r10,0x1 ; xand %r10,%r10,0x00000001
.loc 273
ret
.def end, scl 111, type 0x0, endef
.align 1
.def GetSystemClkDivide, val GetSystemClkDivide, scl 2, type 0x2d, endef
.global GetSystemClkDivide
.loc 284
.def ent, scl 101, type 0x0, endef
GetSystemClkDivide:
; .frame %sp,4,$31 # vars= 0, regs= 1/0, args= 0, extra= 0
; .mask 0x80000000,-4
; .fmask 0x00000000,0
.loc 285
ld.w %r12,0x18 ; xld.w %r12,0x00000018 ; 24
ext halReadReg16@rh ; xcall halReadReg16
ext halReadReg16@rm
call halReadReg16@rl
and %r10,0x3 ; xand %r10,%r10,0x00000003
add %r10,0x1 ; xadd %r10,%r10,1
ld.uh %r10,%r10
.loc 286
ret
.def end, scl 111, type 0x0, endef
.align 1
.def GetSystemClock, val GetSystemClock, scl 2, type 0x2f, endef
.global GetSystemClock
.loc 296
.def ent, scl 101, type 0x0, endef
GetSystemClock:
; .frame %sp,8,$31 # vars= 0, regs= 2/0, args= 0, extra= 0
; .mask 0x80010000,-4
; .fmask 0x00000000,0
pushn %r0
ld.w %r0,%r12
.def UsingClkI, val 0, scl 17, type 0x1f, endef
.loc 297
call GetPllPowerDown ; xcall GetPllPowerDown
ld.uh %r10,%r10
cmp %r10,0x0
jreq __LX71 ; xjreq __L71
.loc 299
cmp %r0,0x0
jreq __LX72 ; xjreq __L72
.loc 300
ld.w %r10,0x1 ; xld.w %r10,0x00000001 ; 1
ld.w [%r0],%r10 ; xld.w [%r0],%r10
__LX72: ; __L72:
.loc 302
call GetSystemClkDivide ; xcall GetSystemClkDivide
ext HalInfo+0x120@h ; xld.w %r11,HalInfo+288
ext HalInfo+0x120@m
ld.w %r11,HalInfo+0x120@l
ld.uh %r13,%r10
ld.w %r12,[%r11] ; xld.w %r12,[%r11]
jp __LX76 ; xjp __L76
__LX71: ; __L71:
.loc 306
cmp %r0,0x0
jreq __LX74 ; xjreq __L74
.loc 307
ld.w %r14,0x0
ld.w [%r0],%r14 ; xld.w [%r0],%r14
__LX74: ; __L74:
.loc 309
ld.w %r12,0x0
ld.w %r13,%r12
ext GetPll@rm ; xcall GetPll
call GetPll@rl
ld.w %r0,%r10
call GetSystemClkDivide ; xcall GetSystemClkDivide
ld.uh %r13,%r10
ld.w %r12,%r0
__LX76: ; __L76:
ext __udivsi3@rh ; xcall __udivsi3
ext __udivsi3@rm
call __udivsi3@rl
.loc 311
popn %r0
ret
.def end, scl 111, type 0x0, endef
.endfile
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -