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

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

Issue 13928006: Remove SSE2 feature checks from x64 code (it is always on) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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/x64/assembler-x64.cc ('k') | no next file » | 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 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 // store the registers in any particular way, but we do have to store and 892 // store the registers in any particular way, but we do have to store and
893 // restore them. 893 // restore them.
894 for (int i = 0; i < kNumberOfSavedRegs; i++) { 894 for (int i = 0; i < kNumberOfSavedRegs; i++) {
895 Register reg = saved_regs[i]; 895 Register reg = saved_regs[i];
896 if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) { 896 if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) {
897 push(reg); 897 push(reg);
898 } 898 }
899 } 899 }
900 // R12 to r15 are callee save on all platforms. 900 // R12 to r15 are callee save on all platforms.
901 if (fp_mode == kSaveFPRegs) { 901 if (fp_mode == kSaveFPRegs) {
902 CpuFeatureScope scope(this, SSE2);
903 subq(rsp, Immediate(kDoubleSize * XMMRegister::kMaxNumRegisters)); 902 subq(rsp, Immediate(kDoubleSize * XMMRegister::kMaxNumRegisters));
904 for (int i = 0; i < XMMRegister::kMaxNumRegisters; i++) { 903 for (int i = 0; i < XMMRegister::kMaxNumRegisters; i++) {
905 XMMRegister reg = XMMRegister::from_code(i); 904 XMMRegister reg = XMMRegister::from_code(i);
906 movsd(Operand(rsp, i * kDoubleSize), reg); 905 movsd(Operand(rsp, i * kDoubleSize), reg);
907 } 906 }
908 } 907 }
909 } 908 }
910 909
911 910
912 void MacroAssembler::PopCallerSaved(SaveFPRegsMode fp_mode, 911 void MacroAssembler::PopCallerSaved(SaveFPRegsMode fp_mode,
913 Register exclusion1, 912 Register exclusion1,
914 Register exclusion2, 913 Register exclusion2,
915 Register exclusion3) { 914 Register exclusion3) {
916 if (fp_mode == kSaveFPRegs) { 915 if (fp_mode == kSaveFPRegs) {
917 CpuFeatureScope scope(this, SSE2);
918 for (int i = 0; i < XMMRegister::kMaxNumRegisters; i++) { 916 for (int i = 0; i < XMMRegister::kMaxNumRegisters; i++) {
919 XMMRegister reg = XMMRegister::from_code(i); 917 XMMRegister reg = XMMRegister::from_code(i);
920 movsd(reg, Operand(rsp, i * kDoubleSize)); 918 movsd(reg, Operand(rsp, i * kDoubleSize));
921 } 919 }
922 addq(rsp, Immediate(kDoubleSize * XMMRegister::kMaxNumRegisters)); 920 addq(rsp, Immediate(kDoubleSize * XMMRegister::kMaxNumRegisters));
923 } 921 }
924 for (int i = kNumberOfSavedRegs - 1; i >= 0; i--) { 922 for (int i = kNumberOfSavedRegs - 1; i >= 0; i--) {
925 Register reg = saved_regs[i]; 923 Register reg = saved_regs[i];
926 if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) { 924 if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) {
927 pop(reg); 925 pop(reg);
(...skipping 3705 matching lines...) Expand 10 before | Expand all | Expand 10 after
4633 j(greater, &no_info_available); 4631 j(greater, &no_info_available);
4634 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), 4632 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize),
4635 Heap::kAllocationSiteInfoMapRootIndex); 4633 Heap::kAllocationSiteInfoMapRootIndex);
4636 bind(&no_info_available); 4634 bind(&no_info_available);
4637 } 4635 }
4638 4636
4639 4637
4640 } } // namespace v8::internal 4638 } } // namespace v8::internal
4641 4639
4642 #endif // V8_TARGET_ARCH_X64 4640 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698