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

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

Issue 1046953004: MIPS: [turbofan] Add backend support for float32 operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/mips/assembler-mips.h ('k') | src/mips/macro-assembler-mips.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 (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 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after
2071 uint64_t i; 2071 uint64_t i;
2072 memcpy(&i, &d, 8); 2072 memcpy(&i, &d, 8);
2073 2073
2074 *lo = i & 0xffffffff; 2074 *lo = i & 0xffffffff;
2075 *hi = i >> 32; 2075 *hi = i >> 32;
2076 } 2076 }
2077 2077
2078 2078
2079 // Arithmetic. 2079 // Arithmetic.
2080 2080
2081 void Assembler::add_s(FPURegister fd, FPURegister fs, FPURegister ft) {
2082 GenInstrRegister(COP1, S, ft, fs, fd, ADD_D);
2083 }
2084
2085
2081 void Assembler::add_d(FPURegister fd, FPURegister fs, FPURegister ft) { 2086 void Assembler::add_d(FPURegister fd, FPURegister fs, FPURegister ft) {
2082 GenInstrRegister(COP1, D, ft, fs, fd, ADD_D); 2087 GenInstrRegister(COP1, D, ft, fs, fd, ADD_D);
2083 } 2088 }
2084 2089
2085 2090
2091 void Assembler::sub_s(FPURegister fd, FPURegister fs, FPURegister ft) {
2092 GenInstrRegister(COP1, S, ft, fs, fd, SUB_D);
2093 }
2094
2095
2086 void Assembler::sub_d(FPURegister fd, FPURegister fs, FPURegister ft) { 2096 void Assembler::sub_d(FPURegister fd, FPURegister fs, FPURegister ft) {
2087 GenInstrRegister(COP1, D, ft, fs, fd, SUB_D); 2097 GenInstrRegister(COP1, D, ft, fs, fd, SUB_D);
2088 } 2098 }
2089 2099
2090 2100
2101 void Assembler::mul_s(FPURegister fd, FPURegister fs, FPURegister ft) {
2102 GenInstrRegister(COP1, S, ft, fs, fd, MUL_D);
2103 }
2104
2105
2091 void Assembler::mul_d(FPURegister fd, FPURegister fs, FPURegister ft) { 2106 void Assembler::mul_d(FPURegister fd, FPURegister fs, FPURegister ft) {
2092 GenInstrRegister(COP1, D, ft, fs, fd, MUL_D); 2107 GenInstrRegister(COP1, D, ft, fs, fd, MUL_D);
2093 } 2108 }
2094 2109
2095 2110
2096 void Assembler::madd_d(FPURegister fd, FPURegister fr, FPURegister fs, 2111 void Assembler::madd_d(FPURegister fd, FPURegister fr, FPURegister fs,
2097 FPURegister ft) { 2112 FPURegister ft) {
2098 DCHECK(IsMipsArchVariant(kMips32r2)); 2113 DCHECK(IsMipsArchVariant(kMips32r2));
2099 GenInstrRegister(COP1X, fr, ft, fs, fd, MADD_D); 2114 GenInstrRegister(COP1X, fr, ft, fs, fd, MADD_D);
2100 } 2115 }
2101 2116
2102 2117
2118 void Assembler::div_s(FPURegister fd, FPURegister fs, FPURegister ft) {
2119 GenInstrRegister(COP1, S, ft, fs, fd, DIV_D);
2120 }
2121
2122
2103 void Assembler::div_d(FPURegister fd, FPURegister fs, FPURegister ft) { 2123 void Assembler::div_d(FPURegister fd, FPURegister fs, FPURegister ft) {
2104 GenInstrRegister(COP1, D, ft, fs, fd, DIV_D); 2124 GenInstrRegister(COP1, D, ft, fs, fd, DIV_D);
2105 } 2125 }
2106 2126
2107 2127
2108 void Assembler::abs_d(FPURegister fd, FPURegister fs) { 2128 void Assembler::abs_d(FPURegister fd, FPURegister fs) {
2109 GenInstrRegister(COP1, D, f0, fs, fd, ABS_D); 2129 GenInstrRegister(COP1, D, f0, fs, fd, ABS_D);
2110 } 2130 }
2111 2131
2112 2132
2113 void Assembler::mov_d(FPURegister fd, FPURegister fs) { 2133 void Assembler::mov_d(FPURegister fd, FPURegister fs) {
2114 GenInstrRegister(COP1, D, f0, fs, fd, MOV_D); 2134 GenInstrRegister(COP1, D, f0, fs, fd, MOV_D);
2115 } 2135 }
2116 2136
2117 2137
2138 void Assembler::neg_s(FPURegister fd, FPURegister fs) {
2139 GenInstrRegister(COP1, S, f0, fs, fd, NEG_D);
2140 }
2141
2142
2118 void Assembler::neg_d(FPURegister fd, FPURegister fs) { 2143 void Assembler::neg_d(FPURegister fd, FPURegister fs) {
2119 GenInstrRegister(COP1, D, f0, fs, fd, NEG_D); 2144 GenInstrRegister(COP1, D, f0, fs, fd, NEG_D);
2120 } 2145 }
2121 2146
2122 2147
2148 void Assembler::sqrt_s(FPURegister fd, FPURegister fs) {
2149 GenInstrRegister(COP1, S, f0, fs, fd, SQRT_D);
2150 }
2151
2152
2123 void Assembler::sqrt_d(FPURegister fd, FPURegister fs) { 2153 void Assembler::sqrt_d(FPURegister fd, FPURegister fs) {
2124 GenInstrRegister(COP1, D, f0, fs, fd, SQRT_D); 2154 GenInstrRegister(COP1, D, f0, fs, fd, SQRT_D);
2125 } 2155 }
2126 2156
2127 2157
2128 // Conversions. 2158 // Conversions.
2129 2159
2130 void Assembler::cvt_w_s(FPURegister fd, FPURegister fs) { 2160 void Assembler::cvt_w_s(FPURegister fd, FPURegister fs) {
2131 GenInstrRegister(COP1, S, f0, fs, fd, CVT_W_S); 2161 GenInstrRegister(COP1, S, f0, fs, fd, CVT_W_S);
2132 } 2162 }
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
2777 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { 2807 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) {
2778 // No out-of-line constant pool support. 2808 // No out-of-line constant pool support.
2779 DCHECK(!FLAG_enable_ool_constant_pool); 2809 DCHECK(!FLAG_enable_ool_constant_pool);
2780 return; 2810 return;
2781 } 2811 }
2782 2812
2783 2813
2784 } } // namespace v8::internal 2814 } } // namespace v8::internal
2785 2815
2786 #endif // V8_TARGET_ARCH_MIPS 2816 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/assembler-mips.h ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698