Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert all of the IR operations to use OpSize #4140

Merged
merged 191 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
191 commits
Select commit Hold shift + click to select a range
4cfc2ac
IR: Change AllocateFPR to use IR::OpSize
Sonicadvance1 Oct 27, 2024
8f4113d
IR: Change LoadRegister to use IR::OpSize
Sonicadvance1 Oct 27, 2024
f0f3c21
IR: Change Load{PF,AF} to use IR::OpSize
Sonicadvance1 Oct 27, 2024
c045e14
IR: Change StoreRegister to use IR::OpSize
Sonicadvance1 Oct 27, 2024
e414335
IR: Change Store{PF,AF} to use IR::OpSize
Sonicadvance1 Oct 27, 2024
40fd4bb
IR: Change LoadContext to use IR::OpSize
Sonicadvance1 Oct 27, 2024
7e5f1b5
IR: Change LoadContextPair to use IR::OpSize
Sonicadvance1 Oct 27, 2024
2f9b0de
IR: Change StoreContext to use IR::OpSize
Sonicadvance1 Oct 27, 2024
a1565a7
IR: Change StoreContextPair to use IR::OpSize
Sonicadvance1 Oct 27, 2024
ece89dd
IR: Change LoadContextIndexed to use IR::OpSize
Sonicadvance1 Oct 27, 2024
5fd127b
IR: Change StoreContextIndexed to use IR::OpSize
Sonicadvance1 Oct 27, 2024
07f8a4e
IR: Change LoadMem to use IR::OpSize
Sonicadvance1 Oct 27, 2024
cc483ac
IR: Change LoadMemPair to use IR::OpSize
Sonicadvance1 Oct 27, 2024
0149173
IR: Change StoreMem to use IR::OpSize
Sonicadvance1 Oct 28, 2024
f414d49
IR: Change StoreMemPair to use IR::OpSize
Sonicadvance1 Oct 28, 2024
d7691d9
IR: Change LoadMemTSO to use IR::OpSize
Sonicadvance1 Oct 28, 2024
f3449f2
IR: Change StoreMemTSO to use IR::OpSize
Sonicadvance1 Oct 28, 2024
3f6cdc2
IR: Change VLoadVectorMasked to use IR::OpSize
Sonicadvance1 Oct 28, 2024
051469f
IR: Change VStoreVectorMasked to use IR::OpSize
Sonicadvance1 Oct 28, 2024
8a4f512
IR: Change VLoadVectorGatherMasked to use IR::OpSize
Sonicadvance1 Oct 28, 2024
dc31cf8
IR: Change VLoadVectorGatherMaskedQPS to use IR::OpSize
Sonicadvance1 Oct 28, 2024
52ec572
IR: Change VLoadVectorElement to use IR::OpSize
Sonicadvance1 Oct 28, 2024
4b03185
IR: Change VStoreVectorElement to use IR::OpSize
Sonicadvance1 Oct 28, 2024
c8c7ffb
IR: Change VBroadcastFromMem to use IR::OpSize
Sonicadvance1 Oct 28, 2024
260d3b0
IR: Change Push to use IR::OpSize
Sonicadvance1 Oct 28, 2024
b31ce13
IR: Change Pop to use IR::OpSize
Sonicadvance1 Oct 28, 2024
6f4fd44
IR: Change MemSet to use IR::OpSize
Sonicadvance1 Oct 28, 2024
9034035
IR: Change MemCpy to use IR::OpSize
Sonicadvance1 Oct 28, 2024
321f686
IR: Change VStoreNonTemporal to use IR::OpSize
Sonicadvance1 Oct 28, 2024
f4744f1
IR: Change VStoreNonTemporalPair to use IR::OpSize
Sonicadvance1 Oct 28, 2024
97a6ba9
IR: Change VLoadNonTemporal to use IR::OpSize
Sonicadvance1 Oct 28, 2024
f1a4286
IR: Change CondJump to use IR::OpSize
Sonicadvance1 Oct 28, 2024
a848211
IR: Change NZCVSelectV to use IR::OpSize
Sonicadvance1 Oct 28, 2024
764aaca
IR: Change VExtractToGPR to use IR::OpSize
Sonicadvance1 Oct 28, 2024
1bde30a
IR: Change Float_ToGPR_S to use IR::OpSize
Sonicadvance1 Oct 28, 2024
fd9158c
IR: Change Float_ToGPR_ZS to use IR::OpSize
Sonicadvance1 Oct 28, 2024
1a115a8
IR: Change FCmp to use IR::OpSize
Sonicadvance1 Oct 28, 2024
081907e
IR: Change VFAddScalarInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
f054274
IR: Change VFSubScalarInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
000ab5f
IR: Change VFMulScalarInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
37540f4
IR: Change VFDivScalarInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
bdfa8ad
IR: Change VFMinScalarInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
92ee071
IR: Change VFMaxScalarInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
d6f726f
IR: Change VFSqrtScalarInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
af1cfcb
IR: Change VFRSqrtScalarInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
1609348
IR: Change VFRecpScalarInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
efbc42d
IR: Change VFToFScalarInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
5626f4e
IR: Change VSToFVectorInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
37d092a
IR: Change VSToFGPRInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
fed2c13
IR: Change VFToIScalarInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
5566b44
IR: Change VFCMPScalarInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
2bd7dda
IR: Change VFMLAScalarInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
c8a9dd0
IR: Change VFMLSScalarInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
0e31077
IR: Change VFNMLAScalarInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
027e762
IR: Change VFNMLSScalarInsert to use IR::OpSize
Sonicadvance1 Oct 28, 2024
4a6b5d4
IR: Change VMov to use IR::OpSize
Sonicadvance1 Oct 28, 2024
e6f6ee2
IR: Change VectorImm to use IR::OpSize
Sonicadvance1 Oct 28, 2024
886db4f
IR: Change LoadNamedVectorConstant to use IR::OpSize
Sonicadvance1 Oct 28, 2024
efd5c51
IR: Change LoadNamedVectorIndexedConstant to use IR::OpSize
Sonicadvance1 Oct 28, 2024
a379ce6
IR: Change VNeg to use IR::OpSize
Sonicadvance1 Oct 28, 2024
b533dcd
IR: Change VNot to use IR::OpSize
Sonicadvance1 Oct 28, 2024
7a85e17
IR: Change VAbs to use IR::OpSize
Sonicadvance1 Oct 28, 2024
8c3ca44
IR: Change VPopcount to use IR::OpSize
Sonicadvance1 Oct 28, 2024
99e1eb5
IR: Change VAddv to use IR::OpSize
Sonicadvance1 Oct 28, 2024
21611fc
IR: Change VUMinV to use IR::OpSize
Sonicadvance1 Oct 28, 2024
0f5ff53
IR: Change VUMaxV to use IR::OpSize
Sonicadvance1 Oct 28, 2024
0bffdc4
IR: Change VFAbs to use IR::OpSize
Sonicadvance1 Oct 28, 2024
9f18de0
IR: Change VFNeg to use IR::OpSize
Sonicadvance1 Oct 28, 2024
78cd21d
IR: Change VFRecp to use IR::OpSize
Sonicadvance1 Oct 28, 2024
0a34a43
IR: Change VFSqrt to use IR::OpSize
Sonicadvance1 Oct 28, 2024
3a2c7e8
IR: Change VFRSqrt to use IR::OpSize
Sonicadvance1 Oct 28, 2024
869367f
IR: Change VCMPEQZ to use IR::OpSize
Sonicadvance1 Oct 28, 2024
f315948
IR: Change VCMPGTZ to use IR::OpSize
Sonicadvance1 Oct 28, 2024
2605c7e
IR: Change VCMPLTZ to use IR::OpSize
Sonicadvance1 Oct 28, 2024
c791893
IR: Change VDupElement to use IR::OpSize
Sonicadvance1 Oct 28, 2024
9b981a4
IR: Change VShlI to use IR::OpSize
Sonicadvance1 Oct 28, 2024
ed313ed
IR: Change VUShrI to use IR::OpSize
Sonicadvance1 Oct 28, 2024
cdc5c15
IR: Change VUShraI to use IR::OpSize
Sonicadvance1 Oct 28, 2024
8cf92d3
IR: Change VSShrI to use IR::OpSize
Sonicadvance1 Oct 28, 2024
cb18963
IR: Change VUShrNI to use IR::OpSize
Sonicadvance1 Oct 28, 2024
3636c33
IR: Change VUShrNI2 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
0692b34
IR: Change VSXTL to use IR::OpSize
Sonicadvance1 Oct 28, 2024
5ab4105
IR: Change VSXTL2 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
d52a6e6
IR: Change VSSHLL to use IR::OpSize
Sonicadvance1 Oct 28, 2024
b8bc965
IR: Change VSSHLL2 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
414486f
IR: Change VUXTL to use IR::OpSize
Sonicadvance1 Oct 28, 2024
7c7efed
IR: Change VUXTL2 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
1868bd6
IR: Change VSQXTN to use IR::OpSize
Sonicadvance1 Oct 28, 2024
6cec557
IR: Change VSQXTN2 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
5247b71
IR: Change VSQXTNPair to use IR::OpSize
Sonicadvance1 Oct 28, 2024
6c07cd3
IR: Change VSQXTUN to use IR::OpSize
Sonicadvance1 Oct 28, 2024
3e31abb
IR: Change VSQXTUN2 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
ceca9ff
IR: Change VSQXTUNPair to use IR::OpSize
Sonicadvance1 Oct 28, 2024
0ba5016
IR: Change VSRSHR to use IR::OpSize
Sonicadvance1 Oct 28, 2024
d140cb4
IR: Change VSQSHL to use IR::OpSize
Sonicadvance1 Oct 28, 2024
53ca2ac
IR: Change VRev32 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
e7c9623
IR: Change VRev64 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
176f5a2
IR: Change VAdd to use IR::OpSize
Sonicadvance1 Oct 28, 2024
68c0380
IR: Change VSub to use IR::OpSize
Sonicadvance1 Oct 28, 2024
fc04b91
IR: Change VAnd to use IR::OpSize
Sonicadvance1 Oct 28, 2024
beed43e
IR: Change VAndn to use IR::OpSize
Sonicadvance1 Oct 28, 2024
6d5acec
IR: Change VOr to use IR::OpSize
Sonicadvance1 Oct 28, 2024
0dfd5dd
IR: Change VXor to use IR::OpSize
Sonicadvance1 Oct 28, 2024
fbf5b14
IR: Change VUQAdd to use IR::OpSize
Sonicadvance1 Oct 28, 2024
7a429b0
IR: Change VUQSub to use IR::OpSize
Sonicadvance1 Oct 28, 2024
235bee9
IR: Change VSQAdd to use IR::OpSize
Sonicadvance1 Oct 28, 2024
e20db7d
IR: Change VSQSub to use IR::OpSize
Sonicadvance1 Oct 28, 2024
ac55e46
IR: Change VAddP to use IR::OpSize
Sonicadvance1 Oct 28, 2024
04d62cd
IR: Change VURAvg to use IR::OpSize
Sonicadvance1 Oct 28, 2024
7f5421f
IR: Change VUMin to use IR::OpSize
Sonicadvance1 Oct 28, 2024
3a07cf7
IR: Change VUMax to use IR::OpSize
Sonicadvance1 Oct 28, 2024
692a4a8
IR: Change VSMin to use IR::OpSize
Sonicadvance1 Oct 28, 2024
b514548
IR: Change VSMax to use IR::OpSize
Sonicadvance1 Oct 28, 2024
9c22922
IR: Change VZip to use IR::OpSize
Sonicadvance1 Oct 28, 2024
a3c544a
IR: Change VZip2 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
b2ae829
IR: Change VUnZip to use IR::OpSize
Sonicadvance1 Oct 28, 2024
2d9ef56
IR: Change VUnZip2 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
85431a8
IR: Change VTrn to use IR::OpSize
Sonicadvance1 Oct 28, 2024
33b3814
IR: Change VTrn2 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
29115b3
IR: Change VFAdd to use IR::OpSize
Sonicadvance1 Oct 28, 2024
7ec21b7
IR: Change VFAddP to use IR::OpSize
Sonicadvance1 Oct 28, 2024
7942709
IR: Change VFAddV to use IR::OpSize
Sonicadvance1 Oct 28, 2024
ba74a6a
IR: Change VFSub to use IR::OpSize
Sonicadvance1 Oct 28, 2024
96bdefd
IR: Change VFMul to use IR::OpSize
Sonicadvance1 Oct 28, 2024
b51b0c5
IR: Change VFDiv to use IR::OpSize
Sonicadvance1 Oct 28, 2024
c3c643d
IR: Change VFMin to use IR::OpSize
Sonicadvance1 Oct 28, 2024
844afdb
IR: Change VFMax to use IR::OpSize
Sonicadvance1 Oct 28, 2024
974cc59
IR: Change VMul to use IR::OpSize
Sonicadvance1 Oct 28, 2024
0e08871
IR: Change VUMull to use IR::OpSize
Sonicadvance1 Oct 28, 2024
503c86d
IR: Change VSMull to use IR::OpSize
Sonicadvance1 Oct 28, 2024
51eede0
IR: Change VUMull2 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
2232550
IR: Change VSMull2 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
c5f396d
IR: Change VUMulH to use IR::OpSize
Sonicadvance1 Oct 28, 2024
bf19578
IR: Change VSMulH to use IR::OpSize
Sonicadvance1 Oct 28, 2024
ac14a88
IR: Change VUABDL to use IR::OpSize
Sonicadvance1 Oct 28, 2024
286258a
IR: Change VUABDL2 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
d0d2229
IR: Change VUShl to use IR::OpSize
Sonicadvance1 Oct 28, 2024
9ba431a
IR: Change VUShr to use IR::OpSize
Sonicadvance1 Oct 28, 2024
3b9a2d2
IR: Change VSShr to use IR::OpSize
Sonicadvance1 Oct 28, 2024
3e74817
IR: Change VUShlS to use IR::OpSize
Sonicadvance1 Oct 28, 2024
820b0be
IR: Change VUShrS to use IR::OpSize
Sonicadvance1 Oct 28, 2024
c062740
IR: Change VSShrS to use IR::OpSize
Sonicadvance1 Oct 28, 2024
3a6f5e6
IR: Change VUShrSWide to use IR::OpSize
Sonicadvance1 Oct 28, 2024
2d8bd7b
IR: Change VSShrSWide to use IR::OpSize
Sonicadvance1 Oct 28, 2024
34d5e70
IR: Change VUShlSWide to use IR::OpSize
Sonicadvance1 Oct 28, 2024
02ebe06
IR: Change VInsElement to use IR::OpSize
Sonicadvance1 Oct 28, 2024
365d8b9
IR: Change VInsGPR to use IR::OpSize
Sonicadvance1 Oct 28, 2024
9e3c50c
IR: Change VExtr to use IR::OpSize
Sonicadvance1 Oct 28, 2024
75b8226
IR: Change VCMPEQ to use IR::OpSize
Sonicadvance1 Oct 28, 2024
cfa4e7f
IR: Change VCMPGT to use IR::OpSize
Sonicadvance1 Oct 28, 2024
0fa095c
IR: Change VFCMPEQ to use IR::OpSize
Sonicadvance1 Oct 28, 2024
47c4039
IR: Change VFCMPNEQ to use IR::OpSize
Sonicadvance1 Oct 28, 2024
074777b
IR: Change VFCMPLT to use IR::OpSize
Sonicadvance1 Oct 28, 2024
0a4b21d
IR: Change VFCMPGT to use IR::OpSize
Sonicadvance1 Oct 28, 2024
e8f64f2
IR: Change VFCMPLE to use IR::OpSize
Sonicadvance1 Oct 28, 2024
ee8e312
IR: Change VFCMPORD to use IR::OpSize
Sonicadvance1 Oct 28, 2024
30bf0d5
IR: Change VFCMPUNO to use IR::OpSize
Sonicadvance1 Oct 28, 2024
0c7afa0
IR: Change VTBL1 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
061fc44
IR: Change VTBL2 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
5a83a65
IR: Change VTBX1 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
4e21177
IR: Change VBSL to use IR::OpSize
Sonicadvance1 Oct 28, 2024
660dfcd
IR: Change VFCADD to use IR::OpSize
Sonicadvance1 Oct 28, 2024
bd5159c
IR: Change VFMLA to use IR::OpSize
Sonicadvance1 Oct 28, 2024
362b572
IR: Change VFMLS to use IR::OpSize
Sonicadvance1 Oct 28, 2024
17b851d
IR: Change VFNMLA to use IR::OpSize
Sonicadvance1 Oct 28, 2024
a6cbce4
IR: Change VFNMLS to use IR::OpSize
Sonicadvance1 Oct 28, 2024
6543995
IR: Change VCastFromGPR to use IR::OpSize
Sonicadvance1 Oct 28, 2024
3405043
IR: Change VDupFromGPR to use IR::OpSize
Sonicadvance1 Oct 28, 2024
4544e7c
IR: Change Float_FromGPR_S to use IR::OpSize
Sonicadvance1 Oct 28, 2024
30317ac
IR: Change Float_FToF to use IR::OpSize
Sonicadvance1 Oct 28, 2024
947b7ae
IR: Change Vector_SToF to use IR::OpSize
Sonicadvance1 Oct 28, 2024
03bc962
IR: Change Vector_FToS to use IR::OpSize
Sonicadvance1 Oct 28, 2024
8ad9286
IR: Change Vector_FToZS to use IR::OpSize
Sonicadvance1 Oct 28, 2024
38c5870
IR: Change Vector_FToF to use IR::OpSize
Sonicadvance1 Oct 28, 2024
d54888a
IR: Change VFCVTL2 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
6f98ef8
IR: Change VFCVTN2 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
44f9df0
IR: Change Vector_FToI to use IR::OpSize
Sonicadvance1 Oct 28, 2024
dfe4076
IR: Change Vector_F64ToI32 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
29ffe02
IR: Change VAESEnc to use IR::OpSize
Sonicadvance1 Oct 28, 2024
d81f92f
IR: Change VAESEncLast to use IR::OpSize
Sonicadvance1 Oct 28, 2024
87f8182
IR: Change VAESDec to use IR::OpSize
Sonicadvance1 Oct 28, 2024
51c1998
IR: Change VAESDecLast to use IR::OpSize
Sonicadvance1 Oct 28, 2024
d26d9e7
IR: Change CRC32 to use IR::OpSize
Sonicadvance1 Oct 28, 2024
f4e9302
IR: Change PCLMUL to use IR::OpSize
Sonicadvance1 Oct 28, 2024
eccfb53
IR: Change StoreStackMemory to use IR::OpSize
Sonicadvance1 Oct 28, 2024
84767c8
IR: Change PushStack to use IR::OpSize
Sonicadvance1 Oct 28, 2024
4c7ac17
IR: Change F80CVT to use IR::OpSize
Sonicadvance1 Oct 28, 2024
b810070
IR: Change F80CVTInt to use IR::OpSize
Sonicadvance1 Oct 28, 2024
2dd0a82
IR: Change F80CVTTo to use IR::OpSize
Sonicadvance1 Oct 28, 2024
063f524
IR: Change F80CVTToInt to use IR::OpSize
Sonicadvance1 Oct 28, 2024
65ddae1
IR: Change F80VBSLStack to use IR::OpSize
Sonicadvance1 Oct 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions FEXCore/Source/Interface/Context/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,11 @@ class ContextImpl final : public FEXCore::Context::Context {
return Config.Is64BitMode ? 8 : 4;
}

