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

Side by Side Diff: src/mips/lithium-codegen-mips.cc

Issue 17569018: Merged r15303 into 3.18 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.18
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/version.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3461 matching lines...) Expand 10 before | Expand all | Expand 10 after
3472 } 3472 }
3473 3473
3474 3474
3475 void LCodeGen::EmitIntegerMathAbs(LMathAbs* instr) { 3475 void LCodeGen::EmitIntegerMathAbs(LMathAbs* instr) {
3476 Register input = ToRegister(instr->value()); 3476 Register input = ToRegister(instr->value());
3477 Register result = ToRegister(instr->result()); 3477 Register result = ToRegister(instr->result());
3478 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_); 3478 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_);
3479 Label done; 3479 Label done;
3480 __ Branch(USE_DELAY_SLOT, &done, ge, input, Operand(zero_reg)); 3480 __ Branch(USE_DELAY_SLOT, &done, ge, input, Operand(zero_reg));
3481 __ mov(result, input); 3481 __ mov(result, input);
3482 __ subu(result, zero_reg, input);
3482 // Overflow if result is still negative, i.e. 0x80000000. 3483 // Overflow if result is still negative, i.e. 0x80000000.
3483 DeoptimizeIf(lt, instr->environment(), result, Operand(zero_reg)); 3484 DeoptimizeIf(lt, instr->environment(), result, Operand(zero_reg));
3484 __ bind(&done); 3485 __ bind(&done);
3485 } 3486 }
3486 3487
3487 3488
3488 void LCodeGen::DoMathAbs(LMathAbs* instr) { 3489 void LCodeGen::DoMathAbs(LMathAbs* instr) {
3489 // Class for deferred case. 3490 // Class for deferred case.
3490 class DeferredMathAbsTaggedHeapNumber: public LDeferredCode { 3491 class DeferredMathAbsTaggedHeapNumber: public LDeferredCode {
3491 public: 3492 public:
(...skipping 2293 matching lines...) Expand 10 before | Expand all | Expand 10 after
5785 __ Subu(scratch, result, scratch); 5786 __ Subu(scratch, result, scratch);
5786 __ lw(result, FieldMemOperand(scratch, 5787 __ lw(result, FieldMemOperand(scratch,
5787 FixedArray::kHeaderSize - kPointerSize)); 5788 FixedArray::kHeaderSize - kPointerSize));
5788 __ bind(&done); 5789 __ bind(&done);
5789 } 5790 }
5790 5791
5791 5792
5792 #undef __ 5793 #undef __
5793 5794
5794 } } // namespace v8::internal 5795 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698