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

Side by Side Diff: src/assembler.cc

Issue 551048: Very small optimization of ARM compare stub. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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/simulator-arm.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 (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 26 matching lines...) Expand all
37 #include "arguments.h" 37 #include "arguments.h"
38 #include "execution.h" 38 #include "execution.h"
39 #include "ic-inl.h" 39 #include "ic-inl.h"
40 #include "factory.h" 40 #include "factory.h"
41 #include "runtime.h" 41 #include "runtime.h"
42 #include "serialize.h" 42 #include "serialize.h"
43 #include "stub-cache.h" 43 #include "stub-cache.h"
44 #include "regexp-stack.h" 44 #include "regexp-stack.h"
45 #include "ast.h" 45 #include "ast.h"
46 #include "regexp-macro-assembler.h" 46 #include "regexp-macro-assembler.h"
47 #include "platform.h"
47 // Include native regexp-macro-assembler. 48 // Include native regexp-macro-assembler.
48 #ifdef V8_NATIVE_REGEXP 49 #ifdef V8_NATIVE_REGEXP
49 #if V8_TARGET_ARCH_IA32 50 #if V8_TARGET_ARCH_IA32
50 #include "ia32/regexp-macro-assembler-ia32.h" 51 #include "ia32/regexp-macro-assembler-ia32.h"
51 #elif V8_TARGET_ARCH_X64 52 #elif V8_TARGET_ARCH_X64
52 #include "x64/regexp-macro-assembler-x64.h" 53 #include "x64/regexp-macro-assembler-x64.h"
53 #elif V8_TARGET_ARCH_ARM 54 #elif V8_TARGET_ARCH_ARM
54 #include "arm/regexp-macro-assembler-arm.h" 55 #include "arm/regexp-macro-assembler-arm.h"
55 #else // Unknown architecture. 56 #else // Unknown architecture.
56 #error "Unknown architecture." 57 #error "Unknown architecture."
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 return x * y; 700 return x * y;
700 } 701 }
701 702
702 703
703 static double div_two_doubles(double x, double y) { 704 static double div_two_doubles(double x, double y) {
704 return x / y; 705 return x / y;
705 } 706 }
706 707
707 708
708 static double mod_two_doubles(double x, double y) { 709 static double mod_two_doubles(double x, double y) {
709 return fmod(x, y); 710 return modulo(x, y);
710 } 711 }
711 712
712 713
713 static int native_compare_doubles(double x, double y) { 714 static int native_compare_doubles(double y, double x) {
714 if (x == y) return 0; 715 if (x == y) return EQUAL;
715 return x < y ? 1 : -1; 716 return x < y ? LESS : GREATER;
716 } 717 }
717 718
718 719
719 ExternalReference ExternalReference::double_fp_operation( 720 ExternalReference ExternalReference::double_fp_operation(
720 Token::Value operation) { 721 Token::Value operation) {
721 typedef double BinaryFPOperation(double x, double y); 722 typedef double BinaryFPOperation(double x, double y);
722 BinaryFPOperation* function = NULL; 723 BinaryFPOperation* function = NULL;
723 switch (operation) { 724 switch (operation) {
724 case Token::ADD: 725 case Token::ADD:
725 function = &add_two_doubles; 726 function = &add_two_doubles;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 return ExternalReference(Redirect(FUNCTION_ADDR(Debug::Break))); 759 return ExternalReference(Redirect(FUNCTION_ADDR(Debug::Break)));
759 } 760 }
760 761
761 762
762 ExternalReference ExternalReference::debug_step_in_fp_address() { 763 ExternalReference ExternalReference::debug_step_in_fp_address() {
763 return ExternalReference(Debug::step_in_fp_addr()); 764 return ExternalReference(Debug::step_in_fp_addr());
764 } 765 }
765 #endif 766 #endif
766 767
767 } } // namespace v8::internal 768 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698