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

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

Issue 2546933002: [Turbofan] Add ARM NEON instructions for implementing SIMD. (Closed)
Patch Set: 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') | src/arm/assembler-arm.cc » ('J')
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..6d60cea485fe12282f12893c64a7d9de2327be69 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 len() const { return register_count_ - 1; }
Rodolph Perfetta (ARM) 2016/12/08 18:08:28 len -> length
bbudge 2016/12/10 21:33:04 Done.
+ 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_;
};
@@ -1330,10 +1344,38 @@ class Assembler : public AssemblerBase {
void vmovl(NeonDataType dt, QwNeonRegister dst, DwVfpRegister src);
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(const QwNeonRegister dst, const Register src, NeonSize size);
Rodolph Perfetta (ARM) 2016/12/08 18:08:28 in other instructions like vmovl the size qualifie
bbudge 2016/12/10 21:33:04 Done.
+ void vdup(const QwNeonRegister dst, const SwVfpRegister src);
Rodolph Perfetta (ARM) 2016/12/08 18:08:28 this is a special case of vdup.size dst, src[index
bbudge 2016/12/10 21:33:04 This is enough for Wasm, so I'll leave it as is.
+
+ 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(const QwNeonRegister dst, const QwNeonRegister src1,
+ const QwNeonRegister src2, NeonSize size);
Rodolph Perfetta (ARM) 2016/12/08 18:08:28 how about having the size as the first
bbudge 2016/12/10 21:33:04 Done.
+ void vsub(const QwNeonRegister dst, const QwNeonRegister src1,
+ const QwNeonRegister src2);
+ void vsub(const QwNeonRegister dst, const QwNeonRegister src1,
+ const QwNeonRegister src2, NeonSize size);
Rodolph Perfetta (ARM) 2016/12/08 18:08:27 ditto
bbudge 2016/12/10 21:33:04 Done.
+ void vtst(const QwNeonRegister dst, const QwNeonRegister src1,
+ const QwNeonRegister src2, NeonSize size);
Rodolph Perfetta (ARM) 2016/12/08 18:08:28 ditto
bbudge 2016/12/10 21:33:04 Done.
+ void vceq(const QwNeonRegister dst, const QwNeonRegister src1,
+ const QwNeonRegister src2, NeonSize size);
Rodolph Perfetta (ARM) 2016/12/08 18:08:28 ditto
bbudge 2016/12/10 21:33:04 Done.
+ 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') | src/arm/assembler-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698