// TODO: Temporary while OpcodeDispatcher shifts over
IR::OpSize GetGPROpSize() const {
return Config.Is64BitMode ? IR::OpSize::i64Bit : IR::OpSize::i32Bit;
}

FEXCore::JITSymbols Symbols;

FEXCore::Utils::PooledAllocatorVirtual OpDispatcherAllocator;
Expand Down
7 changes: 4 additions & 3 deletions FEXCore/Source/Interface/Core/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1017,12 +1017,13 @@ void ContextImpl::AddThunkTrampolineIRHandler(uintptr_t Entrypoint, uintptr_t Gu
IRHeader.first->Blocks = emit->WrapNode(Block);
emit->SetCurrentCodeBlock(Block);

const uint8_t GPRSize = GetGPRSize();
const auto GPRSize = GetGPROpSize();

if (GPRSize == 8) {
if (GPRSize == IR::OpSize::i64Bit) {
emit->_StoreRegister(emit->_Constant(Entrypoint), X86State::REG_R11, IR::GPRClass, GPRSize);
} else {
emit->_StoreContext(GPRSize, IR::FPRClass, emit->_VCastFromGPR(8, 8, emit->_Constant(Entrypoint)), offsetof(Core::CPUState, mm[0][0]));
emit->_StoreContext(GPRSize, IR::FPRClass, emit->_VCastFromGPR(IR::OpSize::i64Bit, IR::OpSize::i64Bit, emit->_Constant(Entrypoint)),
offsetof(Core::CPUState, mm[0][0]));
}
emit->_ExitFunction(emit->_Constant(GuestThunkEntrypoint));
},
Expand Down
Loading
Loading