mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
[decompiler] recognize mfc nop (#1911)
Forgot to include in previous PR.
This commit is contained in:
parent
123e7fd87b
commit
903450b878
|
@ -537,6 +537,11 @@ std::unique_ptr<AtomicOp> convert_mtc1_1(const Instruction& i0, int idx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<AtomicOp> convert_mfc1_1(const Instruction& i0, int idx) {
|
std::unique_ptr<AtomicOp> convert_mfc1_1(const Instruction& i0, int idx) {
|
||||||
|
if (i0.get_dst(0).is_reg(rr0()) && i0.get_src(0).is_reg(Register(Reg::FPR, 31))) {
|
||||||
|
// mfc r0, f31 is a nop
|
||||||
|
return std::make_unique<SpecialOp>(SpecialOp::Kind::NOP, idx);
|
||||||
|
}
|
||||||
|
|
||||||
if (i0.get_dst(0).is_reg(rr0()) || i0.get_dst(0).is_reg(make_gpr(Reg::AT)) ||
|
if (i0.get_dst(0).is_reg(rr0()) || i0.get_dst(0).is_reg(make_gpr(Reg::AT)) ||
|
||||||
i0.get_dst(0).is_reg(rra())) {
|
i0.get_dst(0).is_reg(rra())) {
|
||||||
// sometimes mfc1 r0, f31 is used like a 'nop'. No idea why.
|
// sometimes mfc1 r0, f31 is used like a 'nop'. No idea why.
|
||||||
|
|
11
test/decompiler/reference/jak1/engine/ambient/mood_REF.gc
generated
vendored
11
test/decompiler/reference/jak1/engine/ambient/mood_REF.gc
generated
vendored
|
@ -32,12 +32,8 @@
|
||||||
;; definition for function update-mood-itimes
|
;; definition for function update-mood-itimes
|
||||||
;; INFO: Used lq/sq
|
;; INFO: Used lq/sq
|
||||||
;; INFO: Return type mismatch int vs none.
|
;; INFO: Return type mismatch int vs none.
|
||||||
;; WARN: Function may read a register that is not set: f31
|
|
||||||
(defun update-mood-itimes ((arg0 mood-context))
|
(defun update-mood-itimes ((arg0 mood-context))
|
||||||
(local-vars
|
(local-vars
|
||||||
(r0-0 int)
|
|
||||||
(r0-1 int)
|
|
||||||
(r0-2 int)
|
|
||||||
(v1-0 uint128)
|
(v1-0 uint128)
|
||||||
(v1-1 uint128)
|
(v1-1 uint128)
|
||||||
(v1-2 uint128)
|
(v1-2 uint128)
|
||||||
|
@ -58,7 +54,6 @@
|
||||||
(t2-1 uint128)
|
(t2-1 uint128)
|
||||||
(t3-0 uint128)
|
(t3-0 uint128)
|
||||||
(t3-1 uint128)
|
(t3-1 uint128)
|
||||||
(f31-0 none)
|
|
||||||
)
|
)
|
||||||
(rlet ((vf1 :class vf)
|
(rlet ((vf1 :class vf)
|
||||||
(vf2 :class vf)
|
(vf2 :class vf)
|
||||||
|
@ -123,11 +118,11 @@
|
||||||
(.mov t3-0 vf8)
|
(.mov t3-0 vf8)
|
||||||
(.pw.sra t1-1 t1-0 6)
|
(.pw.sra t1-1 t1-0 6)
|
||||||
(.pw.sra t2-1 t2-0 6)
|
(.pw.sra t2-1 t2-0 6)
|
||||||
(.mov r0-0 f31-0)
|
(nop!)
|
||||||
(.pw.sra t3-1 t3-0 6)
|
(.pw.sra t3-1 t3-0 6)
|
||||||
(.mov r0-1 f31-0)
|
(nop!)
|
||||||
(.ppach v1-2 a1-1 v1-1)
|
(.ppach v1-2 a1-1 v1-1)
|
||||||
(.mov r0-2 f31-0)
|
(nop!)
|
||||||
(.ppach a1-2 a3-1 a2-1)
|
(.ppach a1-2 a3-1 a2-1)
|
||||||
(set! (-> arg0 itimes 0 quad) v1-2)
|
(set! (-> arg0 itimes 0 quad) v1-2)
|
||||||
(.ppach v1-3 t1-1 t0-1)
|
(.ppach v1-3 t1-1 t0-1)
|
||||||
|
|
11
test/decompiler/reference/jak1/engine/collide/collide-mesh_REF.gc
generated
vendored
11
test/decompiler/reference/jak1/engine/collide/collide-mesh_REF.gc
generated
vendored
|
@ -357,12 +357,8 @@
|
||||||
|
|
||||||
;; definition for method 10 of type collide-mesh
|
;; definition for method 10 of type collide-mesh
|
||||||
;; INFO: Used lq/sq
|
;; INFO: Used lq/sq
|
||||||
;; WARN: Function may read a register that is not set: f31
|
|
||||||
(defmethod overlap-test collide-mesh ((obj collide-mesh) (arg0 collide-mesh-cache-tri) (arg1 vector))
|
(defmethod overlap-test collide-mesh ((obj collide-mesh) (arg0 collide-mesh-cache-tri) (arg1 vector))
|
||||||
(local-vars
|
(local-vars
|
||||||
(r0-0 int)
|
|
||||||
(r0-1 int)
|
|
||||||
(r0-2 int)
|
|
||||||
(v1-0 uint128)
|
(v1-0 uint128)
|
||||||
(a0-1 uint128)
|
(a0-1 uint128)
|
||||||
(a1-2 uint128)
|
(a1-2 uint128)
|
||||||
|
@ -371,7 +367,6 @@
|
||||||
(a1-7 float)
|
(a1-7 float)
|
||||||
(a2-1 uint128)
|
(a2-1 uint128)
|
||||||
(a2-2 uint128)
|
(a2-2 uint128)
|
||||||
(f31-0 none)
|
|
||||||
)
|
)
|
||||||
(rlet ((acc :class vf)
|
(rlet ((acc :class vf)
|
||||||
(vf0 :class vf)
|
(vf0 :class vf)
|
||||||
|
@ -402,14 +397,14 @@
|
||||||
)
|
)
|
||||||
(let ((a1-1 (-> s4-0 bbox4w max quad)))
|
(let ((a1-1 (-> s4-0 bbox4w max quad)))
|
||||||
(.pcgtw a2-2 a2-1 a0-1)
|
(.pcgtw a2-2 a2-1 a0-1)
|
||||||
(.mov r0-0 f31-0)
|
(nop!)
|
||||||
(.pcgtw a1-2 v1-0 a1-1)
|
(.pcgtw a1-2 v1-0 a1-1)
|
||||||
)
|
)
|
||||||
(.mov r0-1 f31-0)
|
(nop!)
|
||||||
(.por a1-3 a2-2 a1-2)
|
(.por a1-3 a2-2 a1-2)
|
||||||
(nop!)
|
(nop!)
|
||||||
(.ppach a1-4 (the-as uint128 0) a1-3)
|
(.ppach a1-4 (the-as uint128 0) a1-3)
|
||||||
(.mov r0-2 f31-0)
|
(nop!)
|
||||||
(let ((a1-5 (shl (the-as int a1-4) 16)))
|
(let ((a1-5 (shl (the-as int a1-4) 16)))
|
||||||
(nop!)
|
(nop!)
|
||||||
(b! (nonzero? a1-5) cfg-1 :likely-delay (set! s4-0 (+ s4-0 96)))
|
(b! (nonzero? a1-5) cfg-1 :likely-delay (set! s4-0 (+ s4-0 96)))
|
||||||
|
|
43
test/decompiler/reference/jak1/engine/collide/main-collide_REF.gc
generated
vendored
43
test/decompiler/reference/jak1/engine/collide/main-collide_REF.gc
generated
vendored
|
@ -3,21 +3,8 @@
|
||||||
|
|
||||||
;; definition for function drawable-sphere-box-intersect?
|
;; definition for function drawable-sphere-box-intersect?
|
||||||
;; INFO: Used lq/sq
|
;; INFO: Used lq/sq
|
||||||
;; WARN: Function may read a register that is not set: f31
|
|
||||||
(defun drawable-sphere-box-intersect? ((arg0 drawable) (arg1 bounding-box4w))
|
(defun drawable-sphere-box-intersect? ((arg0 drawable) (arg1 bounding-box4w))
|
||||||
(local-vars
|
(local-vars (v1-1 uint128) (v1-2 uint128) (v1-3 uint128) (a0-1 uint128) (a1-2 uint128) (a2-0 uint128))
|
||||||
(r0-0 int)
|
|
||||||
(r0-1 int)
|
|
||||||
(r0-2 int)
|
|
||||||
(r0-3 int)
|
|
||||||
(v1-1 uint128)
|
|
||||||
(v1-2 uint128)
|
|
||||||
(v1-3 uint128)
|
|
||||||
(a0-1 uint128)
|
|
||||||
(a1-2 uint128)
|
|
||||||
(a2-0 uint128)
|
|
||||||
(f31-0 none)
|
|
||||||
)
|
|
||||||
(rlet ((vf1 :class vf)
|
(rlet ((vf1 :class vf)
|
||||||
(vf2 :class vf)
|
(vf2 :class vf)
|
||||||
(vf3 :class vf)
|
(vf3 :class vf)
|
||||||
|
@ -40,14 +27,14 @@
|
||||||
(nop!)
|
(nop!)
|
||||||
(.pcgtw a1-2 a2-0 a1-1)
|
(.pcgtw a1-2 a2-0 a1-1)
|
||||||
)
|
)
|
||||||
(.mov r0-0 f31-0)
|
(nop!)
|
||||||
(.pcgtw v1-1 v1-0 a0-1)
|
(.pcgtw v1-1 v1-0 a0-1)
|
||||||
)
|
)
|
||||||
(.mov r0-1 f31-0)
|
(nop!)
|
||||||
(.por v1-2 a1-2 v1-1)
|
(.por v1-2 a1-2 v1-1)
|
||||||
(.mov r0-2 f31-0)
|
(nop!)
|
||||||
(.ppach v1-3 (the-as uint128 0) v1-2)
|
(.ppach v1-3 (the-as uint128 0) v1-2)
|
||||||
(.mov r0-3 f31-0)
|
(nop!)
|
||||||
(let ((v1-4 (shl (the-as int v1-3) 16)))
|
(let ((v1-4 (shl (the-as int v1-3) 16)))
|
||||||
(nop!)
|
(nop!)
|
||||||
(zero? v1-4)
|
(zero? v1-4)
|
||||||
|
@ -57,15 +44,8 @@
|
||||||
|
|
||||||
;; definition for function instance-sphere-box-intersect?
|
;; definition for function instance-sphere-box-intersect?
|
||||||
;; INFO: Used lq/sq
|
;; INFO: Used lq/sq
|
||||||
;; WARN: Function may read a register that is not set: f31
|
|
||||||
(defun instance-sphere-box-intersect? ((arg0 drawable) (arg1 instance-tie) (arg2 bounding-box4w))
|
(defun instance-sphere-box-intersect? ((arg0 drawable) (arg1 instance-tie) (arg2 bounding-box4w))
|
||||||
(local-vars
|
(local-vars
|
||||||
(r0-0 int)
|
|
||||||
(r0-1 int)
|
|
||||||
(r0-2 int)
|
|
||||||
(r0-3 int)
|
|
||||||
(r0-4 int)
|
|
||||||
(r0-5 int)
|
|
||||||
(v1-3 uint128)
|
(v1-3 uint128)
|
||||||
(v1-4 uint128)
|
(v1-4 uint128)
|
||||||
(v1-5 uint128)
|
(v1-5 uint128)
|
||||||
|
@ -80,7 +60,6 @@
|
||||||
(t1-0 uint128)
|
(t1-0 uint128)
|
||||||
(t2-1 uint128)
|
(t2-1 uint128)
|
||||||
(t2-2 uint128)
|
(t2-2 uint128)
|
||||||
(f31-0 none)
|
|
||||||
)
|
)
|
||||||
(rlet ((acc :class vf)
|
(rlet ((acc :class vf)
|
||||||
(vf0 :class vf)
|
(vf0 :class vf)
|
||||||
|
@ -107,9 +86,9 @@
|
||||||
(.pw.sra t1-0 a3-1 10)
|
(.pw.sra t1-0 a3-1 10)
|
||||||
(let ((a3-2 (the-as uint128 (-> arg1 origin vector4h 2 long))))
|
(let ((a3-2 (the-as uint128 (-> arg1 origin vector4h 2 long))))
|
||||||
(.pextlh t2-1 t2-0 0)
|
(.pextlh t2-1 t2-0 0)
|
||||||
(.mov r0-0 f31-0)
|
(nop!)
|
||||||
(.pw.sra t2-2 t2-1 16)
|
(.pw.sra t2-2 t2-1 16)
|
||||||
(.mov r0-1 f31-0)
|
(nop!)
|
||||||
(.pextlh t0-1 t0-0 0)
|
(.pextlh t0-1 t0-0 0)
|
||||||
(.mov vf8 t1-0)
|
(.mov vf8 t1-0)
|
||||||
(.pw.sra t0-2 t0-1 16)
|
(.pw.sra t0-2 t0-1 16)
|
||||||
|
@ -165,14 +144,14 @@
|
||||||
(nop!)
|
(nop!)
|
||||||
(.pcgtw a1-2 a2-1 a1-1)
|
(.pcgtw a1-2 a2-1 a1-1)
|
||||||
)
|
)
|
||||||
(.mov r0-2 f31-0)
|
(nop!)
|
||||||
(.pcgtw v1-3 v1-2 a0-2)
|
(.pcgtw v1-3 v1-2 a0-2)
|
||||||
)
|
)
|
||||||
(.mov r0-3 f31-0)
|
(nop!)
|
||||||
(.por v1-4 a1-2 v1-3)
|
(.por v1-4 a1-2 v1-3)
|
||||||
(.mov r0-4 f31-0)
|
(nop!)
|
||||||
(.ppach v1-5 (the-as uint128 0) v1-4)
|
(.ppach v1-5 (the-as uint128 0) v1-4)
|
||||||
(.mov r0-5 f31-0)
|
(nop!)
|
||||||
(let ((v1-6 (shl (the-as int v1-5) 16)))
|
(let ((v1-6 (shl (the-as int v1-5) 16)))
|
||||||
(nop!)
|
(nop!)
|
||||||
(zero? v1-6)
|
(zero? v1-6)
|
||||||
|
|
17
test/decompiler/reference/jak1/engine/gfx/ocean/ocean-mid_REF.gc
generated
vendored
17
test/decompiler/reference/jak1/engine/gfx/ocean/ocean-mid_REF.gc
generated
vendored
|
@ -661,14 +661,8 @@
|
||||||
|
|
||||||
;; definition for function ocean-mid-add-upload-table
|
;; definition for function ocean-mid-add-upload-table
|
||||||
;; INFO: Used lq/sq
|
;; INFO: Used lq/sq
|
||||||
;; WARN: Function may read a register that is not set: f31
|
|
||||||
(defun ocean-mid-add-upload-table ((arg0 dma-buffer) (arg1 uint) (arg2 uint) (arg3 (pointer float)) (arg4 int) (arg5 symbol))
|
(defun ocean-mid-add-upload-table ((arg0 dma-buffer) (arg1 uint) (arg2 uint) (arg3 (pointer float)) (arg4 int) (arg5 symbol))
|
||||||
(local-vars
|
(local-vars
|
||||||
(r0-0 int)
|
|
||||||
(r0-1 int)
|
|
||||||
(r0-2 int)
|
|
||||||
(r0-3 int)
|
|
||||||
(r0-4 int)
|
|
||||||
(v1-8 float)
|
(v1-8 float)
|
||||||
(a0-19 uint128)
|
(a0-19 uint128)
|
||||||
(a0-20 uint128)
|
(a0-20 uint128)
|
||||||
|
@ -678,7 +672,6 @@
|
||||||
(a1-16 uint128)
|
(a1-16 uint128)
|
||||||
(a2-15 uint128)
|
(a2-15 uint128)
|
||||||
(a3-11 uint128)
|
(a3-11 uint128)
|
||||||
(f31-0 none)
|
|
||||||
)
|
)
|
||||||
(rlet ((vf1 :class vf)
|
(rlet ((vf1 :class vf)
|
||||||
(vf2 :class vf)
|
(vf2 :class vf)
|
||||||
|
@ -719,16 +712,16 @@
|
||||||
(a3-10 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ arg2 1 (* 52 (the-as int (+ arg1 1)))))))
|
(a3-10 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ arg2 1 (* 52 (the-as int (+ arg1 1)))))))
|
||||||
)
|
)
|
||||||
(.pextlb a0-19 0 a0-18)
|
(.pextlb a0-19 0 a0-18)
|
||||||
(.mov r0-0 f31-0)
|
(nop!)
|
||||||
(.pextlb a1-14 0 a1-13)
|
(.pextlb a1-14 0 a1-13)
|
||||||
(.mov r0-1 f31-0)
|
(nop!)
|
||||||
(.pextlb a2-15 0 a2-14)
|
(.pextlb a2-15 0 a2-14)
|
||||||
(.mov r0-2 f31-0)
|
(nop!)
|
||||||
(.pextlb a3-11 0 a3-10)
|
(.pextlb a3-11 0 a3-10)
|
||||||
)
|
)
|
||||||
(.mov r0-3 f31-0)
|
(nop!)
|
||||||
(.pextlh a0-20 0 a0-19)
|
(.pextlh a0-20 0 a0-19)
|
||||||
(.mov r0-4 f31-0)
|
(nop!)
|
||||||
(.pextlh a1-15 0 a1-14)
|
(.pextlh a1-15 0 a1-14)
|
||||||
(.mov vf1 a0-20)
|
(.mov vf1 a0-20)
|
||||||
(.pextlh a0-21 0 a2-15)
|
(.pextlh a0-21 0 a2-15)
|
||||||
|
|
17
test/decompiler/reference/jak1/engine/gfx/ocean/ocean-near_REF.gc
generated
vendored
17
test/decompiler/reference/jak1/engine/gfx/ocean/ocean-near_REF.gc
generated
vendored
|
@ -435,14 +435,8 @@
|
||||||
;; definition for function ocean-near-add-upload
|
;; definition for function ocean-near-add-upload
|
||||||
;; INFO: Used lq/sq
|
;; INFO: Used lq/sq
|
||||||
;; INFO: Return type mismatch pointer vs none.
|
;; INFO: Return type mismatch pointer vs none.
|
||||||
;; WARN: Function may read a register that is not set: f31
|
|
||||||
(defun ocean-near-add-upload ((arg0 dma-buffer) (arg1 uint) (arg2 uint))
|
(defun ocean-near-add-upload ((arg0 dma-buffer) (arg1 uint) (arg2 uint))
|
||||||
(local-vars
|
(local-vars
|
||||||
(r0-0 int)
|
|
||||||
(r0-1 int)
|
|
||||||
(r0-2 int)
|
|
||||||
(r0-3 int)
|
|
||||||
(r0-4 int)
|
|
||||||
(v1-17 uint128)
|
(v1-17 uint128)
|
||||||
(v1-18 uint128)
|
(v1-18 uint128)
|
||||||
(v1-19 float)
|
(v1-19 float)
|
||||||
|
@ -453,7 +447,6 @@
|
||||||
(a2-30 uint128)
|
(a2-30 uint128)
|
||||||
(a2-31 uint128)
|
(a2-31 uint128)
|
||||||
(a3-27 uint128)
|
(a3-27 uint128)
|
||||||
(f31-0 none)
|
|
||||||
)
|
)
|
||||||
(rlet ((acc :class vf)
|
(rlet ((acc :class vf)
|
||||||
(vf1 :class vf)
|
(vf1 :class vf)
|
||||||
|
@ -566,16 +559,16 @@
|
||||||
(v1-16 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ a0-14 1 (* 52 (+ v1-10 1))))))
|
(v1-16 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ a0-14 1 (* 52 (+ v1-10 1))))))
|
||||||
)
|
)
|
||||||
(.pextlb a0-18 0 a2-29)
|
(.pextlb a0-18 0 a2-29)
|
||||||
(.mov r0-0 f31-0)
|
(nop!)
|
||||||
(.pextlb a2-30 0 a3-26)
|
(.pextlb a2-30 0 a3-26)
|
||||||
(.mov r0-1 f31-0)
|
(nop!)
|
||||||
(.pextlb a3-27 0 t0-15)
|
(.pextlb a3-27 0 t0-15)
|
||||||
(.mov r0-2 f31-0)
|
(nop!)
|
||||||
(.pextlb v1-17 0 v1-16)
|
(.pextlb v1-17 0 v1-16)
|
||||||
)
|
)
|
||||||
(.mov r0-3 f31-0)
|
(nop!)
|
||||||
(.pextlh a0-19 0 a0-18)
|
(.pextlh a0-19 0 a0-18)
|
||||||
(.mov r0-4 f31-0)
|
(nop!)
|
||||||
(.pextlh a2-31 0 a2-30)
|
(.pextlh a2-31 0 a2-30)
|
||||||
(.mov vf1 a0-19)
|
(.mov vf1 a0-19)
|
||||||
(.pextlh a0-20 0 a3-27)
|
(.pextlh a0-20 0 a3-27)
|
||||||
|
|
34
test/decompiler/reference/jak1/engine/gfx/ocean/ocean-transition_REF.gc
generated
vendored
34
test/decompiler/reference/jak1/engine/gfx/ocean/ocean-transition_REF.gc
generated
vendored
|
@ -100,14 +100,8 @@
|
||||||
|
|
||||||
;; definition for function ocean-trans-add-upload-table
|
;; definition for function ocean-trans-add-upload-table
|
||||||
;; INFO: Used lq/sq
|
;; INFO: Used lq/sq
|
||||||
;; WARN: Function may read a register that is not set: f31
|
|
||||||
(defun ocean-trans-add-upload-table ((arg0 dma-buffer) (arg1 int) (arg2 int) (arg3 (pointer float)) (arg4 int) (arg5 symbol))
|
(defun ocean-trans-add-upload-table ((arg0 dma-buffer) (arg1 int) (arg2 int) (arg3 (pointer float)) (arg4 int) (arg5 symbol))
|
||||||
(local-vars
|
(local-vars
|
||||||
(r0-0 int)
|
|
||||||
(r0-1 int)
|
|
||||||
(r0-2 int)
|
|
||||||
(r0-3 int)
|
|
||||||
(r0-4 int)
|
|
||||||
(v1-12 (inline-array vector))
|
(v1-12 (inline-array vector))
|
||||||
(v1-14 float)
|
(v1-14 float)
|
||||||
(a0-23 uint128)
|
(a0-23 uint128)
|
||||||
|
@ -118,7 +112,6 @@
|
||||||
(a2-15 uint128)
|
(a2-15 uint128)
|
||||||
(a2-16 uint128)
|
(a2-16 uint128)
|
||||||
(a3-10 uint128)
|
(a3-10 uint128)
|
||||||
(f31-0 none)
|
|
||||||
)
|
)
|
||||||
(rlet ((acc :class vf)
|
(rlet ((acc :class vf)
|
||||||
(vf1 :class vf)
|
(vf1 :class vf)
|
||||||
|
@ -215,17 +208,17 @@
|
||||||
(a0-22 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ a1-11 1 (* 52 (+ a0-16 1))))))
|
(a0-22 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ a1-11 1 (* 52 (+ a0-16 1))))))
|
||||||
)
|
)
|
||||||
(.pextlb a1-15 0 a2-14)
|
(.pextlb a1-15 0 a2-14)
|
||||||
(.mov r0-0 f31-0)
|
(nop!)
|
||||||
(.pextlb a2-15 0 a3-9)
|
(.pextlb a2-15 0 a3-9)
|
||||||
(.mov r0-1 f31-0)
|
(nop!)
|
||||||
(.pextlb a3-10 0 t0-10)
|
(.pextlb a3-10 0 t0-10)
|
||||||
(.mov r0-2 f31-0)
|
(nop!)
|
||||||
(.pextlb a0-23 0 a0-22)
|
(.pextlb a0-23 0 a0-22)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(.mov r0-3 f31-0)
|
(nop!)
|
||||||
(.pextlh a1-16 0 a1-15)
|
(.pextlh a1-16 0 a1-15)
|
||||||
(.mov r0-4 f31-0)
|
(nop!)
|
||||||
(.pextlh a2-16 0 a2-15)
|
(.pextlh a2-16 0 a2-15)
|
||||||
(.mov vf1 a1-16)
|
(.mov vf1 a1-16)
|
||||||
(.pextlh a1-17 0 a3-10)
|
(.pextlh a1-17 0 a3-10)
|
||||||
|
@ -302,14 +295,8 @@
|
||||||
|
|
||||||
;; definition for function ocean-trans-add-upload-strip
|
;; definition for function ocean-trans-add-upload-strip
|
||||||
;; INFO: Used lq/sq
|
;; INFO: Used lq/sq
|
||||||
;; WARN: Function may read a register that is not set: f31
|
|
||||||
(defun ocean-trans-add-upload-strip ((arg0 dma-buffer) (arg1 uint) (arg2 uint) (arg3 uint) (arg4 uint) (arg5 uint))
|
(defun ocean-trans-add-upload-strip ((arg0 dma-buffer) (arg1 uint) (arg2 uint) (arg3 uint) (arg4 uint) (arg5 uint))
|
||||||
(local-vars
|
(local-vars
|
||||||
(r0-0 int)
|
|
||||||
(r0-1 int)
|
|
||||||
(r0-2 int)
|
|
||||||
(r0-3 int)
|
|
||||||
(r0-4 int)
|
|
||||||
(v1-8 float)
|
(v1-8 float)
|
||||||
(a0-23 uint128)
|
(a0-23 uint128)
|
||||||
(a0-24 uint128)
|
(a0-24 uint128)
|
||||||
|
@ -319,7 +306,6 @@
|
||||||
(a1-16 uint128)
|
(a1-16 uint128)
|
||||||
(a2-15 uint128)
|
(a2-15 uint128)
|
||||||
(a3-11 uint128)
|
(a3-11 uint128)
|
||||||
(f31-0 none)
|
|
||||||
)
|
)
|
||||||
(rlet ((vf1 :class vf)
|
(rlet ((vf1 :class vf)
|
||||||
(vf2 :class vf)
|
(vf2 :class vf)
|
||||||
|
@ -365,16 +351,16 @@
|
||||||
(a3-10 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ arg2 1 (* 52 (the-as int (+ arg1 1)))))))
|
(a3-10 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ arg2 1 (* 52 (the-as int (+ arg1 1)))))))
|
||||||
)
|
)
|
||||||
(.pextlb a0-23 0 a0-22)
|
(.pextlb a0-23 0 a0-22)
|
||||||
(.mov r0-0 f31-0)
|
(nop!)
|
||||||
(.pextlb a1-14 0 a1-13)
|
(.pextlb a1-14 0 a1-13)
|
||||||
(.mov r0-1 f31-0)
|
(nop!)
|
||||||
(.pextlb a2-15 0 a2-14)
|
(.pextlb a2-15 0 a2-14)
|
||||||
(.mov r0-2 f31-0)
|
(nop!)
|
||||||
(.pextlb a3-11 0 a3-10)
|
(.pextlb a3-11 0 a3-10)
|
||||||
)
|
)
|
||||||
(.mov r0-3 f31-0)
|
(nop!)
|
||||||
(.pextlh a0-24 0 a0-23)
|
(.pextlh a0-24 0 a0-23)
|
||||||
(.mov r0-4 f31-0)
|
(nop!)
|
||||||
(.pextlh a1-15 0 a1-14)
|
(.pextlh a1-15 0 a1-14)
|
||||||
(.mov vf1 a0-24)
|
(.mov vf1 a0-24)
|
||||||
(.pextlh a0-25 0 a2-15)
|
(.pextlh a0-25 0 a2-15)
|
||||||
|
|
14
test/decompiler/reference/jak1/engine/math/matrix_REF.gc
generated
vendored
14
test/decompiler/reference/jak1/engine/math/matrix_REF.gc
generated
vendored
|
@ -228,13 +228,8 @@
|
||||||
|
|
||||||
;; definition for function matrix-transpose!
|
;; definition for function matrix-transpose!
|
||||||
;; INFO: Used lq/sq
|
;; INFO: Used lq/sq
|
||||||
;; WARN: Function may read a register that is not set: f31
|
|
||||||
(defun matrix-transpose! ((dst matrix) (src matrix))
|
(defun matrix-transpose! ((dst matrix) (src matrix))
|
||||||
(local-vars
|
(local-vars
|
||||||
(r0-0 int)
|
|
||||||
(r0-1 int)
|
|
||||||
(r0-2 int)
|
|
||||||
(r0-3 int)
|
|
||||||
(v1-0 uint128)
|
(v1-0 uint128)
|
||||||
(v1-1 uint128)
|
(v1-1 uint128)
|
||||||
(v1-2 uint128)
|
(v1-2 uint128)
|
||||||
|
@ -243,7 +238,6 @@
|
||||||
(a3-1 uint128)
|
(a3-1 uint128)
|
||||||
(a3-2 uint128)
|
(a3-2 uint128)
|
||||||
(t0-1 uint128)
|
(t0-1 uint128)
|
||||||
(f31-0 none)
|
|
||||||
)
|
)
|
||||||
(nop!)
|
(nop!)
|
||||||
(nop!)
|
(nop!)
|
||||||
|
@ -255,17 +249,17 @@
|
||||||
(.pextlw v1-0 t1-0 t0-0)
|
(.pextlw v1-0 t1-0 t0-0)
|
||||||
(let ((a3-0 (-> src vector 3 quad)))
|
(let ((a3-0 (-> src vector 3 quad)))
|
||||||
(.pextuw a1-1 t1-0 t0-0)
|
(.pextuw a1-1 t1-0 t0-0)
|
||||||
(.mov r0-0 f31-0)
|
(nop!)
|
||||||
(.pextlw t0-1 a3-0 a2-0)
|
(.pextlw t0-1 a3-0 a2-0)
|
||||||
(.mov r0-1 f31-0)
|
(nop!)
|
||||||
(.pextuw a2-1 a3-0 a2-0)
|
(.pextuw a2-1 a3-0 a2-0)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(.mov r0-2 f31-0)
|
(nop!)
|
||||||
(.pcpyld a3-1 t0-1 v1-0)
|
(.pcpyld a3-1 t0-1 v1-0)
|
||||||
(.mov r0-3 f31-0)
|
(nop!)
|
||||||
(.pcpyud v1-1 v1-0 t0-1)
|
(.pcpyud v1-1 v1-0 t0-1)
|
||||||
(set! (-> dst vector 0 quad) a3-1)
|
(set! (-> dst vector 0 quad) a3-1)
|
||||||
(.pcpyld a3-2 a2-1 a1-1)
|
(.pcpyld a3-2 a2-1 a1-1)
|
||||||
|
|
11
test/decompiler/reference/jak2/engine/gfx/mood/mood_REF.gc
generated
vendored
11
test/decompiler/reference/jak2/engine/gfx/mood/mood_REF.gc
generated
vendored
|
@ -25,12 +25,8 @@
|
||||||
;; definition for function update-mood-itimes
|
;; definition for function update-mood-itimes
|
||||||
;; INFO: Used lq/sq
|
;; INFO: Used lq/sq
|
||||||
;; WARN: Return type mismatch int vs none.
|
;; WARN: Return type mismatch int vs none.
|
||||||
;; WARN: Function may read a register that is not set: f31
|
|
||||||
(defun update-mood-itimes ((arg0 mood-context))
|
(defun update-mood-itimes ((arg0 mood-context))
|
||||||
(local-vars
|
(local-vars
|
||||||
(r0-0 int)
|
|
||||||
(r0-1 int)
|
|
||||||
(r0-2 int)
|
|
||||||
(v1-1 uint128)
|
(v1-1 uint128)
|
||||||
(v1-2 uint128)
|
(v1-2 uint128)
|
||||||
(v1-3 uint128)
|
(v1-3 uint128)
|
||||||
|
@ -51,7 +47,6 @@
|
||||||
(t2-1 uint128)
|
(t2-1 uint128)
|
||||||
(t3-0 uint128)
|
(t3-0 uint128)
|
||||||
(t3-1 uint128)
|
(t3-1 uint128)
|
||||||
(f31-0 none)
|
|
||||||
)
|
)
|
||||||
(rlet ((vf1 :class vf)
|
(rlet ((vf1 :class vf)
|
||||||
(vf2 :class vf)
|
(vf2 :class vf)
|
||||||
|
@ -118,11 +113,11 @@
|
||||||
(.mov t3-0 vf8)
|
(.mov t3-0 vf8)
|
||||||
(.pw.sra t1-1 t1-0 6)
|
(.pw.sra t1-1 t1-0 6)
|
||||||
(.pw.sra t2-1 t2-0 6)
|
(.pw.sra t2-1 t2-0 6)
|
||||||
(.mov r0-0 f31-0)
|
(nop!)
|
||||||
(.pw.sra t3-1 t3-0 6)
|
(.pw.sra t3-1 t3-0 6)
|
||||||
(.mov r0-1 f31-0)
|
(nop!)
|
||||||
(.ppach v1-3 a1-1 v1-2)
|
(.ppach v1-3 a1-1 v1-2)
|
||||||
(.mov r0-2 f31-0)
|
(nop!)
|
||||||
(.ppach a1-2 a3-1 a2-1)
|
(.ppach a1-2 a3-1 a2-1)
|
||||||
(set! (-> arg0 itimes 0 quad) v1-3)
|
(set! (-> arg0 itimes 0 quad) v1-3)
|
||||||
(.ppach v1-4 t1-1 t0-1)
|
(.ppach v1-4 t1-1 t0-1)
|
||||||
|
|
65
test/decompiler/reference/jak2/engine/math/matrix_REF.gc
generated
vendored
65
test/decompiler/reference/jak2/engine/math/matrix_REF.gc
generated
vendored
|
@ -228,21 +228,8 @@
|
||||||
|
|
||||||
;; definition for function matrix-transpose!
|
;; definition for function matrix-transpose!
|
||||||
;; INFO: Used lq/sq
|
;; INFO: Used lq/sq
|
||||||
;; WARN: Function may read a register that is not set: f31
|
|
||||||
(defun matrix-transpose! ((arg0 matrix) (arg1 matrix))
|
(defun matrix-transpose! ((arg0 matrix) (arg1 matrix))
|
||||||
(local-vars
|
(local-vars (v1-0 uint128) (v1-1 uint128) (v1-2 uint128) (a1-1 uint128) (a2-1 uint128) (t0-1 uint128))
|
||||||
(r0-0 int)
|
|
||||||
(r0-1 int)
|
|
||||||
(r0-2 int)
|
|
||||||
(r0-3 int)
|
|
||||||
(v1-0 uint128)
|
|
||||||
(v1-1 uint128)
|
|
||||||
(v1-2 uint128)
|
|
||||||
(a1-1 uint128)
|
|
||||||
(a2-1 uint128)
|
|
||||||
(t0-1 uint128)
|
|
||||||
(f31-0 none)
|
|
||||||
)
|
|
||||||
(nop!)
|
(nop!)
|
||||||
(nop!)
|
(nop!)
|
||||||
(let ((t0-0 (-> arg1 vector 0 quad)))
|
(let ((t0-0 (-> arg1 vector 0 quad)))
|
||||||
|
@ -253,17 +240,17 @@
|
||||||
(.pextlw v1-0 t1-0 t0-0)
|
(.pextlw v1-0 t1-0 t0-0)
|
||||||
(let ((a3-0 (-> arg1 trans quad)))
|
(let ((a3-0 (-> arg1 trans quad)))
|
||||||
(.pextuw a1-1 t1-0 t0-0)
|
(.pextuw a1-1 t1-0 t0-0)
|
||||||
(.mov r0-0 f31-0)
|
(nop!)
|
||||||
(.pextlw t0-1 a3-0 a2-0)
|
(.pextlw t0-1 a3-0 a2-0)
|
||||||
(.mov r0-1 f31-0)
|
(nop!)
|
||||||
(.pextuw a2-1 a3-0 a2-0)
|
(.pextuw a2-1 a3-0 a2-0)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(.mov r0-2 f31-0)
|
(nop!)
|
||||||
(let ((a3-1 (make-u128 t0-1 v1-0)))
|
(let ((a3-1 (make-u128 t0-1 v1-0)))
|
||||||
(.mov r0-3 f31-0)
|
(nop!)
|
||||||
(.pcpyud v1-1 v1-0 t0-1)
|
(.pcpyud v1-1 v1-0 t0-1)
|
||||||
(set! (-> arg0 vector 0 quad) (the-as uint128 a3-1))
|
(set! (-> arg0 vector 0 quad) (the-as uint128 a3-1))
|
||||||
)
|
)
|
||||||
|
@ -786,21 +773,10 @@
|
||||||
;; definition for function matrix-axis-sin-cos-vu!
|
;; definition for function matrix-axis-sin-cos-vu!
|
||||||
;; INFO: Used lq/sq
|
;; INFO: Used lq/sq
|
||||||
;; WARN: Return type mismatch matrix vs none.
|
;; WARN: Return type mismatch matrix vs none.
|
||||||
;; WARN: Function may read a register that is not set: f31
|
|
||||||
;; ERROR: Unsupported inline assembly instruction kind - [prot3w a1, v1]
|
;; ERROR: Unsupported inline assembly instruction kind - [prot3w a1, v1]
|
||||||
;; ERROR: Unsupported inline assembly instruction kind - [prot3w a2, a1]
|
;; ERROR: Unsupported inline assembly instruction kind - [prot3w a2, a1]
|
||||||
(defun matrix-axis-sin-cos-vu! ((arg0 matrix) (arg1 vector) (arg2 float) (arg3 float))
|
(defun matrix-axis-sin-cos-vu! ((arg0 matrix) (arg1 vector) (arg2 float) (arg3 float))
|
||||||
(local-vars
|
(local-vars (a1-2 uint128) (a2-1 uint128) (a3-1 uint128) (a3-2 uint128))
|
||||||
(r0-0 int)
|
|
||||||
(r0-1 int)
|
|
||||||
(r0-2 int)
|
|
||||||
(r0-3 int)
|
|
||||||
(a1-2 uint128)
|
|
||||||
(a2-1 uint128)
|
|
||||||
(a3-1 uint128)
|
|
||||||
(a3-2 uint128)
|
|
||||||
(f31-0 none)
|
|
||||||
)
|
|
||||||
(rlet ((vf0 :class vf)
|
(rlet ((vf0 :class vf)
|
||||||
(vf1 :class vf)
|
(vf1 :class vf)
|
||||||
(vf10 :class vf)
|
(vf10 :class vf)
|
||||||
|
@ -822,9 +798,9 @@
|
||||||
)
|
)
|
||||||
(.mov vf6 arg3)
|
(.mov vf6 arg3)
|
||||||
(.pceqw a3-1 v1-0 0)
|
(.pceqw a3-1 v1-0 0)
|
||||||
(.mov r0-0 f31-0)
|
(nop!)
|
||||||
(.ppach a3-2 (the-as uint128 0) a3-1)
|
(.ppach a3-2 (the-as uint128 0) a3-1)
|
||||||
(.mov r0-1 f31-0)
|
(nop!)
|
||||||
(nop!)
|
(nop!)
|
||||||
(.mov vf1 v1-0)
|
(.mov vf1 v1-0)
|
||||||
(let ((v1-1 (logior a3-2 a1-1)))
|
(let ((v1-1 (logior a3-2 a1-1)))
|
||||||
|
@ -888,9 +864,9 @@
|
||||||
(let ((v1-3 #x3f800000))
|
(let ((v1-3 #x3f800000))
|
||||||
(.svf (&-> arg0 trans quad) vf0)
|
(.svf (&-> arg0 trans quad) vf0)
|
||||||
(let ((v1-4 (the-as uint128 (make-u128 0 v1-3))))
|
(let ((v1-4 (the-as uint128 (make-u128 0 v1-3))))
|
||||||
(.mov r0-2 f31-0)
|
(nop!)
|
||||||
(.prot3w a1-2 (the-as uint v1-4))
|
(.prot3w a1-2 (the-as uint v1-4))
|
||||||
(.mov r0-3 f31-0)
|
(nop!)
|
||||||
(.prot3w a2-1 (the-as int a1-2))
|
(.prot3w a2-1 (the-as int a1-2))
|
||||||
(set! (-> arg0 vector 0 quad) v1-4)
|
(set! (-> arg0 vector 0 quad) v1-4)
|
||||||
)
|
)
|
||||||
|
@ -906,21 +882,10 @@
|
||||||
|
|
||||||
;; definition for function matrix-axis-sin-cos!
|
;; definition for function matrix-axis-sin-cos!
|
||||||
;; INFO: Used lq/sq
|
;; INFO: Used lq/sq
|
||||||
;; WARN: Function may read a register that is not set: f31
|
|
||||||
;; ERROR: Unsupported inline assembly instruction kind - [prot3w a0, v1]
|
;; ERROR: Unsupported inline assembly instruction kind - [prot3w a0, v1]
|
||||||
;; ERROR: Unsupported inline assembly instruction kind - [prot3w a1, a0]
|
;; ERROR: Unsupported inline assembly instruction kind - [prot3w a1, a0]
|
||||||
(defun matrix-axis-sin-cos! ((arg0 matrix) (arg1 vector) (arg2 float) (arg3 float))
|
(defun matrix-axis-sin-cos! ((arg0 matrix) (arg1 vector) (arg2 float) (arg3 float))
|
||||||
(local-vars
|
(local-vars (a0-4 uint128) (a1-2 uint128) (a1-3 uint128) (a1-4 uint128))
|
||||||
(r0-0 int)
|
|
||||||
(r0-1 int)
|
|
||||||
(r0-2 int)
|
|
||||||
(r0-3 int)
|
|
||||||
(a0-4 uint128)
|
|
||||||
(a1-2 uint128)
|
|
||||||
(a1-3 uint128)
|
|
||||||
(a1-4 uint128)
|
|
||||||
(f31-0 none)
|
|
||||||
)
|
|
||||||
(rlet ((vf0 :class vf)
|
(rlet ((vf0 :class vf)
|
||||||
(vf1 :class vf)
|
(vf1 :class vf)
|
||||||
(vf10 :class vf)
|
(vf10 :class vf)
|
||||||
|
@ -949,9 +914,9 @@
|
||||||
(.mov vf6 a1-1)
|
(.mov vf6 a1-1)
|
||||||
)
|
)
|
||||||
(.pceqw a1-2 v1-1 0)
|
(.pceqw a1-2 v1-1 0)
|
||||||
(.mov r0-0 f31-0)
|
(nop!)
|
||||||
(.ppach a1-3 (the-as uint128 0) a1-2)
|
(.ppach a1-3 (the-as uint128 0) a1-2)
|
||||||
(.mov r0-1 f31-0)
|
(nop!)
|
||||||
(nop!)
|
(nop!)
|
||||||
(.mov vf1 v1-1)
|
(.mov vf1 v1-1)
|
||||||
(let ((v1-2 (logior a1-3 a0-2)))
|
(let ((v1-2 (logior a1-3 a0-2)))
|
||||||
|
@ -1018,9 +983,9 @@
|
||||||
(let ((v1-4 #x3f800000))
|
(let ((v1-4 #x3f800000))
|
||||||
(.svf (&-> v0-0 trans quad) vf0)
|
(.svf (&-> v0-0 trans quad) vf0)
|
||||||
(let ((v1-5 (the-as uint128 (make-u128 0 v1-4))))
|
(let ((v1-5 (the-as uint128 (make-u128 0 v1-4))))
|
||||||
(.mov r0-2 f31-0)
|
(nop!)
|
||||||
(.prot3w a0-4 (the-as uint v1-5))
|
(.prot3w a0-4 (the-as uint v1-5))
|
||||||
(.mov r0-3 f31-0)
|
(nop!)
|
||||||
(.prot3w a1-4 (the-as int a0-4))
|
(.prot3w a1-4 (the-as int a0-4))
|
||||||
(set! (-> v0-0 vector 0 quad) v1-5)
|
(set! (-> v0-0 vector 0 quad) v1-5)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue