mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-04 13:44:31 +01:00
A32: Implement ARMv8 VST{1-4} (multiple)
This commit is contained in:
parent
eb332b3836
commit
d0b45f6150
6 changed files with 122 additions and 80 deletions
|
|
@ -41,14 +41,26 @@ U128 IREmitter::Pack2x64To1x128(const U64& lo, const U64& hi) {
|
|||
return Inst<U128>(Opcode::Pack2x64To1x128, lo, hi);
|
||||
}
|
||||
|
||||
U32 IREmitter::LeastSignificantWord(const U64& value) {
|
||||
return Inst<U32>(Opcode::LeastSignificantWord, value);
|
||||
UAny IREmitter::LeastSignificant(size_t bitsize, const U32U64& value) {
|
||||
switch (bitsize) {
|
||||
case 8:
|
||||
return LeastSignificantByte(value);
|
||||
case 16:
|
||||
return LeastSignificantHalf(value);
|
||||
case 32:
|
||||
if (value.GetType() == Type::U32) {
|
||||
return value;
|
||||
}
|
||||
return LeastSignificantWord(value);
|
||||
case 64:
|
||||
ASSERT(value.GetType() == Type::U64);
|
||||
return value;
|
||||
}
|
||||
ASSERT_FALSE("Invalid bitsize");
|
||||
}
|
||||
|
||||
ResultAndCarry<U32> IREmitter::MostSignificantWord(const U64& value) {
|
||||
const auto result = Inst<U32>(Opcode::MostSignificantWord, value);
|
||||
const auto carry_out = Inst<U1>(Opcode::GetCarryFromOp, result);
|
||||
return {result, carry_out};
|
||||
U32 IREmitter::LeastSignificantWord(const U64& value) {
|
||||
return Inst<U32>(Opcode::LeastSignificantWord, value);
|
||||
}
|
||||
|
||||
U16 IREmitter::LeastSignificantHalf(U32U64 value) {
|
||||
|
|
@ -65,6 +77,12 @@ U8 IREmitter::LeastSignificantByte(U32U64 value) {
|
|||
return Inst<U8>(Opcode::LeastSignificantByte, value);
|
||||
}
|
||||
|
||||
ResultAndCarry<U32> IREmitter::MostSignificantWord(const U64& value) {
|
||||
const auto result = Inst<U32>(Opcode::MostSignificantWord, value);
|
||||
const auto carry_out = Inst<U1>(Opcode::GetCarryFromOp, result);
|
||||
return {result, carry_out};
|
||||
}
|
||||
|
||||
U1 IREmitter::MostSignificantBit(const U32& value) {
|
||||
return Inst<U1>(Opcode::MostSignificantBit, value);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,10 +87,11 @@ public:
|
|||
|
||||
U64 Pack2x32To1x64(const U32& lo, const U32& hi);
|
||||
U128 Pack2x64To1x128(const U64& lo, const U64& hi);
|
||||
UAny LeastSignificant(size_t bitsize, const U32U64& value);
|
||||
U32 LeastSignificantWord(const U64& value);
|
||||
ResultAndCarry<U32> MostSignificantWord(const U64& value);
|
||||
U16 LeastSignificantHalf(U32U64 value);
|
||||
U8 LeastSignificantByte(U32U64 value);
|
||||
ResultAndCarry<U32> MostSignificantWord(const U64& value);
|
||||
U1 MostSignificantBit(const U32& value);
|
||||
U1 IsZero(const U32& value);
|
||||
U1 IsZero(const U64& value);
|
||||
|
|
|
|||
|
|
@ -94,9 +94,9 @@ OPCODE(NZCVFromPackedFlags, NZCV, U32
|
|||
OPCODE(Pack2x32To1x64, U64, U32, U32 )
|
||||
OPCODE(Pack2x64To1x128, U128, U64, U64 )
|
||||
OPCODE(LeastSignificantWord, U32, U64 )
|
||||
OPCODE(MostSignificantWord, U32, U64 )
|
||||
OPCODE(LeastSignificantHalf, U16, U32 )
|
||||
OPCODE(LeastSignificantByte, U8, U32 )
|
||||
OPCODE(MostSignificantWord, U32, U64 )
|
||||
OPCODE(MostSignificantBit, U1, U32 )
|
||||
OPCODE(IsZero32, U1, U32 )
|
||||
OPCODE(IsZero64, U1, U64 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue