Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: src/ppc/macro-assembler-ppc.cc

Issue 2660873003: PPC: Work-around to preserve sNan bit (Closed)
Patch Set: addressed comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/ppc/code-generator-ppc.cc ('k') | src/ppc/simulator-ppc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <assert.h> // For assert 5 #include <assert.h> // For assert
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_PPC 8 #if V8_TARGET_ARCH_PPC
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 3663 matching lines...) Expand 10 before | Expand all | Expand 10 after
3674 subi(sp, sp, Operand(kFloatSize)); 3674 subi(sp, sp, Operand(kFloatSize));
3675 stw(src, MemOperand(sp, 0)); 3675 stw(src, MemOperand(sp, 0));
3676 nop(GROUP_ENDING_NOP); // LHS/RAW optimization 3676 nop(GROUP_ENDING_NOP); // LHS/RAW optimization
3677 lfs(dst, MemOperand(sp, 0)); 3677 lfs(dst, MemOperand(sp, 0));
3678 addi(sp, sp, Operand(kFloatSize)); 3678 addi(sp, sp, Operand(kFloatSize));
3679 } 3679 }
3680 3680
3681 3681
3682 void MacroAssembler::MovFloatToInt(Register dst, DoubleRegister src) { 3682 void MacroAssembler::MovFloatToInt(Register dst, DoubleRegister src) {
3683 subi(sp, sp, Operand(kFloatSize)); 3683 subi(sp, sp, Operand(kFloatSize));
3684 frsp(src, src);
3685 stfs(src, MemOperand(sp, 0)); 3684 stfs(src, MemOperand(sp, 0));
3686 nop(GROUP_ENDING_NOP); // LHS/RAW optimization 3685 nop(GROUP_ENDING_NOP); // LHS/RAW optimization
3687 lwz(dst, MemOperand(sp, 0)); 3686 lwz(dst, MemOperand(sp, 0));
3688 addi(sp, sp, Operand(kFloatSize)); 3687 addi(sp, sp, Operand(kFloatSize));
3689 } 3688 }
3690 3689
3691 3690
3692 void MacroAssembler::Add(Register dst, Register src, intptr_t value, 3691 void MacroAssembler::Add(Register dst, Register src, intptr_t value,
3693 Register scratch) { 3692 Register scratch) {
3694 if (is_int16(value)) { 3693 if (is_int16(value)) {
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
4395 } 4394 }
4396 if (mag.shift > 0) srawi(result, result, mag.shift); 4395 if (mag.shift > 0) srawi(result, result, mag.shift);
4397 ExtractBit(r0, dividend, 31); 4396 ExtractBit(r0, dividend, 31);
4398 add(result, result, r0); 4397 add(result, result, r0);
4399 } 4398 }
4400 4399
4401 } // namespace internal 4400 } // namespace internal
4402 } // namespace v8 4401 } // namespace v8
4403 4402
4404 #endif // V8_TARGET_ARCH_PPC 4403 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/compiler/ppc/code-generator-ppc.cc ('k') | src/ppc/simulator-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698