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

Unified Diff: src/IceInstARM32.cpp

Issue 1657193003: Add FABS intrinsic to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Format. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceInstARM32.h ('k') | tests_lit/assembler/arm32/vabs.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstARM32.cpp
diff --git a/src/IceInstARM32.cpp b/src/IceInstARM32.cpp
index 5a829d70faadc61dadd3217fa62bf9577544cf2a..512f62e62bac843410c9848cd7706bdb0dd72870 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -2221,6 +2221,26 @@ void InstARM32Vabs::emit(const Cfg *Func) const {
getSrc(0)->emit(Func);
}
+void InstARM32Vabs::emitIAS(const Cfg *Func) const {
+ assert(getSrcSize() == 1);
+ auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
+ const Variable *Dest = getDest();
+ switch (Dest->getType()) {
+ default:
+ // TODO(kschimpf): Implement vector fabs.
+ Asm->setNeedsTextFixup();
+ break;
+ case IceType_f32:
+ Asm->vabss(Dest, getSrc(0), getPredicate());
+ break;
+ case IceType_f64:
+ Asm->vabsd(Dest, getSrc(0), getPredicate());
+ break;
+ }
+ if (Asm->needsTextFixup())
+ emitUsingTextFixup(Func);
+}
+
void InstARM32Vabs::dump(const Cfg *Func) const {
if (!BuildDefs::dump())
return;
« no previous file with comments | « src/IceInstARM32.h ('k') | tests_lit/assembler/arm32/vabs.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698