remove jumpdests / fix name

This commit is contained in:
Dmitry Vagner 2022-09-16 10:31:30 -07:00
parent 32cf13da61
commit 5163968747
2 changed files with 8 additions and 14 deletions

View File

@ -88,7 +88,7 @@
// Load a little-endian u32, consisting of 4 bytes (c_0, c_1, c_2, c_3),
// from kernel code.
%macro mload_kernel_code_little_u32
%macro mload_kernel_code_LE_u32
// stack: offset
DUP1
%mload_kernel_code

View File

@ -2,7 +2,6 @@
/// return (u32(x << n)) | (x >> (32 - n))
global rol:
JUMPDEST
// stack: n, x, retdest
SWAP1
DUP1
@ -56,8 +55,7 @@ global rol:
/// def F0(x, y, z):
/// return x ^ y ^ z
global F0:
JUMPDEST
global F0:
// stack: x , y , z, retdest
XOR
// stack: x ^ y , z, retdest
@ -70,8 +68,7 @@ global F0:
/// def F1(x, y, z):
/// return (x & y) | (u32(~x) & z)
global F1:
JUMPDEST
global F1:
// stack: x, y, z, retdest
DUP1
// stack: x, x, y, z, retdest
@ -97,7 +94,6 @@ global F1:
/// return (x | u32(~y)) ^ z
global F2:
JUMPDEST
// stack: x, y, z, retdest
SWAP1
// stack: y, x, z, retdest
@ -114,8 +110,7 @@ global F2:
/// def F3(x, y, z):
/// return (x & z) | (u32(~z) & y)
global F3:
JUMPDEST
global F3:
// stack: x, y, z, retdest
DUP3
// stack: z, x, y, z, retdest
@ -137,14 +132,13 @@ global F3:
/// return x ^ (y | u32(~z))
global F4:
JUMPDEST
// stack: x, y, z, retdest
// stack: x, y, z, retdest
SWAP2
// stack: z, y, x, retdest
// stack: z, y, x, retdest
%not_32
// stack: ~z, y, x, retdest
// stack: ~z, y, x, retdest
OR
// stack: ~z | y, x, retdest
// stack: ~z | y, x, retdest
XOR
// stack: (~z | y) ^ x, retdest
SWAP1