riscv locore.S: load constant prior to loop
A very minor micro-optimization; t0 is not clobbered between the loop top and bottom and there appear to be no other branches to this label. Submitted by: Nathaniel Filardo <nwf20@cl.cam.ac.uk> Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D25524
This commit is contained in:
parent
d53a2816c7
commit
6f11e59d72
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=362852
@ -139,8 +139,8 @@ pagetables:
|
|||||||
li t2, 512 /* Build 512 entries */
|
li t2, 512 /* Build 512 entries */
|
||||||
add t3, t4, t2
|
add t3, t4, t2
|
||||||
li t5, 0
|
li t5, 0
|
||||||
1:
|
|
||||||
li t0, (PTE_KERN | PTE_X)
|
li t0, (PTE_KERN | PTE_X)
|
||||||
|
1:
|
||||||
slli t2, t4, PTE_PPN1_S /* << PTE_PPN1_S */
|
slli t2, t4, PTE_PPN1_S /* << PTE_PPN1_S */
|
||||||
or t5, t0, t2
|
or t5, t0, t2
|
||||||
sd t5, (s1) /* Store PTE entry to position */
|
sd t5, (s1) /* Store PTE entry to position */
|
||||||
|
Loading…
Reference in New Issue
Block a user