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

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

Issue 2639443002: [ARM] Refactor NEON binary ops in assembler. (Closed)
Patch Set: Make NeonDataType match NeonSize. Created 3 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
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/constants-arm.h
diff --git a/src/arm/constants-arm.h b/src/arm/constants-arm.h
index e0c91fd4bf107e3e1adb8be63a82ddc7d6e49bca..0b86f3e149d0f1a56c66e6353777999d6b464812 100644
--- a/src/arm/constants-arm.h
+++ b/src/arm/constants-arm.h
@@ -327,16 +327,18 @@ enum LFlag {
// NEON data type
enum NeonDataType {
- NeonS8 = 0x1, // U = 0, imm3 = 0b001
- NeonS16 = 0x2, // U = 0, imm3 = 0b010
- NeonS32 = 0x4, // U = 0, imm3 = 0b100
- NeonU8 = 1 << 24 | 0x1, // U = 1, imm3 = 0b001
- NeonU16 = 1 << 24 | 0x2, // U = 1, imm3 = 0b010
- NeonU32 = 1 << 24 | 0x4, // U = 1, imm3 = 0b100
- NeonDataTypeSizeMask = 0x7,
- NeonDataTypeUMask = 1 << 24
+ NeonS8 = 0,
+ NeonS16 = 1,
+ NeonS32 = 2,
+ // Gap to make it easier to extract U and size.
+ NeonU8 = 4,
+ NeonU16 = 5,
+ NeonU32 = 6
};
+inline int NeonU(NeonDataType dt) { return static_cast<int>(dt) >> 2; }
+inline int NeonSz(NeonDataType dt) { return static_cast<int>(dt) & 0x3; }
+
enum NeonListType {
nlt_1 = 0x7,
nlt_2 = 0xA,
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698