Lines Matching refs:value

112 LIR* Arm64Mir2Lir::LoadFPConstantValue(RegStorage r_dest, int32_t value) {  in LoadFPConstantValue()  argument
114 if (value == 0) { in LoadFPConstantValue()
117 int32_t encoded_imm = EncodeImmSingle((uint32_t)value); in LoadFPConstantValue()
123 LIR* data_target = ScanLiteralPool(literal_list_, value, 0); in LoadFPConstantValue()
126 data_target = AddWideData(&literal_list_, value, 0); in LoadFPConstantValue()
136 LIR* Arm64Mir2Lir::LoadFPConstantValueWide(RegStorage r_dest, int64_t value) { in LoadFPConstantValueWide() argument
138 if (value == 0) { in LoadFPConstantValueWide()
141 int32_t encoded_imm = EncodeImmDouble(value); in LoadFPConstantValueWide()
148 int32_t val_lo = Low32Bits(value); in LoadFPConstantValueWide()
149 int32_t val_hi = High32Bits(value); in LoadFPConstantValueWide()
162 static int CountLeadingZeros(bool is_wide, uint64_t value) { in CountLeadingZeros() argument
163 return (is_wide) ? __builtin_clzll(value) : __builtin_clz((uint32_t)value); in CountLeadingZeros()
166 static int CountTrailingZeros(bool is_wide, uint64_t value) { in CountTrailingZeros() argument
167 return (is_wide) ? __builtin_ctzll(value) : __builtin_ctz((uint32_t)value); in CountTrailingZeros()
170 static int CountSetBits(bool is_wide, uint64_t value) { in CountSetBits() argument
172 __builtin_popcountll(value) : __builtin_popcount((uint32_t)value)); in CountSetBits()
184 int Arm64Mir2Lir::EncodeLogicalImmediate(bool is_wide, uint64_t value) { in EncodeLogicalImmediate() argument
208 if (value == 0 || value == ~UINT64_C(0) || in EncodeLogicalImmediate()
209 (!is_wide && (uint32_t)value == ~UINT32_C(0))) { in EncodeLogicalImmediate()
213 unsigned lead_zero = CountLeadingZeros(is_wide, value); in EncodeLogicalImmediate()
214 unsigned lead_one = CountLeadingZeros(is_wide, ~value); in EncodeLogicalImmediate()
215 unsigned trail_zero = CountTrailingZeros(is_wide, value); in EncodeLogicalImmediate()
216 unsigned trail_one = CountTrailingZeros(is_wide, ~value); in EncodeLogicalImmediate()
217 unsigned set_bits = CountSetBits(is_wide, value); in EncodeLogicalImmediate()
232 imm_r = (value & 3) - 1; in EncodeLogicalImmediate()
260 if ((value & mask) == ((value >> (width >> 1)) & mask)) { in EncodeLogicalImmediate()
287 static int GetNumFastHalfWords(uint64_t value) { in GetNumFastHalfWords() argument
291 uint16_t halfword = static_cast<uint16_t>(value >> shift); in GetNumFastHalfWords()
311 bool Arm64Mir2Lir::InexpensiveConstantInt(int32_t value ATTRIBUTE_UNUSED) { in InexpensiveConstantInt()
317 bool Arm64Mir2Lir::InexpensiveConstantFloat(int32_t value) { in InexpensiveConstantFloat() argument
318 return EncodeImmSingle(value) >= 0; in InexpensiveConstantFloat()
321 bool Arm64Mir2Lir::InexpensiveConstantLong(int64_t value) { in InexpensiveConstantLong() argument
322 int num_slow_halfwords = 4 - (GetNumFastHalfWords(value) & 0x7); in InexpensiveConstantLong()
326 return (EncodeLogicalImmediate(/*is_wide=*/true, value) >= 0); in InexpensiveConstantLong()
329 bool Arm64Mir2Lir::InexpensiveConstantDouble(int64_t value) { in InexpensiveConstantDouble() argument
330 return EncodeImmDouble(value) >= 0; in InexpensiveConstantDouble()
336 bool Arm64Mir2Lir::InexpensiveConstantInt(int32_t value, Instruction::Code opcode) { in InexpensiveConstantInt() argument
350 uint32_t abs_value = (value == INT_MIN) ? value : std::abs(value); in InexpensiveConstantInt()
377 if (value == 0 || value == INT32_C(-1)) { in InexpensiveConstantInt()
380 return (EncodeLogicalImmediate(/*is_wide=*/false, value) >= 0); in InexpensiveConstantInt()
394 LIR* Arm64Mir2Lir::LoadConstantNoClobber(RegStorage r_dest, int value) { in LoadConstantNoClobber() argument
398 return LoadFPConstantValue(r_dest, value); in LoadConstantNoClobber()
402 return LoadConstantWide(r_dest, value); in LoadConstantNoClobber()
410 uint16_t high_bits = High16Bits(value); in LoadConstantNoClobber()
411 uint16_t low_bits = Low16Bits(value); in LoadConstantNoClobber()
444 int log_imm = EncodeLogicalImmediate(/*is_wide=*/false, value); in LoadConstantNoClobber()
458 LIR* Arm64Mir2Lir::LoadConstantWide(RegStorage r_dest, int64_t value) { in LoadConstantWide() argument
460 return LoadFPConstantValueWide(r_dest, value); in LoadConstantWide()
469 if (LIKELY(value == INT64_C(0) || value == INT64_C(-1))) { in LoadConstantWide()
471 A64Opcode opcode = LIKELY(value == 0) ? WIDE(kA64Mov2rr) : WIDE(kA64Mvn2rr); in LoadConstantWide()
476 uint64_t uvalue = static_cast<uint64_t>(value); in LoadConstantWide()
483 int log_imm = EncodeLogicalImmediate(/*is_wide=*/true, value); in LoadConstantWide()
525 int32_t val_lo = Low32Bits(value); in LoadConstantWide()
526 int32_t val_hi = High32Bits(value); in LoadConstantWide()
805 LIR* Arm64Mir2Lir::OpRegRegImm(OpKind op, RegStorage r_dest, RegStorage r_src1, int value) { in OpRegRegImm() argument
806 return OpRegRegImm64(op, r_dest, r_src1, static_cast<int64_t>(value)); in OpRegRegImm()
809 LIR* Arm64Mir2Lir::OpRegRegImm64(OpKind op, RegStorage r_dest, RegStorage r_src1, int64_t value) { in OpRegRegImm64() argument
811 bool neg = (value < 0); in OpRegRegImm64()
812 uint64_t abs_value = (neg & !(value == LLONG_MIN)) ? -value : value; in OpRegRegImm64()
827 (-value) & max_value, max_value - value); in OpRegRegImm64()
830 return NewLIR3(kA64Lsr3rrd | wide, r_dest.GetReg(), r_src1.GetReg(), value); in OpRegRegImm64()
832 return NewLIR3(kA64Asr3rrd | wide, r_dest.GetReg(), r_src1.GetReg(), value); in OpRegRegImm64()
837 value); in OpRegRegImm64()
884 int log_imm = EncodeLogicalImmediate(is_wide, value); in OpRegRegImm64()
890 if (value == 0) { in OpRegRegImm64()
901 } else if (value == INT64_C(-1) in OpRegRegImm64()
902 || (!is_wide && static_cast<uint32_t>(value) == ~UINT32_C(0))) { in OpRegRegImm64()
922 LoadConstantWide(r_scratch, value); in OpRegRegImm64()
925 LoadConstant(r_scratch, value); in OpRegRegImm64()
935 LIR* Arm64Mir2Lir::OpRegImm(OpKind op, RegStorage r_dest_src1, int value) { in OpRegImm() argument
936 return OpRegImm64(op, r_dest_src1, static_cast<int64_t>(value)); in OpRegImm()
939 LIR* Arm64Mir2Lir::OpRegImm64(OpKind op, RegStorage r_dest_src1, int64_t value) { in OpRegImm64() argument
944 bool neg = (value < 0); in OpRegImm64()
945 uint64_t abs_value = (neg & !(value == LLONG_MIN)) ? -value : value; in OpRegImm64()
970 res = LoadConstantWide(r_tmp, value); in OpRegImm64()
973 res = LoadConstant(r_tmp, value); in OpRegImm64()