|
From: Carl L. <ca...@so...> - 2021-09-13 16:40:28
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=093bef43d69236287ccc748591c9560a71181b0a commit 093bef43d69236287ccc748591c9560a71181b0a Author: Carl Love <ce...@us...> Date: Fri Sep 10 17:15:57 2021 -0500 Remove deprecated regression tests for mftgpr and mffgpr. The mftgpr and mffgpr instructions are deprecated. Added comments in VEX/priv/guest_ppc_toIR.c for the instructions stating the instructions are deprecated. Valgrind support can be removed if the opcodes get reused in the future. For now, leaving the functional support in Valgrind for the instructions. Removed the regression test power6_mf_gpr.c, expect files and vgtest file from none/tests/ppc64. Diff: --- VEX/priv/guest_ppc_toIR.c | 6 ++++ none/tests/ppc64/Makefile.am | 3 +- none/tests/ppc64/power6_mf_gpr.c | 47 ------------------------------- none/tests/ppc64/power6_mf_gpr.stderr.exp | 2 -- none/tests/ppc64/power6_mf_gpr.stdout.exp | 3 -- none/tests/ppc64/power6_mf_gpr.vgtest | 1 - 6 files changed, 7 insertions(+), 55 deletions(-) diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c index 57ac7bcf48..e30e431581 100644 --- a/VEX/priv/guest_ppc_toIR.c +++ b/VEX/priv/guest_ppc_toIR.c @@ -8401,6 +8401,9 @@ static Bool dis_int_logic ( UInt prefix, UInt theInstr ) break; case 0x2DF: { // mftgpr (move floating-point to general purpose register) + /* The mftgpr instruction was deprecated in Power 7, 2009 timeframe. + Leaving support in Valgrind for now (9/10/2021). Can remove the + mftgpr support in Valgrind if the opcode ever gets reused. */ IRTemp frB = newTemp(Ity_F64); DIP("mftgpr r%u,fr%u\n", rS_addr, rB_addr); @@ -8415,6 +8418,9 @@ static Bool dis_int_logic ( UInt prefix, UInt theInstr ) } case 0x25F: { // mffgpr (move floating-point from general purpose register) + /* The mffgpr instruction was deprecated in Power 7, 2009 timeframe. + Leaving support in Valgrind for now (9/10/2021). Can remove the + mftgpr support in Valgrind if the opcode ever gets reused. */ IRTemp frA = newTemp(Ity_F64); DIP("mffgpr fr%u,r%u\n", rS_addr, rB_addr); diff --git a/none/tests/ppc64/Makefile.am b/none/tests/ppc64/Makefile.am index df03dbec31..61b6ec9342 100644 --- a/none/tests/ppc64/Makefile.am +++ b/none/tests/ppc64/Makefile.am @@ -21,7 +21,6 @@ EXTRA_DIST = \ tw_td.stderr.exp tw_td.stdout.exp tw_td.vgtest \ opcodes.h \ power6_bcmp.stderr.exp power6_bcmp.stdout.exp power6_bcmp.vgtest \ - power6_mf_gpr.stderr.exp power6_mf_gpr.stdout.exp power6_mf_gpr.vgtest \ test_isa_2_06_part1.stderr.exp test_isa_2_06_part1.stdout.exp test_isa_2_06_part1.vgtest \ test_isa_2_06_part1.stdout.exp-LE \ test_isa_2_06_part2.stderr.exp test_isa_2_06_part2.stdout.exp test_isa_2_06_part2.vgtest \ @@ -75,7 +74,7 @@ check_PROGRAMS = \ test_isa_3_1_Misc test_isa_3_1_AT \ subnormal_test test_darn_inst test_copy_paste \ test_tm test_touch_tm data-cache-instructions \ - power6_mf_gpr std_reg_imm \ + std_reg_imm \ twi_tdi tw_td power6_bcmp scv_test # lmw, stmw, lswi, lswx, stswi, stswx compile (and run) only on big endian. diff --git a/none/tests/ppc64/power6_mf_gpr.c b/none/tests/ppc64/power6_mf_gpr.c deleted file mode 100644 index 6151a34784..0000000000 --- a/none/tests/ppc64/power6_mf_gpr.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 2007 IBM - - Author: Pete Eberlein ebe...@us... - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see <http://www.gnu.org/licenses/>. - - The GNU General Public License is contained in the file COPYING. -*/ - -#include <stdio.h> -#include <string.h> - - - -int main(int argc, char *argv[]) -{ - - long i; - double f; - - i = 0; - f = 100.0; - - printf("%lx %f\n", i, f); - - asm("mftgpr %0, %1\n": "=r"(i):"f"(f)); - - f = 0.0; - printf("%lx %f\n", i, f); - - asm("mffgpr %0, %1\n": "=f"(f):"r"(i)); - - printf("%lx %f\n", i, f); - - return 0; -} diff --git a/none/tests/ppc64/power6_mf_gpr.stderr.exp b/none/tests/ppc64/power6_mf_gpr.stderr.exp deleted file mode 100644 index 139597f9cb..0000000000 --- a/none/tests/ppc64/power6_mf_gpr.stderr.exp +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/none/tests/ppc64/power6_mf_gpr.stdout.exp b/none/tests/ppc64/power6_mf_gpr.stdout.exp deleted file mode 100644 index 7bc827dd22..0000000000 --- a/none/tests/ppc64/power6_mf_gpr.stdout.exp +++ /dev/null @@ -1,3 +0,0 @@ -0 100.000000 -4059000000000000 0.000000 -4059000000000000 100.000000 diff --git a/none/tests/ppc64/power6_mf_gpr.vgtest b/none/tests/ppc64/power6_mf_gpr.vgtest deleted file mode 100644 index 5868fe66ee..0000000000 --- a/none/tests/ppc64/power6_mf_gpr.vgtest +++ /dev/null @@ -1 +0,0 @@ -prog: power6_mf_gpr |
|
From: Peter B. <be...@li...> - 2021-10-05 21:25:36
|
On 9/13/21 11:40 AM, Carl Love wrote:
> Remove deprecated regression tests for mftgpr and mffgpr.
[snip]
> case 0x2DF: { // mftgpr (move floating-point to general purpose register)
> + /* The mftgpr instruction was deprecated in Power 7, 2009 timeframe.
> + Leaving support in Valgrind for now (9/10/2021). Can remove the
> + mftgpr support in Valgrind if the opcode ever gets reused. */
To be pedantic, the mffgpr and mftgpr instructions never made it "officially"
into any cpu. They were planned to be available in POWER6 but were yanked
at the last minute and a supported POWER6 (ie, AT_PLATFORM=power6) will
give you a SIGILL if you execute it. They are available when you boot your
POWER6 system in RAW mode (ie, AT_PLATFORM=power6x), then they will work.
Since RAW mode is unsupported, I think we can treat these instructions as
never really ever being implemented.
Peter
|