diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-09-30 19:13:47 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-09-30 19:13:47 +0200 |
| commit | 7b67bbe6988d00d557d72c9867b99826320d1835 (patch) | |
| tree | c3f57cbd1749acebad85ddf296462103e0985efb /src/emu | |
| parent | 7692371ccbdb050fdb758ac56f80822881e89e00 (diff) | |
| download | box64-7b67bbe6988d00d557d72c9867b99826320d1835.tar.gz box64-7b67bbe6988d00d557d72c9867b99826320d1835.zip | |
Added PCLMULQDQ ([DYNAREC] Too, using PMULL if present) extension (improve a lot AES-XTS score of Geekbench 5)
Diffstat (limited to 'src/emu')
| -rw-r--r-- | src/emu/x64run660f.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/emu/x64run660f.c b/src/emu/x64run660f.c index f182e34f..7561fff2 100644 --- a/src/emu/x64run660f.c +++ b/src/emu/x64run660f.c @@ -797,6 +797,25 @@ uintptr_t Run660F(x64emu_t *emu, rex_t rex, uintptr_t addr) GX->f[i] = (tmp8u&(1<<i))?tmpf:0.0f; break; + case 0x44: /* PCLMULQDQ Gx, Ex, Ib */ + nextop = F8; + GETEX(1); + GETGX; + tmp8u = F8; + { + int g = (tmp8u&1)?1:0; + int e = (tmp8u&0b10000)?1:0; + __int128 result = 0; + __int128 op2 = EX->q[e]; + for (int i=0; i<64; ++i) + if(GX->q[g]&(1LL<<i)) + result ^= (op2<<i); + + GX->q[0] = result&0xffffffffffffffffLL; + GX->q[1] = (result>>64)&0xffffffffffffffffLL; + } + break; + case 0xDF: // AESKEYGENASSIST Gx, Ex, u8 nextop = F8; GETEX(1); |