⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c_r

📁 MIPS处理器的bootloader,龙芯就是用的修改过的PMON2
💻
字号:
The r CommandrThe r command sets or displays register values.FormatThe format for the r command is:	r [reg|* [val|field val]]where:regis the name of the register or registers (specified by wildcard characters) to display or modify.valis the value to which the specified register or registers should be modified.field valis the value to which the specified field in the specified 		register should be modified.*	displays the contents of all registers except floating-point 	registers.f*	displays the contents of all floating-point registers.Invoking the r command without any parameters or arguments displays a list of all the general-purpose registers. Functional DescriptionThe r command sets or displays register values. The character and wordwildcards, "*" and "?", can be used in the register name. The '?'character matches any single character, while the '*' character matchesany number of any characters. This command accepts both hardware andsoftware names. Examples illustrating the use of the r commandfollow.r 			Display all General-purpose registers. r *			Display all register values. r 8			Display $8 (t0). r t0			Display t0 ($8). r t*			Display t0 through t9. r epc			Display EPC register. r epc start		Set EPC register to the symbol start value. r 4 45			Set register 4 to 45. r t0 45			Set register t0 to 45. r sr 0			Set SR to zero. r sr bev 1		Set the BEV bit of SR to one. r epc a0020000		Set EPC to a0020000. r a			Display the value of pseudo			register 'a'. r ?			Display the value of all pseudo				registers.There are 26 pseudo registers (named a thru z). These can be referencedin the same way as real registers, and are typically used to implementcomplex breakpoint conditions (see the whencommand).ExamplesDisplay all General Purpose registers.PMON r        zero      at       v0       v1       a0       a1       a2       a3  $0- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000         t0       t1       t2       t3       t4       t5       t6       t7  $8- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000         s0       s1       s2       s3       s4       s5       s6       s7 $16- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000         t8       t9       k0       k1       gp       sp       s8      ra $24- 00000000 00000000 00000000 00000000 00000000 80008b40 00000000 00000000Display all registers.  Note that the actual registers that aredisplayed by the "r *" command depends on what type ofprocessor you are using. This display was generated using a LR33000.PMON r *  $0- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000  $8- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 $16- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 $24- 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000C0_EPC=a0020000 C0_BADADDR=00000000 C0_BPC=00000000 C0_BDA=00000000 M_TIC1=000000 M_TIC2=000000 M_RTIC=025    C0_SR:  CU BEV TS PE CM PZ SWC ISC  IM&SW  KUo IEo KUp IEp KUc IEc           0000 0   0  0  0  0  0   0  00000000 0   0   0   0   0   0 C0_CAUSE: BD CE   IP   SW EXCODE           0  0 000000 00   Int C0_PRID: IMP Rev           0   0 C0_DCIC: TR UD KD TE DW DR DAE PCE DE D I T W R DA PC DG           0  0  0  0  0  0  0   0   0 0 0 0 0 0  0  0  0   M_CFG: ICD DCD IBS DBS IW IOWAIT PW PWAIT CS PE DGE BFD RGN RPC CL DCE          0   0   16  16  0    6    0    6   0  0  1   0   1   1   1   1  M_TC1: CE IE INT           0  0  0   M_TC2: CE IE INT           0  0  0 Set the IEC bit of the Status Register.PMON r sr iec 1Display the Status Register.PMON r sr  C0_SR: CU BEV TS PE CM PZ SWC ISC IM&SW  KUo IEo KUp IEp KUc IEc        0000 1   0  0  0  0  0   0 00000000 0   0   0   0   0   1 You can use the ls command to display the Status Register as a hex value. This technique can be used for any register.PMON ls -v @sr0x00400001 = 0t4194305 = 0o20000001FilesThe r command is located in mon/regs.c.See Alsol commandfor disassembling instructions from memory.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -