@@ -59,48 +59,47 @@ class Immediate : public ValueObject {
5959};
6060
6161// Instruction encoding bits.
62- enum {
63- H = 1 << 5 , // halfword (or byte)
64- L = 1 << 20 , // load (or store)
65- S = 1 << 20 , // set condition code (or leave unchanged)
66- W = 1 << 21 , // writeback base register (or leave unchanged)
67- A = 1 << 21 , // accumulate in multiply instruction (or not)
68- B = 1 << 22 , // unsigned byte (or word)
69- D = 1 << 22 , // high/lo bit of start of s/d register range
70- N = 1 << 22 , // long (or short)
71- U = 1 << 23 , // positive (or negative) offset/index
72- P = 1 << 24 , // offset/pre-indexed addressing (or post-indexed addressing)
73- I = 1 << 25 , // immediate shifter operand (or not)
74-
75- B0 = 1 ,
76- B1 = 1 << 1 ,
77- B2 = 1 << 2 ,
78- B3 = 1 << 3 ,
79- B4 = 1 << 4 ,
80- B5 = 1 << 5 ,
81- B6 = 1 << 6 ,
82- B7 = 1 << 7 ,
83- B8 = 1 << 8 ,
84- B9 = 1 << 9 ,
85- B10 = 1 << 10 ,
86- B11 = 1 << 11 ,
87- B12 = 1 << 12 ,
88- B13 = 1 << 13 ,
89- B14 = 1 << 14 ,
90- B15 = 1 << 15 ,
91- B16 = 1 << 16 ,
92- B17 = 1 << 17 ,
93- B18 = 1 << 18 ,
94- B19 = 1 << 19 ,
95- B20 = 1 << 20 ,
96- B21 = 1 << 21 ,
97- B22 = 1 << 22 ,
98- B23 = 1 << 23 ,
99- B24 = 1 << 24 ,
100- B25 = 1 << 25 ,
101- B26 = 1 << 26 ,
102- B27 = 1 << 27 ,
103- };
62+ constexpr int32_t H = 1 << 5 ; // halfword (or byte)
63+ constexpr int32_t L = 1 << 20 ; // load (or store)
64+ constexpr int32_t S = 1 << 20 ; // set condition code (or leave unchanged)
65+ constexpr int32_t W = 1 << 21 ; // writeback base register (or leave unchanged)
66+ constexpr int32_t A = 1 << 21 ; // accumulate in multiply instruction (or not)
67+ constexpr int32_t B = 1 << 22 ; // unsigned byte (or word)
68+ constexpr int32_t D = 1 << 22 ; // high/lo bit of start of s/d register range
69+ constexpr int32_t N = 1 << 22 ; // long (or short)
70+ constexpr int32_t U = 1 << 23 ; // positive (or negative) offset/index
71+ constexpr int32_t P = 1 << 24 ; // offset/pre-indexed addressing
72+ // (or post-indexed addressing)
73+ constexpr int32_t I = 1 << 25 ; // immediate shifter operand (or not)
74+
75+ constexpr int32_t B0 = 1 ;
76+ constexpr int32_t B1 = 1 << 1 ;
77+ constexpr int32_t B2 = 1 << 2 ;
78+ constexpr int32_t B3 = 1 << 3 ;
79+ constexpr int32_t B4 = 1 << 4 ;
80+ constexpr int32_t B5 = 1 << 5 ;
81+ constexpr int32_t B6 = 1 << 6 ;
82+ constexpr int32_t B7 = 1 << 7 ;
83+ constexpr int32_t B8 = 1 << 8 ;
84+ constexpr int32_t B9 = 1 << 9 ;
85+ constexpr int32_t B10 = 1 << 10 ;
86+ constexpr int32_t B11 = 1 << 11 ;
87+ constexpr int32_t B12 = 1 << 12 ;
88+ constexpr int32_t B13 = 1 << 13 ;
89+ constexpr int32_t B14 = 1 << 14 ;
90+ constexpr int32_t B15 = 1 << 15 ;
91+ constexpr int32_t B16 = 1 << 16 ;
92+ constexpr int32_t B17 = 1 << 17 ;
93+ constexpr int32_t B18 = 1 << 18 ;
94+ constexpr int32_t B19 = 1 << 19 ;
95+ constexpr int32_t B20 = 1 << 20 ;
96+ constexpr int32_t B21 = 1 << 21 ;
97+ constexpr int32_t B22 = 1 << 22 ;
98+ constexpr int32_t B23 = 1 << 23 ;
99+ constexpr int32_t B24 = 1 << 24 ;
100+ constexpr int32_t B25 = 1 << 25 ;
101+ constexpr int32_t B26 = 1 << 26 ;
102+ constexpr int32_t B27 = 1 << 27 ;
104103
105104class ArmEncode : public AllStatic {
106105 public:
0 commit comments