mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-02-10 17:12:34 +00:00
OpcodeDispatcher: add ExtractPair helper
terser and will aid coalescing, as well as eventual transition to multidest extracts which is what we'll actually want. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
parent
4c7595c68a
commit
1a18e392f8
@ -1576,6 +1576,14 @@ private:
|
||||
StoreResult(GPRClass, Op, Result, -1);
|
||||
}
|
||||
|
||||
std::pair<OrderedNode*, OrderedNode*> ExtractPair(OpSize Size, OrderedNode* Pair) {
|
||||
// Extract high first. This is a hack to improve coalescing.
|
||||
OrderedNode* Hi = _ExtractElementPair(Size, Pair, 1);
|
||||
OrderedNode* Lo = _ExtractElementPair(Size, Pair, 0);
|
||||
|
||||
return std::make_pair(Lo, Hi);
|
||||
}
|
||||
|
||||
// Helper to derive Dest by a given builder-using Expression with the opcode
|
||||
// replaced with NewOp. Useful for generic building code. Not safe in general.
|
||||
// but does the right handling of ImplicitFlagClobber at least and must be
|
||||
|
Loading…
x
Reference in New Issue
Block a user