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

Unified Diff: src/IceInstARM32.cpp

Issue 1661633002: Add VORR instruction to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: 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
Index: src/IceInstARM32.cpp
diff --git a/src/IceInstARM32.cpp b/src/IceInstARM32.cpp
index 843e0f5fa9d7583530976002373c6b9b2360fe6e..e0793c302fc4e6b0a6608267e3c80d35264e4fe5 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -618,16 +618,7 @@ template <> void InstARM32Vadd::emitIAS(const Cfg *Func) const {
const Variable *Dest = getDest();
Type DestTy = Dest->getType();
switch (DestTy) {
- case IceType_void:
- case IceType_i1:
- case IceType_i8:
- case IceType_i16:
- case IceType_i32:
- case IceType_i64:
- case IceType_v4i1:
- case IceType_v8i1:
- case IceType_v16i1:
- case IceType_NUM:
+ default:
llvm::report_fatal_error("Vadd not defined on type " +
typeIceString(DestTy));
break;
@@ -650,7 +641,6 @@ template <> void InstARM32Vadd::emitIAS(const Cfg *Func) const {
}
template <> void InstARM32Vand::emitIAS(const Cfg *Func) const {
- // TODO(kschimpf): add support for these instructions
auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
const Variable *Dest = getDest();
switch (Dest->getType()) {
@@ -742,8 +732,21 @@ template <> void InstARM32Vmls::emitIAS(const Cfg *Func) const {
}
template <> void InstARM32Vorr::emitIAS(const Cfg *Func) const {
- // TODO(kschimpf): add support for these instructions
- emitUsingTextFixup(Func);
+ auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
+ const Variable *Dest = getDest();
+ switch (Dest->getType()) {
+ default:
+ llvm::report_fatal_error("Vorr not defined on type " +
+ typeIceString(Dest->getType()));
+ case IceType_v4i1:
+ case IceType_v8i1:
+ case IceType_v16i1:
+ case IceType_v16i8:
+ case IceType_v8i16:
+ case IceType_v4i32:
+ Asm->vorrq(Dest, getSrc(0), getSrc(1));
+ }
+ assert(!Asm->needsTextFixup());
}
template <> void InstARM32Vsub::emitIAS(const Cfg *Func) const {
@@ -751,16 +754,7 @@ template <> void InstARM32Vsub::emitIAS(const Cfg *Func) const {
const Variable *Dest = getDest();
Type DestTy = Dest->getType();
switch (DestTy) {
- case IceType_void:
- case IceType_i1:
- case IceType_i8:
- case IceType_i16:
- case IceType_i32:
- case IceType_i64:
- case IceType_v4i1:
- case IceType_v8i1:
- case IceType_v16i1:
- case IceType_NUM:
+ default:
llvm::report_fatal_error("Vsub not defined on type " +
typeIceString(DestTy));
case IceType_v16i8:

Powered by Google App Engine
This is Rietveld 408576698