📄 hal_power.ps
字号:
.loc 160
cmp %r1,0x0
xjreq __L40
__L52:
.loc 162
ld.w %r0,%r13
.loc 163
xjp __L39
.loc 136
__L40:
xadd %r13,%r13,1
xcmp %r13,3
xjrule __L41
__L39:
.loc 168
cmp %r0,0x0
xjreq __L51
cmp %r1,0x0
xjrne __L37
__L51:
.loc 170
ld.w %r7,0x0
xld.b [%sp],%r7
.loc 173
xld.w %r0,0x00000003 ; 3
.loc 174
xld.w %r1,0x00000002 ; 2
__L37:
.loc 178
xand %r3,%r3,0x0000000f
.loc 179
xand %r2,%r2,0x000003ff
.loc 180
xand %r0,%r0,0x00000003
.loc 183
xld.w %r12,0x00000001 ; 1
xcall PowerSaveMode
.loc 184
ld.w %r13,%r3
xsll %r13,12
ld.w %r10,%r2
xsll %r10,2
or %r13,%r10
or %r13,%r0
ld.uh %r13,%r13
xld.w %r12,0x0000000e ; 14
xcall halWriteReg16
.loc 185
xld.w %r12,0x00000010 ; 16
ld.w %r13,%r1
xsll %r13,12
xcall halWriteReg16
.loc 186
xld.w %r12,0x00000012 ; 18
ld.w %r13,0x0
xcall halWriteReg16
.loc 190
ld.w %r12,0x0
xcall PowerSaveMode
.loc 192
xld.ub %r10,[%sp]
.loc 193
.def bend, scl 110, type 0x0, endef
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
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
xjrne __L54
.loc 210
ld.w %r1,%sp
__L54:
.loc 212
ld.w %r14,0x0
xld.w [%r1],%r14
.loc 214
ld.uh %r10,%r12
cmp %r10,0x0
xjreq __L55
.loc 216
xld.w %r10,0x00000001 ; 1
xld.w [%r1],%r10
.loc 217
ld.w %r10,0x0
xjp __L67
__L55:
.loc 220
xld.w %r12,0x0000000e ; 14
xcall halReadReg16
ld.w %r12,%r10
.loc 222
ld.uh %r10,%r12
ld.w %r11,%r10
xsrl %r11,12
.loc 223
xsrl %r10,2
xand %r10,%r10,0x000003ff
.loc 225
xadd %r2,%r11,1
xadd %r10,%r10,1
mlt.w %r2,%r10
ld.w %r2,%alr
xld.w %r11,HalInfo+288
xld.w %r10,[%r11]
mlt.w %r2,%r10
ld.w %r2,%alr
.loc 231
xld.w %r10,[%r11+40]
xand %r10,%r10,0x00000080
xjrne __L56
.loc 234
ld.w %r10,%r12
xand %r10,%r10,0x00000003
xld.w %r3,0x00000001 ; 1
ld.w %r0,%r3
xsll %r0,%r10
.loc 235
xld.w %r12,0x00000010 ; 16
xcall halReadReg16
ld.uh %r10,%r10
ld.w %r12,%r10
xsrl %r12,12
.loc 237
mlt.w %r2,%r0
ld.w %r11,%alr
.loc 239
xsub %r10,%r11,100000000
xcmp %r10,310000000
xjrugt __L57
.loc 241
xcmp %r10,100000000
xjrugt __L58
.loc 243
xcmp %r12,2
xjreq __L56
.loc 244
xld.w [%r1],%r3
.loc 245
xjp __L56
__L58:
.loc 246
xsub %r10,%r11,200000001
xcmp %r10,99999999
xjrugt __L61
.loc 248
xcmp %r12,5
xjreq __L56
.loc 250
xjp __L57
__L61:
.loc 251
xsub %r10,%r11,300000001
xcmp %r10,109999999
xjrugt __L56
.loc 253
xcmp %r12,7
xjreq __L56
__L57:
.loc 258
xld.w %r10,0x00000001 ; 1
xld.w [%r1],%r10
__L56:
.loc 261
ld.w %r10,%r2
__L67:
.loc 262
.def bend, scl 110, type 0x0, endef
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
xld.w %r12,0x00000012 ; 18
xcall halReadReg16
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
xld.w %r12,0x00000018 ; 24
xcall halReadReg16
xand %r10,%r10,0x00000003
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
xcall GetPllPowerDown
ld.uh %r10,%r10
cmp %r10,0x0
xjreq __L71
.loc 299
cmp %r0,0x0
xjreq __L72
.loc 300
xld.w %r10,0x00000001 ; 1
xld.w [%r0],%r10
__L72:
.loc 302
xcall GetSystemClkDivide
xld.w %r11,HalInfo+288
ld.uh %r13,%r10
xld.w %r12,[%r11]
xjp __L76
__L71:
.loc 306
cmp %r0,0x0
xjreq __L74
.loc 307
ld.w %r14,0x0
xld.w [%r0],%r14
__L74:
.loc 309
ld.w %r12,0x0
ld.w %r13,%r12
xcall GetPll
ld.w %r0,%r10
xcall GetSystemClkDivide
ld.uh %r13,%r10
ld.w %r12,%r0
__L76:
xcall __udivsi3
.loc 311
popn %r0
ret
.def end, scl 111, type 0x0, endef
.endfile
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -