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

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

Issue 136613003: Demystified floating point ABI function names. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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/code-stubs-arm.cc ('k') | src/arm/lithium-codegen-arm.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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 UnaryMathFunction CreateSqrtFunction() { 350 UnaryMathFunction CreateSqrtFunction() {
351 #if defined(USE_SIMULATOR) 351 #if defined(USE_SIMULATOR)
352 return &std::sqrt; 352 return &std::sqrt;
353 #else 353 #else
354 size_t actual_size; 354 size_t actual_size;
355 byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size, true)); 355 byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size, true));
356 if (buffer == NULL) return &std::sqrt; 356 if (buffer == NULL) return &std::sqrt;
357 357
358 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); 358 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
359 359
360 __ GetCFunctionDoubleResult(d0); 360 __ MovFromFloatParameter(d0);
361 __ vsqrt(d0, d0); 361 __ vsqrt(d0, d0);
362 __ SetCallCDoubleArguments(d0); 362 __ MovToFloatResult(d0);
363 __ Ret(); 363 __ Ret();
364 364
365 CodeDesc desc; 365 CodeDesc desc;
366 masm.GetCode(&desc); 366 masm.GetCode(&desc);
367 ASSERT(!RelocInfo::RequiresRelocation(desc)); 367 ASSERT(!RelocInfo::RequiresRelocation(desc));
368 368
369 CPU::FlushICache(buffer, actual_size); 369 CPU::FlushICache(buffer, actual_size);
370 OS::ProtectCode(buffer, actual_size); 370 OS::ProtectCode(buffer, actual_size);
371 return FUNCTION_CAST<UnaryMathFunction>(buffer); 371 return FUNCTION_CAST<UnaryMathFunction>(buffer);
372 #endif 372 #endif
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 patcher.masm()->add(r0, pc, Operand(-8)); 908 patcher.masm()->add(r0, pc, Operand(-8));
909 patcher.masm()->ldr(pc, MemOperand(pc, -4)); 909 patcher.masm()->ldr(pc, MemOperand(pc, -4));
910 patcher.masm()->emit_code_stub_address(stub); 910 patcher.masm()->emit_code_stub_address(stub);
911 } 911 }
912 } 912 }
913 913
914 914
915 } } // namespace v8::internal 915 } } // namespace v8::internal
916 916
917 #endif // V8_TARGET_ARCH_ARM 917 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698