Merge branch 'chris_cpu_changes' of https://github.com/Gliniak/xenia.git into canary_experimental

This commit is contained in:
Gliniak
2022-06-17 14:04:58 +02:00
7 changed files with 243 additions and 49 deletions

View File

@@ -820,6 +820,29 @@ void Value::Sha(Value* other) {
}
}
void Value::RotateLeft(Value* other) {
assert_true(other->type == INT8_TYPE);
auto rotation = other->constant.u8;
switch (type) {
case INT8_TYPE:
constant.u8 = rotate_left<uint8_t>(constant.u8, rotation);
break;
case INT16_TYPE:
constant.u16 = rotate_left<uint16_t>(constant.u16, rotation);
break;
case INT32_TYPE:
constant.u32 = rotate_left<uint32_t>(constant.u32, rotation);
break;
case INT64_TYPE:
constant.u64 = rotate_left<uint64_t>(constant.u64, rotation);
break;
default:
assert_unhandled_case(type);
break;
}
}
void Value::Extract(Value* vec, Value* index) {
assert_true(vec->type == VEC128_TYPE);
switch (type) {

View File

@@ -520,6 +520,7 @@ class Value {
void Shl(Value* other);
void Shr(Value* other);
void Sha(Value* other);
void RotateLeft(Value* other);
void Extract(Value* vec, Value* index);
void Select(Value* other, Value* ctrl);
void Splat(Value* other);