Eliminate shlq $3,address shift after masking of the va is done, which is needed to convert pt_entry_t[] array index into byte offset. Do it by preshifting the mask, and compensating the right shift of va.
Details
Details
- Reviewers
alc markj - Commits
- rGe7c544216282: amd64: micro-optimize vptopte()/vtopde() further
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
I'll take a look at this tomorrow.
As an aside, have you seen how the compiler implements the static variable pg_g? It's implementing pg_g using a single byte of storage and performing a size extending load of the byte followed by a left shift by 8 wherever the variable is used to recreate a value of the declared type, pt_entry. Removing static from the variable definition reduces the code size by 240 bytes.