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

Unified Diff: src/arm/assembler-arm.h

Issue 2546933002: [Turbofan] Add ARM NEON instructions for implementing SIMD. (Closed)
Patch Set: Fourth review comments. Created 4 years 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 | « no previous file | src/arm/assembler-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/assembler-arm.h
diff --git a/src/arm/assembler-arm.h b/src/arm/assembler-arm.h
index 3ee980699da1d94f5935d0b21ecb01d684e7a768..235d80be8386489cdc79b84fd509577c24d28e6a 100644
--- a/src/arm/assembler-arm.h
+++ b/src/arm/assembler-arm.h
@@ -640,12 +640,26 @@ class NeonMemOperand BASE_EMBEDDED {
// Class NeonListOperand represents a list of NEON registers
class NeonListOperand BASE_EMBEDDED {
public:
- explicit NeonListOperand(DoubleRegister base, int registers_count = 1);
+ explicit NeonListOperand(DoubleRegister base, int register_count = 1)
+ : base_(base), register_count_(register_count) {}
+ explicit NeonListOperand(QwNeonRegister q_reg)
+ : base_(q_reg.low()), register_count_(2) {}
DoubleRegister base() const { return base_; }
- NeonListType type() const { return type_; }
+ int register_count() { return register_count_; }
+ int length() const { return register_count_ - 1; }
+ NeonListType type() const {
+ switch (register_count_) {
+ default: UNREACHABLE();
+ // Fall through.
+ case 1: return nlt_1;
+ case 2: return nlt_2;
+ case 3: return nlt_3;
+ case 4: return nlt_4;
+ }
+ }
private:
DoubleRegister base_;
- NeonListType type_;
+ int register_count_;
};
@@ -1149,6 +1163,8 @@ class Assembler : public AssemblerBase {
void vmov(const DwVfpRegister dst,
const DwVfpRegister src,
const Condition cond = al);
+ // TODO(bbudge) Replace uses of these with the more general core register to
+ // scalar register vmov's.
void vmov(const DwVfpRegister dst,
const VmovIndex index,
const Register src,
@@ -1329,11 +1345,43 @@ class Assembler : public AssemblerBase {
const NeonMemOperand& dst);
void vmovl(NeonDataType dt, QwNeonRegister dst, DwVfpRegister src);
+ // Only unconditional core <-> scalar moves are currently supported.
+ void vmov(NeonDataType dt, DwVfpRegister dst, int index, Register src);
+ void vmov(NeonDataType dt, Register dst, DwVfpRegister src, int index);
+
void vmov(const QwNeonRegister dst, const QwNeonRegister src);
+ void vmvn(const QwNeonRegister dst, const QwNeonRegister src);
void vswp(DwVfpRegister dst, DwVfpRegister src);
void vswp(QwNeonRegister dst, QwNeonRegister src);
+ // vdup conditional execution isn't supported.
+ void vdup(NeonSize size, const QwNeonRegister dst, const Register src);
+ void vdup(const QwNeonRegister dst, const SwVfpRegister src);
+
+ void vcvt_f32_s32(const QwNeonRegister dst, const QwNeonRegister src);
+ void vcvt_f32_u32(const QwNeonRegister dst, const QwNeonRegister src);
+ void vcvt_s32_f32(const QwNeonRegister dst, const QwNeonRegister src);
+ void vcvt_u32_f32(const QwNeonRegister dst, const QwNeonRegister src);
+
void veor(DwVfpRegister dst, DwVfpRegister src1, DwVfpRegister src2);
void veor(QwNeonRegister dst, QwNeonRegister src1, QwNeonRegister src2);
+ void vadd(const QwNeonRegister dst, const QwNeonRegister src1,
+ const QwNeonRegister src2);
+ void vadd(NeonSize size, const QwNeonRegister dst, const QwNeonRegister src1,
+ const QwNeonRegister src2);
+ void vsub(const QwNeonRegister dst, const QwNeonRegister src1,
+ const QwNeonRegister src2);
+ void vsub(NeonSize size, const QwNeonRegister dst, const QwNeonRegister src1,
+ const QwNeonRegister src2);
+ void vtst(NeonSize size, const QwNeonRegister dst, const QwNeonRegister src1,
+ const QwNeonRegister src2);
+ void vceq(NeonSize size, const QwNeonRegister dst, const QwNeonRegister src1,
+ const QwNeonRegister src2);
+ void vbsl(const QwNeonRegister dst, const QwNeonRegister src1,
+ const QwNeonRegister src2);
+ void vtbl(const DwVfpRegister dst, const NeonListOperand& list,
+ const DwVfpRegister index);
+ void vtbx(const DwVfpRegister dst, const NeonListOperand& list,
+ const DwVfpRegister index);
// Pseudo instructions
« no previous file with comments | « no previous file | src/arm/assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698