[decompiler] clean up vector detection and add vector float product detection (#638)

* change

* recognize vector float product and update tests
This commit is contained in:
water111
2021-06-27 17:24:35 -04:00
committed by GitHub
parent bfb1fbe1fc
commit a6d5c4eda3
146 changed files with 1085 additions and 1653 deletions
@@ -50,12 +50,7 @@
(y-rat (-> math-cam y-ratio))
(cull-info (-> math-cam cull-info))
)
(let
((unused-x-thing
(/ (+ 1.0 (* (* 4.0 x-rat) x-rat)) (+ 1.0 (* x-rat x-rat)))
)
)
)
(/ (+ 1.0 (* (* 4.0 x-rat) x-rat)) (+ 1.0 (* x-rat x-rat)))
(let ((y-thing (/ (+ 1.0 (* (* 4.0 y-rat) y-rat)) (+ 1.0 (* y-rat y-rat)))))
(set!
(-> cull-info x-fact)
@@ -149,8 +144,7 @@
(let ((fog-constant-1 100.0)
(fog-constant-2 16760631.0)
)
(let ((f0-21 16777115.0))
)
16777115.0
(let
((fog-at-near-plane
(/
@@ -275,12 +269,9 @@
)
)
)
(let ((v1-17 0))
)
(let ((v1-20 (make-u128 0 (shl #x301ec000 32))))
)
(let ((v1-23 (make-u128 0 (shl #x303ec000 32))))
)
0
(make-u128 0 (shl #x301ec000 32))
(make-u128 0 (shl #x303ec000 32))
(let ((pfog (-> math-cam pfog0)))
(let ((vis-gif-0 (-> math-cam vis-gifs)))
(set! (-> vis-gif-0 0 fog0) (the-as uint pfog))
@@ -478,8 +469,7 @@
(vf31 :class vf)
)
(init-vf0-vector)
(let ((v1-0 0))
)
0
(.lvf vf24 (&-> *math-camera* camera-temp vector 0 quad))
(.lvf vf25 (&-> *math-camera* camera-temp vector 1 quad))
(.lvf vf26 (&-> *math-camera* camera-temp vector 2 quad))
@@ -526,8 +516,7 @@
(vf31 :class vf)
)
(init-vf0-vector)
(let ((v1-0 0))
)
0
(.lvf vf24 (&-> *math-camera* camera-temp vector 0 quad))
(.lvf vf25 (&-> *math-camera* camera-temp vector 1 quad))
(.lvf vf26 (&-> *math-camera* camera-temp vector 2 quad))
@@ -574,8 +563,7 @@
(vf31 :class vf)
)
(init-vf0-vector)
(let ((v1-0 0))
)
0
(.lvf vf24 (&-> *math-camera* camera-temp vector 0 quad))
(.lvf vf25 (&-> *math-camera* camera-temp vector 1 quad))
(.lvf vf26 (&-> *math-camera* camera-temp vector 2 quad))
@@ -598,8 +586,7 @@
(.add.vf vf28 vf28 vf30)
(.max.x.vf vf28 vf28 vf0 :mask #b1000)
(.svf (&-> arg0 quad) vf28)
(let ((a0-2 (zero? (logand v1-7 63))))
)
(zero? (logand v1-7 63))
(.mov v0-0 vf23)
v0-0
)