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

Side by Side Diff: src/mips/codegen-mips.cc

Issue 9690010: Ensure consistency of Math.sqrt on Intel platforms. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed suggestions. Created 8 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
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 19 matching lines...) Expand all
30 #if defined(V8_TARGET_ARCH_MIPS) 30 #if defined(V8_TARGET_ARCH_MIPS)
31 31
32 #include "codegen.h" 32 #include "codegen.h"
33 #include "macro-assembler.h" 33 #include "macro-assembler.h"
34 34
35 namespace v8 { 35 namespace v8 {
36 namespace internal { 36 namespace internal {
37 37
38 #define __ ACCESS_MASM(masm) 38 #define __ ACCESS_MASM(masm)
39 39
40 TranscendentalFunction CreateTranscendentalFunction( 40 UnaryMathFunction CreateTranscendentalFunction(TranscendentalCache::Type type) {
41 TranscendentalCache::Type type) {
42 switch (type) { 41 switch (type) {
43 case TranscendentalCache::SIN: return &sin; 42 case TranscendentalCache::SIN: return &sin;
44 case TranscendentalCache::COS: return &cos; 43 case TranscendentalCache::COS: return &cos;
45 case TranscendentalCache::TAN: return &tan; 44 case TranscendentalCache::TAN: return &tan;
46 case TranscendentalCache::LOG: return &log; 45 case TranscendentalCache::LOG: return &log;
47 default: UNIMPLEMENTED(); 46 default: UNIMPLEMENTED();
48 } 47 }
49 return NULL; 48 return NULL;
50 } 49 }
51 50
52 51
52 UnaryMathFunction CreateSqrtFunction() {
53 return &sqrt;
54 }
55
53 // ------------------------------------------------------------------------- 56 // -------------------------------------------------------------------------
54 // Platform-specific RuntimeCallHelper functions. 57 // Platform-specific RuntimeCallHelper functions.
55 58
56 void StubRuntimeCallHelper::BeforeCall(MacroAssembler* masm) const { 59 void StubRuntimeCallHelper::BeforeCall(MacroAssembler* masm) const {
57 masm->EnterFrame(StackFrame::INTERNAL); 60 masm->EnterFrame(StackFrame::INTERNAL);
58 ASSERT(!masm->has_frame()); 61 ASSERT(!masm->has_frame());
59 masm->set_has_frame(true); 62 masm->set_has_frame(true);
60 } 63 }
61 64
62 65
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 __ Addu(at, string, index); 444 __ Addu(at, string, index);
442 __ lbu(result, MemOperand(at)); 445 __ lbu(result, MemOperand(at));
443 __ bind(&done); 446 __ bind(&done);
444 } 447 }
445 448
446 #undef __ 449 #undef __
447 450
448 } } // namespace v8::internal 451 } } // namespace v8::internal
449 452
450 #endif // V8_TARGET_ARCH_MIPS 453 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« src/ia32/codegen-ia32.cc ('K') | « src/ia32/codegen-ia32.cc ('k') | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698