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

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

Issue 178583006: Introduce intrinsics for double values in Javascript. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: test Created 6 years, 9 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 | « src/arm/lithium-arm.cc ('k') | src/full-codegen.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 5212 matching lines...) Expand 10 before | Expand all | Expand 10 after
5223 __ jmp(&done); 5223 __ jmp(&done);
5224 5224
5225 // smi 5225 // smi
5226 __ bind(&is_smi); 5226 __ bind(&is_smi);
5227 __ ClampUint8(result_reg, result_reg); 5227 __ ClampUint8(result_reg, result_reg);
5228 5228
5229 __ bind(&done); 5229 __ bind(&done);
5230 } 5230 }
5231 5231
5232 5232
5233 void LCodeGen::DoDoubleBits(LDoubleBits* instr) {
5234 DwVfpRegister value_reg = ToDoubleRegister(instr->value());
5235 Register result_reg = ToRegister(instr->result());
5236 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) {
5237 __ VmovHigh(result_reg, value_reg);
5238 } else {
5239 __ VmovLow(result_reg, value_reg);
5240 }
5241 }
5242
5243
5244 void LCodeGen::DoConstructDouble(LConstructDouble* instr) {
5245 Register hi_reg = ToRegister(instr->hi());
5246 Register lo_reg = ToRegister(instr->lo());
5247 DwVfpRegister result_reg = ToDoubleRegister(instr->result());
5248 __ VmovHigh(result_reg, hi_reg);
5249 __ VmovLow(result_reg, lo_reg);
5250 }
5251
5252
5233 void LCodeGen::DoAllocate(LAllocate* instr) { 5253 void LCodeGen::DoAllocate(LAllocate* instr) {
5234 class DeferredAllocate V8_FINAL : public LDeferredCode { 5254 class DeferredAllocate V8_FINAL : public LDeferredCode {
5235 public: 5255 public:
5236 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) 5256 DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
5237 : LDeferredCode(codegen), instr_(instr) { } 5257 : LDeferredCode(codegen), instr_(instr) { }
5238 virtual void Generate() V8_OVERRIDE { 5258 virtual void Generate() V8_OVERRIDE {
5239 codegen()->DoDeferredAllocate(instr_); 5259 codegen()->DoDeferredAllocate(instr_);
5240 } 5260 }
5241 virtual LInstruction* instr() V8_OVERRIDE { return instr_; } 5261 virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
5242 private: 5262 private:
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
5760 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5780 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5761 __ ldr(result, FieldMemOperand(scratch, 5781 __ ldr(result, FieldMemOperand(scratch,
5762 FixedArray::kHeaderSize - kPointerSize)); 5782 FixedArray::kHeaderSize - kPointerSize));
5763 __ bind(&done); 5783 __ bind(&done);
5764 } 5784 }
5765 5785
5766 5786
5767 #undef __ 5787 #undef __
5768 5788
5769 } } // namespace v8::internal 5789 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698