diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-03-07 20:48:03 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:23 +0200 |
commit | 924f0a9149b6777782347be3d2c833a5f8e90058 (patch) | |
tree | 1bd15a053df1f337410b9a9c95809c4095afa459 /src/shader_recompiler/frontend/ir/ir_emitter.cpp | |
parent | shader: Implement LEA (diff) | |
download | yuzu-924f0a9149b6777782347be3d2c833a5f8e90058.tar yuzu-924f0a9149b6777782347be3d2c833a5f8e90058.tar.gz yuzu-924f0a9149b6777782347be3d2c833a5f8e90058.tar.bz2 yuzu-924f0a9149b6777782347be3d2c833a5f8e90058.tar.lz yuzu-924f0a9149b6777782347be3d2c833a5f8e90058.tar.xz yuzu-924f0a9149b6777782347be3d2c833a5f8e90058.tar.zst yuzu-924f0a9149b6777782347be3d2c833a5f8e90058.zip |
Diffstat (limited to 'src/shader_recompiler/frontend/ir/ir_emitter.cpp')
-rw-r--r-- | src/shader_recompiler/frontend/ir/ir_emitter.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.cpp b/src/shader_recompiler/frontend/ir/ir_emitter.cpp index 01f52183c..1659b7f3b 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.cpp +++ b/src/shader_recompiler/frontend/ir/ir_emitter.cpp @@ -813,8 +813,15 @@ U32 IREmitter::IAbs(const U32& value) { return Inst<U32>(Opcode::IAbs32, value); } -U32 IREmitter::ShiftLeftLogical(const U32& base, const U32& shift) { - return Inst<U32>(Opcode::ShiftLeftLogical32, base, shift); +U32U64 IREmitter::ShiftLeftLogical(const U32U64& base, const U32& shift) { + switch (base.Type()) { + case Type::U32: + return Inst<U32>(Opcode::ShiftLeftLogical32, base, shift); + case Type::U64: + return Inst<U64>(Opcode::ShiftLeftLogical64, base, shift); + default: + ThrowInvalidType(base.Type()); + } } U32U64 IREmitter::ShiftRightLogical(const U32U64& base, const U32& shift) { @@ -828,8 +835,15 @@ U32U64 IREmitter::ShiftRightLogical(const U32U64& base, const U32& shift) { } } -U32 IREmitter::ShiftRightArithmetic(const U32& base, const U32& shift) { - return Inst<U32>(Opcode::ShiftRightArithmetic32, base, shift); +U32U64 IREmitter::ShiftRightArithmetic(const U32U64& base, const U32& shift) { + switch (base.Type()) { + case Type::U32: + return Inst<U32>(Opcode::ShiftRightArithmetic32, base, shift); + case Type::U64: + return Inst<U64>(Opcode::ShiftRightArithmetic64, base, shift); + default: + ThrowInvalidType(base.Type()); + } } U32 IREmitter::BitwiseAnd(const U32& a, const U32& b) { |