From 5c10d1cdaa1c2a6c88bf0ad1e3f182e331737943 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Thu, 14 May 2015 18:02:26 -0500 Subject: [PATCH 1/2] Tests: fadd/fmul --- src/xenia/cpu/frontend/test/instr_fadd.s | 20 ++++++++++++++++++++ src/xenia/cpu/frontend/test/instr_fmul.s | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 src/xenia/cpu/frontend/test/instr_fadd.s create mode 100644 src/xenia/cpu/frontend/test/instr_fmul.s diff --git a/src/xenia/cpu/frontend/test/instr_fadd.s b/src/xenia/cpu/frontend/test/instr_fadd.s new file mode 100644 index 000000000..71e116e75 --- /dev/null +++ b/src/xenia/cpu/frontend/test/instr_fadd.s @@ -0,0 +1,20 @@ +test_fadd_1: + #_ REGISTER_IN f1 1.0 + #_ REGISTER_IN f2 2.0 + fadd f3, f1, f2 + blr + #_ REGISTER_OUT f3 3.0 + +test_fadd_2: + #_ REGISTER_IN f1 0.0 + #_ REGISTER_IN f2 0.0 + fadd f3, f1, f2 + blr + #_ REGISTER_OUT f3 0.0 + +test_fadd_3: + #_ REGISTER_IN f1 -200.0 + #_ REGISTER_IN f2 200.0 + fadd f3, f1, f2 + blr + #_ REGISTER_OUT f3 0.0 diff --git a/src/xenia/cpu/frontend/test/instr_fmul.s b/src/xenia/cpu/frontend/test/instr_fmul.s new file mode 100644 index 000000000..69a6bf181 --- /dev/null +++ b/src/xenia/cpu/frontend/test/instr_fmul.s @@ -0,0 +1,20 @@ +test_fmul_1: + #_ REGISTER_IN f1 5.0 + #_ REGISTER_IN f2 5.0 + fmul f3, f1, f2 + blr + #_ REGISTER_OUT f3 25.0 + +test_fmul_2: + #_ REGISTER_IN f1 5.0 + #_ REGISTER_IN f2 0.0 + fmul f3, f1, f2 + blr + #_ REGISTER_OUT f3 0.0 + +test_fmul_3: + #_ REGISTER_IN f1 -2.0 + #_ REGISTER_IN f2 2.0 + fmul f3, f1, f2 + blr + #_ REGISTER_OUT f3 -4.0 From 88e3ef988494ecf77378a91e75f19cd8a68d718b Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Thu, 14 May 2015 18:06:40 -0500 Subject: [PATCH 2/2] fmadd test --- src/xenia/cpu/frontend/test/instr_fmadd.s | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/xenia/cpu/frontend/test/instr_fmadd.s diff --git a/src/xenia/cpu/frontend/test/instr_fmadd.s b/src/xenia/cpu/frontend/test/instr_fmadd.s new file mode 100644 index 000000000..217a793bc --- /dev/null +++ b/src/xenia/cpu/frontend/test/instr_fmadd.s @@ -0,0 +1,29 @@ +test_fmadd_1: + #_ REGISTER_IN f1 0.0 + #_ REGISTER_IN f2 5.0 + #_ REGISTER_IN f3 5.0 + #_ REGISTER_IN f4 0.0 + fmadd f1, f2, f3, f4 + blr + #_ REGISTER_OUT f1 25.0 + #_ REGISTER_OUT f2 5.0 + #_ REGISTER_OUT f3 5.0 + #_ REGISTER_OUT f4 0.0 + +test_fmadd_2: + #_ REGISTER_IN f1 0.0 + #_ REGISTER_IN f2 5.0 + #_ REGISTER_IN f3 0.0 + #_ REGISTER_IN f4 15.0 + fmadd f1, f2, f3, f4 + blr + #_ REGISTER_OUT f1 15.0 + +test_fmadd_3: + #_ REGISTER_IN f1 0.0 + #_ REGISTER_IN f2 5.0 + #_ REGISTER_IN f3 5.0 + #_ REGISTER_IN f4 15.0 + fmadd f1, f2, f3, f4 + blr + #_ REGISTER_OUT f1 40.0