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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 6905098: ARM: Support hardfloat in SCons build and make it a build time setting (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added CAN_USE_VFP_INSTRUCTIONS when hardfloat is used Created 9 years, 7 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/macro-assembler-arm.h ('k') | src/arm/simulator-arm.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 865
866 // Tear down the exit frame, pop the arguments, and return. 866 // Tear down the exit frame, pop the arguments, and return.
867 mov(sp, Operand(fp)); 867 mov(sp, Operand(fp));
868 ldm(ia_w, sp, fp.bit() | lr.bit()); 868 ldm(ia_w, sp, fp.bit() | lr.bit());
869 if (argument_count.is_valid()) { 869 if (argument_count.is_valid()) {
870 add(sp, sp, Operand(argument_count, LSL, kPointerSizeLog2)); 870 add(sp, sp, Operand(argument_count, LSL, kPointerSizeLog2));
871 } 871 }
872 } 872 }
873 873
874 void MacroAssembler::GetCFunctionDoubleResult(const DoubleRegister dst) { 874 void MacroAssembler::GetCFunctionDoubleResult(const DoubleRegister dst) {
875 if (FLAG_hardfloat) { 875 if (use_eabi_hardfloat()) {
876 Move(dst, d0); 876 Move(dst, d0);
877 } else { 877 } else {
878 vmov(dst, r0, r1); 878 vmov(dst, r0, r1);
879 } 879 }
880 } 880 }
881 881
882 882
883 void MacroAssembler::InvokePrologue(const ParameterCount& expected, 883 void MacroAssembler::InvokePrologue(const ParameterCount& expected,
884 const ParameterCount& actual, 884 const ParameterCount& actual,
885 Handle<Code> code_constant, 885 Handle<Code> code_constant,
(...skipping 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after
2828 cmp(scratch, Operand(kFlatAsciiStringTag)); 2828 cmp(scratch, Operand(kFlatAsciiStringTag));
2829 b(ne, failure); 2829 b(ne, failure);
2830 } 2830 }
2831 2831
2832 static const int kRegisterPassedArguments = 4; 2832 static const int kRegisterPassedArguments = 4;
2833 2833
2834 2834
2835 int MacroAssembler::CalculateStackPassedWords(int num_reg_arguments, 2835 int MacroAssembler::CalculateStackPassedWords(int num_reg_arguments,
2836 int num_double_arguments) { 2836 int num_double_arguments) {
2837 int stack_passed_words = 0; 2837 int stack_passed_words = 0;
2838 if (FLAG_hardfloat) { 2838 if (use_eabi_hardfloat()) {
2839 // In the hard floating point calling convention, we can use 2839 // In the hard floating point calling convention, we can use
2840 // all double registers to pass doubles. 2840 // all double registers to pass doubles.
2841 if (num_double_arguments > DoubleRegister::kNumRegisters) { 2841 if (num_double_arguments > DoubleRegister::kNumRegisters) {
2842 stack_passed_words += 2842 stack_passed_words +=
2843 2 * (num_double_arguments - DoubleRegister::kNumRegisters); 2843 2 * (num_double_arguments - DoubleRegister::kNumRegisters);
2844 } 2844 }
2845 } else { 2845 } else {
2846 // In the soft floating point calling convention, every double 2846 // In the soft floating point calling convention, every double
2847 // argument is passed using two registers. 2847 // argument is passed using two registers.
2848 num_reg_arguments += 2 * num_double_arguments; 2848 num_reg_arguments += 2 * num_double_arguments;
(...skipping 26 matching lines...) Expand all
2875 } 2875 }
2876 2876
2877 2877
2878 void MacroAssembler::PrepareCallCFunction(int num_reg_arguments, 2878 void MacroAssembler::PrepareCallCFunction(int num_reg_arguments,
2879 Register scratch) { 2879 Register scratch) {
2880 PrepareCallCFunction(num_reg_arguments, 0, scratch); 2880 PrepareCallCFunction(num_reg_arguments, 0, scratch);
2881 } 2881 }
2882 2882
2883 2883
2884 void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg) { 2884 void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg) {
2885 if (FLAG_hardfloat) { 2885 if (use_eabi_hardfloat()) {
2886 Move(d0, dreg); 2886 Move(d0, dreg);
2887 } else { 2887 } else {
2888 vmov(r0, r1, dreg); 2888 vmov(r0, r1, dreg);
2889 } 2889 }
2890 } 2890 }
2891 2891
2892 2892
2893 void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg1, 2893 void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg1,
2894 DoubleRegister dreg2) { 2894 DoubleRegister dreg2) {
2895 if (FLAG_hardfloat) { 2895 if (use_eabi_hardfloat()) {
2896 if (dreg2.is(d0)) { 2896 if (dreg2.is(d0)) {
2897 ASSERT(!dreg1.is(d1)); 2897 ASSERT(!dreg1.is(d1));
2898 Move(d1, dreg2); 2898 Move(d1, dreg2);
2899 Move(d0, dreg1); 2899 Move(d0, dreg1);
2900 } else { 2900 } else {
2901 Move(d0, dreg1); 2901 Move(d0, dreg1);
2902 Move(d1, dreg2); 2902 Move(d1, dreg2);
2903 } 2903 }
2904 } else { 2904 } else {
2905 vmov(r0, r1, dreg1); 2905 vmov(r0, r1, dreg1);
2906 vmov(r2, r3, dreg2); 2906 vmov(r2, r3, dreg2);
2907 } 2907 }
2908 } 2908 }
2909 2909
2910 2910
2911 void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg, 2911 void MacroAssembler::SetCallCDoubleArguments(DoubleRegister dreg,
2912 Register reg) { 2912 Register reg) {
2913 if (FLAG_hardfloat) { 2913 if (use_eabi_hardfloat()) {
2914 Move(d0, dreg); 2914 Move(d0, dreg);
2915 Move(r0, reg); 2915 Move(r0, reg);
2916 } else { 2916 } else {
2917 Move(r2, reg); 2917 Move(r2, reg);
2918 vmov(r0, r1, dreg); 2918 vmov(r0, r1, dreg);
2919 } 2919 }
2920 } 2920 }
2921 2921
2922 2922
2923 void MacroAssembler::CallCFunction(ExternalReference function, 2923 void MacroAssembler::CallCFunction(ExternalReference function,
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
3054 void CodePatcher::EmitCondition(Condition cond) { 3054 void CodePatcher::EmitCondition(Condition cond) {
3055 Instr instr = Assembler::instr_at(masm_.pc_); 3055 Instr instr = Assembler::instr_at(masm_.pc_);
3056 instr = (instr & ~kCondMask) | cond; 3056 instr = (instr & ~kCondMask) | cond;
3057 masm_.emit(instr); 3057 masm_.emit(instr);
3058 } 3058 }
3059 3059
3060 3060
3061 } } // namespace v8::internal 3061 } } // namespace v8::internal
3062 3062
3063 #endif // V8_TARGET_ARCH_ARM 3063 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/simulator-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698