OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
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 4980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4991 __ ClampDoubleToUint8(result_reg, double_scratch0(), temp_reg); | 4991 __ ClampDoubleToUint8(result_reg, double_scratch0(), temp_reg); |
4992 __ jmp(&done); | 4992 __ jmp(&done); |
4993 | 4993 |
4994 __ bind(&is_smi); | 4994 __ bind(&is_smi); |
4995 __ ClampUint8(result_reg, scratch); | 4995 __ ClampUint8(result_reg, scratch); |
4996 | 4996 |
4997 __ bind(&done); | 4997 __ bind(&done); |
4998 } | 4998 } |
4999 | 4999 |
5000 | 5000 |
5001 void LCodeGen::DoDoubleBits(LDoubleBits* instr) { | |
5002 DoubleRegister value_reg = ToDoubleRegister(instr->value()); | |
5003 Register result_reg = ToRegister(instr->result()); | |
5004 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) { | |
5005 __ FmoveHigh(result_reg, value_reg); | |
5006 } else { | |
5007 __ FmoveLow(result_reg, value_reg); | |
5008 } | |
5009 } | |
5010 | |
5011 | |
5012 void LCodeGen::DoAllocate(LAllocate* instr) { | 5001 void LCodeGen::DoAllocate(LAllocate* instr) { |
5013 class DeferredAllocate final : public LDeferredCode { | 5002 class DeferredAllocate final : public LDeferredCode { |
5014 public: | 5003 public: |
5015 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) | 5004 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) |
5016 : LDeferredCode(codegen), instr_(instr) { } | 5005 : LDeferredCode(codegen), instr_(instr) { } |
5017 void Generate() override { codegen()->DoDeferredAllocate(instr_); } | 5006 void Generate() override { codegen()->DoDeferredAllocate(instr_); } |
5018 LInstruction* instr() override { return instr_; } | 5007 LInstruction* instr() override { return instr_; } |
5019 | 5008 |
5020 private: | 5009 private: |
5021 LAllocate* instr_; | 5010 LAllocate* instr_; |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5541 __ lw(result, FieldMemOperand(scratch, | 5530 __ lw(result, FieldMemOperand(scratch, |
5542 FixedArray::kHeaderSize - kPointerSize)); | 5531 FixedArray::kHeaderSize - kPointerSize)); |
5543 __ bind(deferred->exit()); | 5532 __ bind(deferred->exit()); |
5544 __ bind(&done); | 5533 __ bind(&done); |
5545 } | 5534 } |
5546 | 5535 |
5547 #undef __ | 5536 #undef __ |
5548 | 5537 |
5549 } // namespace internal | 5538 } // namespace internal |
5550 } // namespace v8 | 5539 } // namespace v8 |
OLD | NEW |