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

Side by Side Diff: src/IceTargetLoweringX8632.cpp

Issue 387153002: Fix floating point vector frem lowering. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 5 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 | « no previous file | 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 //===- subzero/src/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===// 1 //===- subzero/src/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file implements the TargetLoweringX8632 class, which 10 // This file implements the TargetLoweringX8632 class, which
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 _mulps(T, Src1); 1175 _mulps(T, Src1);
1176 _movp(Dest, T); 1176 _movp(Dest, T);
1177 } break; 1177 } break;
1178 case InstArithmetic::Fdiv: { 1178 case InstArithmetic::Fdiv: {
1179 Variable *T = makeReg(Dest->getType()); 1179 Variable *T = makeReg(Dest->getType());
1180 _movp(T, Src0); 1180 _movp(T, Src0);
1181 _divps(T, Src1); 1181 _divps(T, Src1);
1182 _movp(Dest, T); 1182 _movp(Dest, T);
1183 } break; 1183 } break;
1184 case InstArithmetic::Frem: { 1184 case InstArithmetic::Frem: {
1185 const SizeT MaxSrcs = 1; 1185 const SizeT MaxSrcs = 2;
1186 InstCall *Call = makeHelperCall("__frem_v4f32", Dest, MaxSrcs); 1186 InstCall *Call = makeHelperCall("__frem_v4f32", Dest, MaxSrcs);
1187 Call->addArg(Src0); 1187 Call->addArg(Src0);
1188 Call->addArg(Src1);
1188 lowerCall(Call); 1189 lowerCall(Call);
1189 } break; 1190 } break;
1190 } 1191 }
1191 } else { // Dest->getType() is non-i64 scalar 1192 } else { // Dest->getType() is non-i64 scalar
1192 Variable *T_edx = NULL; 1193 Variable *T_edx = NULL;
1193 Variable *T = NULL; 1194 Variable *T = NULL;
1194 switch (Inst->getOp()) { 1195 switch (Inst->getOp()) {
1195 case InstArithmetic::_num: 1196 case InstArithmetic::_num:
1196 llvm_unreachable("Unknown arithmetic operator"); 1197 llvm_unreachable("Unknown arithmetic operator");
1197 break; 1198 break;
(...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after
2890 for (SizeT i = 0; i < Size; ++i) { 2891 for (SizeT i = 0; i < Size; ++i) {
2891 Str << "\t.byte\t" << (((unsigned)Data[i]) & 0xff) << "\n"; 2892 Str << "\t.byte\t" << (((unsigned)Data[i]) & 0xff) << "\n";
2892 } 2893 }
2893 Str << "\t.size\t" << MangledName << ", " << Size << "\n"; 2894 Str << "\t.size\t" << MangledName << ", " << Size << "\n";
2894 } 2895 }
2895 Str << "\t" << (IsInternal ? ".local" : ".global") << "\t" << MangledName 2896 Str << "\t" << (IsInternal ? ".local" : ".global") << "\t" << MangledName
2896 << "\n"; 2897 << "\n";
2897 } 2898 }
2898 2899
2899 } // end of namespace Ice 2900 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698