mirror of
https://github.com/allaunthefox/SilverSight.git
synced 2026-07-31 01:25:21 +00:00
fix(julia): swap a/b operands in DIV_SAT_Q16 to match Lean spec
This commit is contained in:
parent
3c4e039e48
commit
cb18b24627
1 changed files with 2 additions and 2 deletions
|
|
@ -123,8 +123,8 @@ function exec_prim(op::Prim, a::Union{Int32, Bool}, b::Union{Int32, Bool, Nothin
|
||||||
return (avm_clamp(result), TYPE_Q16)
|
return (avm_clamp(result), TYPE_Q16)
|
||||||
elseif op == DIV_SAT_Q16
|
elseif op == DIV_SAT_Q16
|
||||||
b::Int32 == 0 && error(DIVISION_BY_ZERO)
|
b::Int32 == 0 && error(DIVISION_BY_ZERO)
|
||||||
num = Int64(b::Int32) * Q16_16.Q16_SCALE
|
num = Int64(a::Int32) * Q16_16.Q16_SCALE
|
||||||
result = div(num, Int64(a::Int32))
|
result = div(num, Int64(b::Int32))
|
||||||
return (avm_clamp(result), TYPE_Q16)
|
return (avm_clamp(result), TYPE_Q16)
|
||||||
elseif op == LT_Q16
|
elseif op == LT_Q16
|
||||||
return (lt_q16_v6(a::Int32, b::Int32), TYPE_BOOL)
|
return (lt_q16_v6(a::Int32, b::Int32), TYPE_BOOL)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue