[Pkg-mono-svn-commits] [mono] 03/04: Fix atomic_add_i4 support for 32-bit PPC.
Jo Shields
directhex at moszumanska.debian.org
Mon Sep 7 09:16:47 UTC 2015
This is an automated email from the git hooks/post-receive script.
directhex pushed a commit to branch master-patches/ppc_big_endian_fixes
in repository mono.
commit c81f65f32d6e9a6506c74393839b6ba0ace5a235
Author: Alex Rønne Petersen <alexrp at xamarin.com>
Date: Mon Aug 3 17:32:31 2015 +0200
Fix atomic_add_i4 support for 32-bit PPC.
(cherry picked from commit 8f379f0c8f98493180b508b9e68b9aa76c0c5bdf)
---
mono/mini/mini-ppc.c | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/mono/mini/mini-ppc.c b/mono/mini/mini-ppc.c
index 46c37c5..8748c93 100644
--- a/mono/mini/mini-ppc.c
+++ b/mono/mini/mini-ppc.c
@@ -4427,6 +4427,22 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
else
ppc_mr (code, ins->dreg, ins->sreg1);
break;
+#else
+ case OP_ICONV_TO_R4:
+ case OP_ICONV_TO_R8: {
+ if (cpu_hw_caps & PPC_ISA_64) {
+ ppc_srawi(code, ppc_r0, ins->sreg1, 31);
+ ppc_stw (code, ppc_r0, -8, ppc_r1);
+ ppc_stw (code, ins->sreg1, -4, ppc_r1);
+ ppc_lfd (code, ins->dreg, -8, ppc_r1);
+ ppc_fcfid (code, ins->dreg, ins->dreg);
+ if (ins->opcode == OP_ICONV_TO_R4)
+ ppc_frsp (code, ins->dreg, ins->dreg);
+ }
+ break;
+ }
+#endif
+
case OP_ATOMIC_ADD_I4:
CASE_PPC64 (OP_ATOMIC_ADD_I8) {
int location = ins->inst_basereg;
@@ -4460,21 +4476,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
ppc_mr (code, ins->dreg, ppc_r0);
break;
}
-#else
- case OP_ICONV_TO_R4:
- case OP_ICONV_TO_R8: {
- if (cpu_hw_caps & PPC_ISA_64) {
- ppc_srawi(code, ppc_r0, ins->sreg1, 31);
- ppc_stw (code, ppc_r0, -8, ppc_r1);
- ppc_stw (code, ins->sreg1, -4, ppc_r1);
- ppc_lfd (code, ins->dreg, -8, ppc_r1);
- ppc_fcfid (code, ins->dreg, ins->dreg);
- if (ins->opcode == OP_ICONV_TO_R4)
- ppc_frsp (code, ins->dreg, ins->dreg);
- }
- break;
- }
-#endif
case OP_ATOMIC_CAS_I4:
CASE_PPC64 (OP_ATOMIC_CAS_I8) {
int location = ins->sreg1;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mono/packages/mono.git
More information about the Pkg-mono-svn-commits
mailing list