Changes

337 bytes added ,  23:37, 8 December 2020
Line 264: Line 264:  
These are now compiled with compiler CFI mitigations enabled. This does not apply to non-web-applets. This uses the crc32x instruction, and x18 as a previously-initialized constant.
 
These are now compiled with compiler CFI mitigations enabled. This does not apply to non-web-applets. This uses the crc32x instruction, and x18 as a previously-initialized constant.
   −
This is used to add/subtract x30 starting with bit40, during functions entry/exit.
+
This is used to add/subtract x30 starting with bit40, during functions entry/exit. The code for entry/exit is identical, except that entry does add, and exit uses subtract:
 +
* The low 40-bits of x30 are extracted, then multiplied with x18.
 +
* <code>crc32x w17, wzr, x17</code> (which uses the above value)
 +
* Then the previously mentioned add/subtraction operation is done, with the output from the above shifted to bit40.
    
blr instructions no longer exist: when funcptrs are called, new functions are now called instead which handles the call. The u32 at funcptr_addr-4 must match 0xe7ffdefe, otherwise it will branch to undefined instruction 0x0000dead. Otherwise, it will jump to the funcptr_addr.
 
blr instructions no longer exist: when funcptrs are called, new functions are now called instead which handles the call. The u32 at funcptr_addr-4 must match 0xe7ffdefe, otherwise it will branch to undefined instruction 0x0000dead. Otherwise, it will jump to the funcptr_addr.