wangrong1069 opened a new pull request #8688:
URL: https://github.com/apache/trafficserver/pull/8688


   1. remove redundant right shift operations when extract pointer
   ```C
   (((intptr_t)(_x).data) & 0x0000FFFFFFFFFFFFLL), get low 48 bits 
   ((~((((intptr_t)(_x).data) >> 63) - 1)) << 48)
       fill 0 at top 16 bits for user space pointer, fill 1 at top 16 bits for 
kernel space pointer
   0x0000FFFFFFFFFFFF
       (((intptr_t)(_x).data) & 0x0000FFFFFFFFFFFFLL)      => 0x0000FFFFFFFFFFFF
       ((~((((intptr_t)(_x).data) >> 63) - 1)) << 48)    => 0x0000000000000000
           0x0000FFFFFFFFFFFF -> 0 -> 0xFFFFFFFFFFFFFFFF -> 0 -> 0
   0x8000FFFFFFFFFFFF
       (((intptr_t)(_x).data) & 0x0000FFFFFFFFFFFFLL)      => 0x0000FFFFFFFFFFFF
       ((~((((intptr_t)(_x).data) >> 63) - 1)) << 48)    => 0xFFFF000000000000
           0x8000FFFFFFFFFFFF -> 1 -> 0 -> 0xFFFFFFFFFFFFFFFF -> 
0xFFFF000000000000
   ```
   
   2. on AArch64, use 52~62 bits to save version info
   https://www.kernel.org/doc/html/latest/arm64/memory.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to