1 // Copyright 2010 Dolphin Emulator Project
2 // Licensed under GPLv2+
3 // Refer to the license.txt file included.
4 
5 #pragma once
6 
7 #include "Common/CommonTypes.h"
8 
9 alignas(16) extern const u8 pbswapShuffle1x4[16];
10 alignas(16) extern const u8 pbswapShuffle2x4[16];
11 alignas(16) extern const float m_one[4];
12 alignas(16) extern const float m_quantizeTableS[128];
13 alignas(16) extern const float m_dequantizeTableS[128];
14 
15 struct CommonAsmRoutinesBase
16 {
17   const u8* enter_code;
18 
19   const u8* dispatcher_mispredicted_blr;
20   const u8* dispatcher;
21   const u8* dispatcher_no_check;
22 
23   const u8* do_timing;
24 
25   const u8* frsqrte;
26   const u8* fres;
27   const u8* mfcr;
28   const u8* cdts;
29 
30   // In: array index: GQR to use.
31   // In: ECX: Address to read from.
32   // Out: XMM0: Bottom two 32-bit slots hold the read value,
33   //            converted to a pair of floats.
34   // Trashes: all three RSCRATCH
35   // Note: Store PC if this could cause an exception
36   const u8** paired_load_quantized;
37 
38   // In: array index: GQR to use.
39   // In: ECX: Address to read from.
40   // Out: XMM0: Bottom 32-bit slot holds the read value.
41   // Trashes: all three RSCRATCH
42   // Note: Store PC if this could cause an exception
43   const u8** single_load_quantized;
44 
45   // In: array index: GQR to use.
46   // In: ECX: Address to write to.
47   // In: XMM0: Bottom two 32-bit slots hold the pair of floats to be written.
48   // Out: Nothing.
49   // Trashes: all three RSCRATCH
50   // Note: Store PC if this could cause an exception
51   const u8** paired_store_quantized;
52 
53   // In: array index: GQR to use.
54   // In: ECX: Address to write to.
55   // In: XMM0: Bottom 32-bit slot holds the float to be written.
56   // Note: Store PC if this could cause an exception
57   const u8** single_store_quantized;
58 };
59