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

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

Issue 2739033002: [ARM] Implement more NEON permutation instructions. (Closed)
Patch Set: Martyn's review comments. Created 3 years, 9 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 | « 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 9adf3095573acbd7195492d2f7a5669884469df9..25e7d7488d255390e7db9f741f8ff89223734716 100644
--- a/src/arm/assembler-arm.h
+++ b/src/arm/assembler-arm.h
@@ -180,11 +180,14 @@ struct SwVfpRegister {
SwVfpRegister r = {code};
return r;
}
- void split_code(int* vm, int* m) const {
- DCHECK(is_valid());
+ static void split_code(int reg_code, int* vm, int* m) {
+ DCHECK(from_code(reg_code).is_valid());
*m = reg_code & 0x1;
*vm = reg_code >> 1;
}
+ void split_code(int* vm, int* m) const {
+ split_code(reg_code, vm, m);
+ }
int reg_code;
};
@@ -226,11 +229,14 @@ struct DwVfpRegister {
DwVfpRegister r = {code};
return r;
}
- void split_code(int* vm, int* m) const {
- DCHECK(is_valid());
+ static void split_code(int reg_code, int* vm, int* m) {
+ DCHECK(from_code(reg_code).is_valid());
*m = (reg_code & 0x10) >> 4;
*vm = reg_code & 0x0F;
}
+ void split_code(int* vm, int* m) const {
+ split_code(reg_code, vm, m);
+ }
int reg_code;
};
@@ -296,12 +302,15 @@ struct QwNeonRegister {
DCHECK(is_valid());
return reg_code;
}
- void split_code(int* vm, int* m) const {
- DCHECK(is_valid());
+ static void split_code(int reg_code, int* vm, int* m) {
+ DCHECK(from_code(reg_code).is_valid());
int encoded_code = reg_code << 1;
*m = (encoded_code & 0x10) >> 4;
*vm = encoded_code & 0x0F;
}
+ void split_code(int* vm, int* m) const {
+ split_code(reg_code, vm, m);
+ }
DwVfpRegister low() const {
DwVfpRegister reg;
reg.reg_code = reg_code * 2;
@@ -1315,27 +1324,27 @@ class Assembler : public AssemblerBase {
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 vmov(QwNeonRegister dst, QwNeonRegister src);
+ void vdup(NeonSize size, QwNeonRegister dst, Register src);
+ void vdup(QwNeonRegister dst, SwVfpRegister src);
+
+ void vcvt_f32_s32(QwNeonRegister dst, QwNeonRegister src);
+ void vcvt_f32_u32(QwNeonRegister dst, QwNeonRegister src);
+ void vcvt_s32_f32(QwNeonRegister dst, QwNeonRegister src);
+ void vcvt_u32_f32(QwNeonRegister dst, QwNeonRegister src);
+
+ void vmvn(QwNeonRegister dst, 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 vabs(const QwNeonRegister dst, const QwNeonRegister src);
- void vabs(NeonSize size, const QwNeonRegister dst, const QwNeonRegister src);
- void vneg(const QwNeonRegister dst, const QwNeonRegister src);
- void vneg(NeonSize size, const QwNeonRegister dst, const QwNeonRegister src);
- void veor(DwVfpRegister dst, DwVfpRegister src1, DwVfpRegister src2);
+ void vabs(QwNeonRegister dst, QwNeonRegister src);
+ void vabs(NeonSize size, QwNeonRegister dst, QwNeonRegister src);
+ void vneg(QwNeonRegister dst, QwNeonRegister src);
+ void vneg(NeonSize size, QwNeonRegister dst, QwNeonRegister src);
+
void vand(QwNeonRegister dst, QwNeonRegister src1, QwNeonRegister src2);
- void vbsl(QwNeonRegister dst, QwNeonRegister src1, QwNeonRegister src2);
+ void veor(DwVfpRegister dst, DwVfpRegister src1, DwVfpRegister src2);
void veor(QwNeonRegister dst, QwNeonRegister src1, QwNeonRegister src2);
+ void vbsl(QwNeonRegister dst, QwNeonRegister src1, QwNeonRegister src2);
void vorr(QwNeonRegister dst, QwNeonRegister src1, QwNeonRegister src2);
void vadd(QwNeonRegister dst, QwNeonRegister src1, QwNeonRegister src2);
void vadd(NeonSize size, QwNeonRegister dst, QwNeonRegister src1,
@@ -1374,24 +1383,23 @@ class Assembler : public AssemblerBase {
void vceq(NeonSize size, QwNeonRegister dst, QwNeonRegister src1,
QwNeonRegister src2);
void vcge(QwNeonRegister dst, QwNeonRegister src1, QwNeonRegister src2);
- void vcge(NeonDataType dt, QwNeonRegister dst,
- QwNeonRegister src1, QwNeonRegister src2);
+ void vcge(NeonDataType dt, QwNeonRegister dst, QwNeonRegister src1,
+ QwNeonRegister src2);
void vcgt(QwNeonRegister dst, QwNeonRegister src1, QwNeonRegister src2);
- void vcgt(NeonDataType dt, QwNeonRegister dst,
- QwNeonRegister src1, QwNeonRegister src2);
- void vext(const QwNeonRegister dst, const QwNeonRegister src1,
- const QwNeonRegister src2, int bytes);
- void vzip(NeonSize size, const QwNeonRegister dst, const QwNeonRegister src);
- void vrev16(NeonSize size, const QwNeonRegister dst,
- const QwNeonRegister src);
- void vrev32(NeonSize size, const QwNeonRegister dst,
- const QwNeonRegister src);
- void vrev64(NeonSize size, const QwNeonRegister dst,
- const QwNeonRegister src);
- void vtbl(const DwVfpRegister dst, const NeonListOperand& list,
- const DwVfpRegister index);
- void vtbx(const DwVfpRegister dst, const NeonListOperand& list,
- const DwVfpRegister index);
+ void vcgt(NeonDataType dt, QwNeonRegister dst, QwNeonRegister src1,
+ QwNeonRegister src2);
+ void vext(QwNeonRegister dst, QwNeonRegister src1, QwNeonRegister src2,
+ int bytes);
+ void vzip(NeonSize size, QwNeonRegister src1, QwNeonRegister src2);
+ void vuzp(NeonSize size, QwNeonRegister src1, QwNeonRegister src2);
+ void vrev16(NeonSize size, QwNeonRegister dst, QwNeonRegister src);
+ void vrev32(NeonSize size, QwNeonRegister dst, QwNeonRegister src);
+ void vrev64(NeonSize size, QwNeonRegister dst, QwNeonRegister src);
+ void vtrn(NeonSize size, QwNeonRegister src1, QwNeonRegister src2);
+ void vtbl(DwVfpRegister dst, const NeonListOperand& list,
+ DwVfpRegister index);
+ void vtbx(DwVfpRegister dst, const NeonListOperand& list,
+ 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