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

Unified Diff: src/IceInstARM32.cpp

Issue 1619703008: Fix vldrd/vstrd handling of immediate offsets in ARM. (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 c7d4e10dc0668dad81772c73a3e7202aeb6f6042..a9af784d13419059a5fb957b119956169174df5d 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -1375,10 +1375,18 @@ template <> void InstARM32Ldr::emitIAS(const Cfg *Func) const {
Type DestTy = Dest->getType();
Jim Stichnoth 2016/01/22 05:10:30 const, if you feel so inclined...
Karl 2016/01/22 16:24:29 Done.
auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
if (isScalarFloatingType(DestTy)) {
- if (DestTy == IceType_f32)
+ switch (DestTy) {
+ default:
+ // TODO(kschimpf) Does this happen?
John 2016/01/22 15:04:28 It does not happen at the moment, but it will once
Karl 2016/01/22 16:24:29 Actually, due to the if above, this shouldn't happ
+ Asm->setNeedsTextFixup();
+ break;
+ case IceType_f32:
Asm->vldrs(Dest, getSrc(0), getPredicate(), Func->getTarget());
- else
+ break;
+ case IceType_f64:
Asm->vldrd(Dest, getSrc(0), getPredicate(), Func->getTarget());
+ break;
+ }
} else if (isVectorType(DestTy))
// TODO(kschimpf) Handle case.
Asm->setNeedsTextFixup();
@@ -1677,10 +1685,18 @@ void InstARM32Str::emitIAS(const Cfg *Func) const {
Type Ty = getSrc(0)->getType();
auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
if (isScalarFloatingType(Ty)) {
- if (Ty == IceType_f32)
+ switch (Ty) {
+ default:
+ // TODO(kschimpf) Does this happen?
+ Asm->setNeedsTextFixup();
+ break;
+ case IceType_f32:
Asm->vstrs(getSrc(0), getSrc(1), getPredicate(), Func->getTarget());
- else
+ break;
+ case IceType_f64:
Asm->vstrd(getSrc(0), getSrc(1), getPredicate(), Func->getTarget());
+ break;
+ }
} else if (isVectorType(Ty))
// TODO(kschimpf) Handle case.
Asm->setNeedsTextFixup();

Powered by Google App Engine
This is Rietveld 408576698