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

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 11412272: [v8-dev] ARM: Improve double to integer truncation on ARM. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years 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
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 4179 matching lines...) Expand 10 before | Expand all | Expand 10 after
4190 } else if (elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { 4190 } else if (elements_kind == EXTERNAL_DOUBLE_ELEMENTS) {
4191 __ sub(r5, r0, Operand(kHeapObjectTag)); 4191 __ sub(r5, r0, Operand(kHeapObjectTag));
4192 __ vldr(d0, r5, HeapNumber::kValueOffset); 4192 __ vldr(d0, r5, HeapNumber::kValueOffset);
4193 __ add(r5, r3, Operand(key, LSL, 2)); 4193 __ add(r5, r3, Operand(key, LSL, 2));
4194 __ vstr(d0, r5, 0); 4194 __ vstr(d0, r5, 0);
4195 } else { 4195 } else {
4196 // Hoisted load. vldr requires offset to be a multiple of 4 so we can 4196 // Hoisted load. vldr requires offset to be a multiple of 4 so we can
4197 // not include -kHeapObjectTag into it. 4197 // not include -kHeapObjectTag into it.
4198 __ sub(r5, value, Operand(kHeapObjectTag)); 4198 __ sub(r5, value, Operand(kHeapObjectTag));
4199 __ vldr(d0, r5, HeapNumber::kValueOffset); 4199 __ vldr(d0, r5, HeapNumber::kValueOffset);
4200 __ EmitECMATruncate(r5, d0, s2, r6, r7, r9); 4200 __ EmitECMATruncate(r5, d0, d1, r6, r7, r9);
4201 4201
4202 switch (elements_kind) { 4202 switch (elements_kind) {
4203 case EXTERNAL_BYTE_ELEMENTS: 4203 case EXTERNAL_BYTE_ELEMENTS:
4204 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: 4204 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
4205 __ strb(r5, MemOperand(r3, key, LSR, 1)); 4205 __ strb(r5, MemOperand(r3, key, LSR, 1));
4206 break; 4206 break;
4207 case EXTERNAL_SHORT_ELEMENTS: 4207 case EXTERNAL_SHORT_ELEMENTS:
4208 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: 4208 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
4209 __ strh(r5, MemOperand(r3, key, LSL, 0)); 4209 __ strh(r5, MemOperand(r3, key, LSL, 0));
4210 break; 4210 break;
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
4845 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4845 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4846 } 4846 }
4847 } 4847 }
4848 4848
4849 4849
4850 #undef __ 4850 #undef __
4851 4851
4852 } } // namespace v8::internal 4852 } } // namespace v8::internal
4853 4853
4854 #endif // V8_TARGET_ARCH_ARM 4854 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« src/arm/macro-assembler-arm.h ('K') | « src/arm/macro-assembler-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698