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

Side by Side Diff: src/IceTargetLoweringX8632.cpp

Issue 384443003: Add scalar lowering for sqrt intrinsic. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: whitespace 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 | « src/IceTargetLoweringX8632.h ('k') | tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll » ('j') | 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 2000 matching lines...) Expand 10 before | Expand all | Expand 10 after
2011 _mov(T, Src); 2011 _mov(T, Src);
2012 _mov(Dest, T); 2012 _mov(Dest, T);
2013 return; 2013 return;
2014 } 2014 }
2015 case Intrinsics::Setjmp: { 2015 case Intrinsics::Setjmp: {
2016 InstCall *Call = makeHelperCall("setjmp", Instr->getDest(), 1); 2016 InstCall *Call = makeHelperCall("setjmp", Instr->getDest(), 1);
2017 Call->addArg(Instr->getArg(0)); 2017 Call->addArg(Instr->getArg(0));
2018 lowerCall(Call); 2018 lowerCall(Call);
2019 return; 2019 return;
2020 } 2020 }
2021 case Intrinsics::Sqrt: 2021 case Intrinsics::Sqrt: {
2022 Operand *Src = legalize(Instr->getArg(0));
2023 Variable *Dest = Instr->getDest();
2024 Variable *T = makeReg(Dest->getType());
2025 _sqrtss(T, Src);
2026 _mov(Dest, T);
2027 return;
2028 }
2022 case Intrinsics::Stacksave: 2029 case Intrinsics::Stacksave:
2023 case Intrinsics::Stackrestore: 2030 case Intrinsics::Stackrestore:
2024 // TODO(jvoung): fill it in. 2031 // TODO(jvoung): fill it in.
2025 Func->setError("Unhandled intrinsic"); 2032 Func->setError("Unhandled intrinsic");
2026 return; 2033 return;
2027 case Intrinsics::Trap: 2034 case Intrinsics::Trap:
2028 _ud2(); 2035 _ud2();
2029 return; 2036 return;
2030 case Intrinsics::UnknownIntrinsic: 2037 case Intrinsics::UnknownIntrinsic:
2031 Func->setError("Should not be lowering UnknownIntrinsic"); 2038 Func->setError("Should not be lowering UnknownIntrinsic");
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
2738 for (SizeT i = 0; i < Size; ++i) { 2745 for (SizeT i = 0; i < Size; ++i) {
2739 Str << "\t.byte\t" << (((unsigned)Data[i]) & 0xff) << "\n"; 2746 Str << "\t.byte\t" << (((unsigned)Data[i]) & 0xff) << "\n";
2740 } 2747 }
2741 Str << "\t.size\t" << MangledName << ", " << Size << "\n"; 2748 Str << "\t.size\t" << MangledName << ", " << Size << "\n";
2742 } 2749 }
2743 Str << "\t" << (IsInternal ? ".local" : ".global") << "\t" << MangledName 2750 Str << "\t" << (IsInternal ? ".local" : ".global") << "\t" << MangledName
2744 << "\n"; 2751 << "\n";
2745 } 2752 }
2746 2753
2747 } // end of namespace Ice 2754 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8632.h ('k') | tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698