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

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

Issue 26236004: Rollback of r17108, r17106, r17104 in trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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/ia32/lithium-codegen-ia32.h ('k') | src/ia32/macro-assembler-ia32.h » ('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 2258 matching lines...) Expand 10 before | Expand all | Expand 10 after
2269 __ fmul_i(1); 2269 __ fmul_i(1);
2270 break; 2270 break;
2271 case Token::DIV: 2271 case Token::DIV:
2272 __ fdiv_i(1); 2272 __ fdiv_i(1);
2273 break; 2273 break;
2274 case Token::MOD: { 2274 case Token::MOD: {
2275 // Pass two doubles as arguments on the stack. 2275 // Pass two doubles as arguments on the stack.
2276 __ PrepareCallCFunction(4, eax); 2276 __ PrepareCallCFunction(4, eax);
2277 X87Mov(Operand(esp, 1 * kDoubleSize), right); 2277 X87Mov(Operand(esp, 1 * kDoubleSize), right);
2278 X87Mov(Operand(esp, 0), left); 2278 X87Mov(Operand(esp, 0), left);
2279 X87Free(right);
2280 ASSERT(left.is(result));
2281 X87PrepareToWrite(result); 2279 X87PrepareToWrite(result);
2282 __ CallCFunction( 2280 __ CallCFunction(
2283 ExternalReference::double_fp_operation(Token::MOD, isolate()), 2281 ExternalReference::double_fp_operation(Token::MOD, isolate()),
2284 4); 2282 4);
2285 2283
2286 // Return value is in st(0) on ia32. 2284 // Return value is in st(0) on ia32.
2287 X87CommitWrite(result); 2285 X87CommitWrite(result);
2288 break; 2286 break;
2289 } 2287 }
2290 default: 2288 default:
(...skipping 2720 matching lines...) Expand 10 before | Expand all | Expand 10 after
5011 Register input = ToRegister(instr->value()); 5009 Register input = ToRegister(instr->value());
5012 __ SmiTag(input); 5010 __ SmiTag(input);
5013 if (!instr->hydrogen()->value()->HasRange() || 5011 if (!instr->hydrogen()->value()->HasRange() ||
5014 !instr->hydrogen()->value()->range()->IsInSmiRange()) { 5012 !instr->hydrogen()->value()->range()->IsInSmiRange()) {
5015 DeoptimizeIf(overflow, instr->environment()); 5013 DeoptimizeIf(overflow, instr->environment());
5016 } 5014 }
5017 } 5015 }
5018 5016
5019 5017
5020 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { 5018 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) {
5019 CpuFeatureScope scope(masm(), SSE2);
5021 LOperand* input = instr->value(); 5020 LOperand* input = instr->value();
5022 LOperand* output = instr->result(); 5021 LOperand* output = instr->result();
5023 if (CpuFeatures::IsSupported(SSE2)) { 5022 LOperand* temp = instr->temp();
5024 CpuFeatureScope scope(masm(), SSE2);
5025 LOperand* temp = instr->temp();
5026 5023
5027 __ LoadUint32(ToDoubleRegister(output), 5024 __ LoadUint32(ToDoubleRegister(output),
5028 ToRegister(input), 5025 ToRegister(input),
5029 ToDoubleRegister(temp)); 5026 ToDoubleRegister(temp));
5030 } else {
5031 X87Register res = ToX87Register(output);
5032 X87PrepareToWrite(res);
5033 __ LoadUint32NoSSE2(ToRegister(input));
5034 X87CommitWrite(res);
5035 }
5036 } 5027 }
5037 5028
5038 5029
5039 void LCodeGen::DoNumberTagI(LNumberTagI* instr) { 5030 void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
5040 class DeferredNumberTagI V8_FINAL : public LDeferredCode { 5031 class DeferredNumberTagI V8_FINAL : public LDeferredCode {
5041 public: 5032 public:
5042 DeferredNumberTagI(LCodeGen* codegen, 5033 DeferredNumberTagI(LCodeGen* codegen,
5043 LNumberTagI* instr, 5034 LNumberTagI* instr,
5044 const X87Stack& x87_stack) 5035 const X87Stack& x87_stack)
5045 : LDeferredCode(codegen, x87_stack), instr_(instr) { } 5036 : LDeferredCode(codegen, x87_stack), instr_(instr) { }
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
6391 FixedArray::kHeaderSize - kPointerSize)); 6382 FixedArray::kHeaderSize - kPointerSize));
6392 __ bind(&done); 6383 __ bind(&done);
6393 } 6384 }
6394 6385
6395 6386
6396 #undef __ 6387 #undef __
6397 6388
6398 } } // namespace v8::internal 6389 } } // namespace v8::internal
6399 6390
6400 #endif // V8_TARGET_ARCH_IA32 6391 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.h ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698