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

Side by Side Diff: src/assembler.cc

Issue 67163: Avoid a call to the runtime system when doing binary fp ops on ARM... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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/assembler.h ('k') | src/builtins-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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 } 575 }
576 576
577 ExternalReference ExternalReference::new_space_allocation_limit_address() { 577 ExternalReference ExternalReference::new_space_allocation_limit_address() {
578 return ExternalReference(Heap::NewSpaceAllocationLimitAddress()); 578 return ExternalReference(Heap::NewSpaceAllocationLimitAddress());
579 } 579 }
580 580
581 ExternalReference ExternalReference::debug_step_in_fp_address() { 581 ExternalReference ExternalReference::debug_step_in_fp_address() {
582 return ExternalReference(Debug::step_in_fp_addr()); 582 return ExternalReference(Debug::step_in_fp_addr());
583 } 583 }
584 584
585
586 static double add_two_doubles(double x, double y) {
587 return x + y;
588 }
589
590
591 static double sub_two_doubles(double x, double y) {
592 return x - y;
593 }
594
595
596 static double mul_two_doubles(double x, double y) {
597 return x * y;
598 }
599
600
601 ExternalReference ExternalReference::double_fp_operation(
602 Token::Value operation) {
603 typedef double BinaryFPOperation(double x, double y);
604 BinaryFPOperation* function = NULL;
605 switch (operation) {
606 case Token::ADD:
607 function = &add_two_doubles;
608 break;
609 case Token::SUB:
610 function = &sub_two_doubles;
611 break;
612 case Token::MUL:
613 function = &mul_two_doubles;
614 break;
615 default:
616 UNREACHABLE();
617 }
618 return ExternalReference(FUNCTION_ADDR(function));
619 }
620
585 } } // namespace v8::internal 621 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/builtins-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698