mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-23 15:18:16 +00:00
Improve rule engine performance by improving append_0x80_xxx() performance by using precomputed values from constant memory
This commit is contained in:
parent
3260000357
commit
52a97fee75
@ -3,6 +3,74 @@
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
__constant u32 c_append_helper[64][16] =
|
||||
{
|
||||
{ 0x000000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x0000ff00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00ff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0xff000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x000000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x0000ff00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00ff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0xff000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x000000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x0000ff00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00ff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0xff000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x000000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x0000ff00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00ff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0xff000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ff00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ff00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ff00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ff00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ff00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ff00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ff00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ff00, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000ff, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ff00, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ff0000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff000000, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000ff, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ff00, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ff0000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff000000, 0x00000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000ff, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ff00, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ff0000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff000000, 0x00000000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000ff },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000ff00 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00ff0000 },
|
||||
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xff000000 },
|
||||
};
|
||||
|
||||
/**
|
||||
* pure scalar functions
|
||||
*/
|
||||
@ -358,66 +426,58 @@ static void undo_utf16le (const u32x in1[4], const u32x in2[4], u32x out[4])
|
||||
|
||||
static void append_0x80_1x4 (u32x w0[4], const u32 offset)
|
||||
{
|
||||
const u32 tmp = 0x80 << ((offset & 3) * 8);
|
||||
|
||||
w0[0] |= (offset < 4) ? tmp : 0;
|
||||
w0[1] |= ((offset >= 4) && (offset < 8)) ? tmp : 0;
|
||||
w0[2] |= ((offset >= 8) && (offset < 12)) ? tmp : 0;
|
||||
w0[3] |= (offset >= 12) ? tmp : 0;
|
||||
w0[0] |= 0x80808080 & c_append_helper[offset][0];
|
||||
w0[1] |= 0x80808080 & c_append_helper[offset][1];
|
||||
w0[2] |= 0x80808080 & c_append_helper[offset][2];
|
||||
w0[3] |= 0x80808080 & c_append_helper[offset][3];
|
||||
}
|
||||
|
||||
static void append_0x80_2x4 (u32x w0[4], u32x w1[4], const u32 offset)
|
||||
{
|
||||
const u32 tmp = 0x80 << ((offset & 3) * 8);
|
||||
|
||||
w0[0] |= (offset < 4) ? tmp : 0;
|
||||
w0[1] |= ((offset >= 4) && (offset < 8)) ? tmp : 0;
|
||||
w0[2] |= ((offset >= 8) && (offset < 12)) ? tmp : 0;
|
||||
w0[3] |= ((offset >= 12) && (offset < 16)) ? tmp : 0;
|
||||
w1[0] |= ((offset >= 16) && (offset < 20)) ? tmp : 0;
|
||||
w1[1] |= ((offset >= 20) && (offset < 24)) ? tmp : 0;
|
||||
w1[2] |= ((offset >= 24) && (offset < 28)) ? tmp : 0;
|
||||
w1[3] |= (offset >= 28) ? tmp : 0;
|
||||
w0[0] |= 0x80808080 & c_append_helper[offset][0];
|
||||
w0[1] |= 0x80808080 & c_append_helper[offset][1];
|
||||
w0[2] |= 0x80808080 & c_append_helper[offset][2];
|
||||
w0[3] |= 0x80808080 & c_append_helper[offset][3];
|
||||
w1[0] |= 0x80808080 & c_append_helper[offset][4];
|
||||
w1[1] |= 0x80808080 & c_append_helper[offset][5];
|
||||
w1[2] |= 0x80808080 & c_append_helper[offset][6];
|
||||
w1[3] |= 0x80808080 & c_append_helper[offset][7];
|
||||
}
|
||||
|
||||
static void append_0x80_3x4 (u32x w0[4], u32x w1[4], u32x w2[4], const u32 offset)
|
||||
{
|
||||
const u32 tmp = 0x80 << ((offset & 3) * 8);
|
||||
|
||||
w0[0] |= (offset < 4) ? tmp : 0;
|
||||
w0[1] |= ((offset >= 4) && (offset < 8)) ? tmp : 0;
|
||||
w0[2] |= ((offset >= 8) && (offset < 12)) ? tmp : 0;
|
||||
w0[3] |= ((offset >= 12) && (offset < 16)) ? tmp : 0;
|
||||
w1[0] |= ((offset >= 16) && (offset < 20)) ? tmp : 0;
|
||||
w1[1] |= ((offset >= 20) && (offset < 24)) ? tmp : 0;
|
||||
w1[2] |= ((offset >= 24) && (offset < 28)) ? tmp : 0;
|
||||
w1[3] |= ((offset >= 28) && (offset < 32)) ? tmp : 0;
|
||||
w2[0] |= ((offset >= 32) && (offset < 36)) ? tmp : 0;
|
||||
w2[1] |= ((offset >= 36) && (offset < 40)) ? tmp : 0;
|
||||
w2[2] |= ((offset >= 40) && (offset < 44)) ? tmp : 0;
|
||||
w2[3] |= (offset >= 44) ? tmp : 0;
|
||||
w0[0] |= 0x80808080 & c_append_helper[offset][ 0];
|
||||
w0[1] |= 0x80808080 & c_append_helper[offset][ 1];
|
||||
w0[2] |= 0x80808080 & c_append_helper[offset][ 2];
|
||||
w0[3] |= 0x80808080 & c_append_helper[offset][ 3];
|
||||
w1[0] |= 0x80808080 & c_append_helper[offset][ 4];
|
||||
w1[1] |= 0x80808080 & c_append_helper[offset][ 5];
|
||||
w1[2] |= 0x80808080 & c_append_helper[offset][ 6];
|
||||
w1[3] |= 0x80808080 & c_append_helper[offset][ 7];
|
||||
w2[0] |= 0x80808080 & c_append_helper[offset][ 8];
|
||||
w2[1] |= 0x80808080 & c_append_helper[offset][ 9];
|
||||
w2[2] |= 0x80808080 & c_append_helper[offset][10];
|
||||
w2[3] |= 0x80808080 & c_append_helper[offset][11];
|
||||
}
|
||||
|
||||
static void append_0x80_4x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 offset)
|
||||
{
|
||||
const u32 tmp = 0x80 << ((offset & 3) * 8);
|
||||
|
||||
w0[0] |= (offset < 4) ? tmp : 0;
|
||||
w0[1] |= ((offset >= 4) && (offset < 8)) ? tmp : 0;
|
||||
w0[2] |= ((offset >= 8) && (offset < 12)) ? tmp : 0;
|
||||
w0[3] |= ((offset >= 12) && (offset < 16)) ? tmp : 0;
|
||||
w1[0] |= ((offset >= 16) && (offset < 20)) ? tmp : 0;
|
||||
w1[1] |= ((offset >= 20) && (offset < 24)) ? tmp : 0;
|
||||
w1[2] |= ((offset >= 24) && (offset < 28)) ? tmp : 0;
|
||||
w1[3] |= ((offset >= 28) && (offset < 32)) ? tmp : 0;
|
||||
w2[0] |= ((offset >= 32) && (offset < 36)) ? tmp : 0;
|
||||
w2[1] |= ((offset >= 36) && (offset < 40)) ? tmp : 0;
|
||||
w2[2] |= ((offset >= 40) && (offset < 44)) ? tmp : 0;
|
||||
w2[3] |= ((offset >= 44) && (offset < 48)) ? tmp : 0;
|
||||
w3[0] |= ((offset >= 48) && (offset < 52)) ? tmp : 0;
|
||||
w3[1] |= ((offset >= 52) && (offset < 56)) ? tmp : 0;
|
||||
w3[2] |= ((offset >= 56) && (offset < 60)) ? tmp : 0;
|
||||
w3[3] |= (offset >= 60) ? tmp : 0;
|
||||
w0[0] |= 0x80808080 & c_append_helper[offset][ 0];
|
||||
w0[1] |= 0x80808080 & c_append_helper[offset][ 1];
|
||||
w0[2] |= 0x80808080 & c_append_helper[offset][ 2];
|
||||
w0[3] |= 0x80808080 & c_append_helper[offset][ 3];
|
||||
w1[0] |= 0x80808080 & c_append_helper[offset][ 4];
|
||||
w1[1] |= 0x80808080 & c_append_helper[offset][ 5];
|
||||
w1[2] |= 0x80808080 & c_append_helper[offset][ 6];
|
||||
w1[3] |= 0x80808080 & c_append_helper[offset][ 7];
|
||||
w2[0] |= 0x80808080 & c_append_helper[offset][ 8];
|
||||
w2[1] |= 0x80808080 & c_append_helper[offset][ 9];
|
||||
w2[2] |= 0x80808080 & c_append_helper[offset][10];
|
||||
w2[3] |= 0x80808080 & c_append_helper[offset][11];
|
||||
w3[0] |= 0x80808080 & c_append_helper[offset][12];
|
||||
w3[1] |= 0x80808080 & c_append_helper[offset][13];
|
||||
w3[2] |= 0x80808080 & c_append_helper[offset][14];
|
||||
w3[3] |= 0x80808080 & c_append_helper[offset][15];
|
||||
}
|
||||
|
||||
static void append_0x80_8x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const u32 offset)
|
||||
@ -31630,80 +31690,70 @@ static void truncate_block_16x4_be_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4]
|
||||
|
||||
static void append_0x01_2x4_S (u32 w0[4], u32 w1[4], const u32 offset)
|
||||
{
|
||||
const u32 tmp = 0x01 << ((offset & 3) * 8);
|
||||
|
||||
w0[0] |= (offset < 4) ? tmp : 0;
|
||||
w0[1] |= ((offset >= 4) && (offset < 8)) ? tmp : 0;
|
||||
w0[2] |= ((offset >= 8) && (offset < 12)) ? tmp : 0;
|
||||
w0[3] |= ((offset >= 12) && (offset < 16)) ? tmp : 0;
|
||||
w1[0] |= ((offset >= 16) && (offset < 20)) ? tmp : 0;
|
||||
w1[1] |= ((offset >= 20) && (offset < 24)) ? tmp : 0;
|
||||
w1[2] |= ((offset >= 24) && (offset < 28)) ? tmp : 0;
|
||||
w1[3] |= (offset >= 28) ? tmp : 0;
|
||||
w0[0] |= 0x01010101 & c_append_helper[offset][0];
|
||||
w0[1] |= 0x01010101 & c_append_helper[offset][1];
|
||||
w0[2] |= 0x01010101 & c_append_helper[offset][2];
|
||||
w0[3] |= 0x01010101 & c_append_helper[offset][3];
|
||||
w1[0] |= 0x01010101 & c_append_helper[offset][4];
|
||||
w1[1] |= 0x01010101 & c_append_helper[offset][5];
|
||||
w1[2] |= 0x01010101 & c_append_helper[offset][6];
|
||||
w1[3] |= 0x01010101 & c_append_helper[offset][7];
|
||||
}
|
||||
|
||||
static void append_0x80_1x4_S (u32 w0[4], const u32 offset)
|
||||
{
|
||||
const u32 tmp = 0x80 << ((offset & 3) * 8);
|
||||
|
||||
w0[0] |= (offset < 4) ? tmp : 0;
|
||||
w0[1] |= ((offset >= 4) && (offset < 8)) ? tmp : 0;
|
||||
w0[2] |= ((offset >= 8) && (offset < 12)) ? tmp : 0;
|
||||
w0[3] |= (offset >= 12) ? tmp : 0;
|
||||
w0[0] |= 0x80808080 & c_append_helper[offset][0];
|
||||
w0[1] |= 0x80808080 & c_append_helper[offset][1];
|
||||
w0[2] |= 0x80808080 & c_append_helper[offset][2];
|
||||
w0[3] |= 0x80808080 & c_append_helper[offset][3];
|
||||
}
|
||||
|
||||
static void append_0x80_2x4_S (u32 w0[4], u32 w1[4], const u32 offset)
|
||||
{
|
||||
const u32 tmp = 0x80 << ((offset & 3) * 8);
|
||||
|
||||
w0[0] |= (offset < 4) ? tmp : 0;
|
||||
w0[1] |= ((offset >= 4) && (offset < 8)) ? tmp : 0;
|
||||
w0[2] |= ((offset >= 8) && (offset < 12)) ? tmp : 0;
|
||||
w0[3] |= ((offset >= 12) && (offset < 16)) ? tmp : 0;
|
||||
w1[0] |= ((offset >= 16) && (offset < 20)) ? tmp : 0;
|
||||
w1[1] |= ((offset >= 20) && (offset < 24)) ? tmp : 0;
|
||||
w1[2] |= ((offset >= 24) && (offset < 28)) ? tmp : 0;
|
||||
w1[3] |= (offset >= 28) ? tmp : 0;
|
||||
w0[0] |= 0x80808080 & c_append_helper[offset][0];
|
||||
w0[1] |= 0x80808080 & c_append_helper[offset][1];
|
||||
w0[2] |= 0x80808080 & c_append_helper[offset][2];
|
||||
w0[3] |= 0x80808080 & c_append_helper[offset][3];
|
||||
w1[0] |= 0x80808080 & c_append_helper[offset][4];
|
||||
w1[1] |= 0x80808080 & c_append_helper[offset][5];
|
||||
w1[2] |= 0x80808080 & c_append_helper[offset][6];
|
||||
w1[3] |= 0x80808080 & c_append_helper[offset][7];
|
||||
}
|
||||
|
||||
static void append_0x80_3x4_S (u32 w0[4], u32 w1[4], u32 w2[4], const u32 offset)
|
||||
{
|
||||
const u32 tmp = 0x80 << ((offset & 3) * 8);
|
||||
|
||||
w0[0] |= (offset < 4) ? tmp : 0;
|
||||
w0[1] |= ((offset >= 4) && (offset < 8)) ? tmp : 0;
|
||||
w0[2] |= ((offset >= 8) && (offset < 12)) ? tmp : 0;
|
||||
w0[3] |= ((offset >= 12) && (offset < 16)) ? tmp : 0;
|
||||
w1[0] |= ((offset >= 16) && (offset < 20)) ? tmp : 0;
|
||||
w1[1] |= ((offset >= 20) && (offset < 24)) ? tmp : 0;
|
||||
w1[2] |= ((offset >= 24) && (offset < 28)) ? tmp : 0;
|
||||
w1[3] |= ((offset >= 28) && (offset < 32)) ? tmp : 0;
|
||||
w2[0] |= ((offset >= 32) && (offset < 36)) ? tmp : 0;
|
||||
w2[1] |= ((offset >= 36) && (offset < 40)) ? tmp : 0;
|
||||
w2[2] |= ((offset >= 40) && (offset < 44)) ? tmp : 0;
|
||||
w2[3] |= (offset >= 44) ? tmp : 0;
|
||||
w0[0] |= 0x80808080 & c_append_helper[offset][ 0];
|
||||
w0[1] |= 0x80808080 & c_append_helper[offset][ 1];
|
||||
w0[2] |= 0x80808080 & c_append_helper[offset][ 2];
|
||||
w0[3] |= 0x80808080 & c_append_helper[offset][ 3];
|
||||
w1[0] |= 0x80808080 & c_append_helper[offset][ 4];
|
||||
w1[1] |= 0x80808080 & c_append_helper[offset][ 5];
|
||||
w1[2] |= 0x80808080 & c_append_helper[offset][ 6];
|
||||
w1[3] |= 0x80808080 & c_append_helper[offset][ 7];
|
||||
w2[0] |= 0x80808080 & c_append_helper[offset][ 8];
|
||||
w2[1] |= 0x80808080 & c_append_helper[offset][ 9];
|
||||
w2[2] |= 0x80808080 & c_append_helper[offset][10];
|
||||
w2[3] |= 0x80808080 & c_append_helper[offset][11];
|
||||
}
|
||||
|
||||
static void append_0x80_4x4_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 offset)
|
||||
{
|
||||
const u32 tmp = 0x80 << ((offset & 3) * 8);
|
||||
|
||||
w0[0] |= (offset < 4) ? tmp : 0;
|
||||
w0[1] |= ((offset >= 4) && (offset < 8)) ? tmp : 0;
|
||||
w0[2] |= ((offset >= 8) && (offset < 12)) ? tmp : 0;
|
||||
w0[3] |= ((offset >= 12) && (offset < 16)) ? tmp : 0;
|
||||
w1[0] |= ((offset >= 16) && (offset < 20)) ? tmp : 0;
|
||||
w1[1] |= ((offset >= 20) && (offset < 24)) ? tmp : 0;
|
||||
w1[2] |= ((offset >= 24) && (offset < 28)) ? tmp : 0;
|
||||
w1[3] |= ((offset >= 28) && (offset < 32)) ? tmp : 0;
|
||||
w2[0] |= ((offset >= 32) && (offset < 36)) ? tmp : 0;
|
||||
w2[1] |= ((offset >= 36) && (offset < 40)) ? tmp : 0;
|
||||
w2[2] |= ((offset >= 40) && (offset < 44)) ? tmp : 0;
|
||||
w2[3] |= ((offset >= 44) && (offset < 48)) ? tmp : 0;
|
||||
w3[0] |= ((offset >= 48) && (offset < 52)) ? tmp : 0;
|
||||
w3[1] |= ((offset >= 52) && (offset < 56)) ? tmp : 0;
|
||||
w3[2] |= ((offset >= 56) && (offset < 60)) ? tmp : 0;
|
||||
w3[3] |= (offset >= 60) ? tmp : 0;
|
||||
w0[0] |= 0x80808080 & c_append_helper[offset][ 0];
|
||||
w0[1] |= 0x80808080 & c_append_helper[offset][ 1];
|
||||
w0[2] |= 0x80808080 & c_append_helper[offset][ 2];
|
||||
w0[3] |= 0x80808080 & c_append_helper[offset][ 3];
|
||||
w1[0] |= 0x80808080 & c_append_helper[offset][ 4];
|
||||
w1[1] |= 0x80808080 & c_append_helper[offset][ 5];
|
||||
w1[2] |= 0x80808080 & c_append_helper[offset][ 6];
|
||||
w1[3] |= 0x80808080 & c_append_helper[offset][ 7];
|
||||
w2[0] |= 0x80808080 & c_append_helper[offset][ 8];
|
||||
w2[1] |= 0x80808080 & c_append_helper[offset][ 9];
|
||||
w2[2] |= 0x80808080 & c_append_helper[offset][10];
|
||||
w2[3] |= 0x80808080 & c_append_helper[offset][11];
|
||||
w3[0] |= 0x80808080 & c_append_helper[offset][12];
|
||||
w3[1] |= 0x80808080 & c_append_helper[offset][13];
|
||||
w3[2] |= 0x80808080 & c_append_helper[offset][14];
|
||||
w3[3] |= 0x80808080 & c_append_helper[offset][15];
|
||||
}
|
||||
|
||||
static void append_0x80_8x4_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], const u32 offset)
|
||||
|
Loading…
Reference in New Issue
Block a user