Home
last modified time | relevance | path

Searched refs:constant (Results 1 – 25 of 73) sorted by relevance

123

/art/test/952-invoke-custom/util-src/transformer/
DIndyTransformer.java129 private Object decodeConstant(int index, Constant constant) { in visitMethod() argument
130 if (constant.booleanValue().length == 1) { in visitMethod()
131 return constant.booleanValue()[0]; in visitMethod()
132 } else if (constant.byteValue().length == 1) { in visitMethod()
133 return constant.byteValue()[0]; in visitMethod()
134 } else if (constant.charValue().length == 1) { in visitMethod()
135 return constant.charValue()[0]; in visitMethod()
136 } else if (constant.shortValue().length == 1) { in visitMethod()
137 return constant.shortValue()[0]; in visitMethod()
138 } else if (constant.intValue().length == 1) { in visitMethod()
[all …]
/art/test/436-shift-constant/
DAndroid.bp3 // Build rules for ART run-test `436-shift-constant`.
16 name: "art-run-test-436-shift-constant",
21 ":art-run-test-436-shift-constant-expected-stdout",
22 ":art-run-test-436-shift-constant-expected-stderr",
28 name: "art-run-test-436-shift-constant-expected-stdout",
29 out: ["art-run-test-436-shift-constant-expected-stdout.txt"],
36 name: "art-run-test-436-shift-constant-expected-stderr",
37 out: ["art-run-test-436-shift-constant-expected-stderr.txt"],
/art/test/614-checker-dump-constant-location/
DAndroid.bp3 // Build rules for ART run-test `614-checker-dump-constant-location`.
16 name: "art-run-test-614-checker-dump-constant-location",
21 ":art-run-test-614-checker-dump-constant-location-expected-stdout",
22 ":art-run-test-614-checker-dump-constant-location-expected-stderr",
31 name: "art-run-test-614-checker-dump-constant-location-expected-stdout",
32 out: ["art-run-test-614-checker-dump-constant-location-expected-stdout.txt"],
39 name: "art-run-test-614-checker-dump-constant-location-expected-stderr",
40 out: ["art-run-test-614-checker-dump-constant-location-expected-stderr.txt"],
Dinfo.txt1 Test that the graph visualizer outputs useful information for constant
/art/compiler/optimizing/
Dlocations.cc65 HConstant* constant = instruction->AsConstant(); in RegisterOrInt32Constant() local
66 if (constant != nullptr) { in RegisterOrInt32Constant()
67 int64_t value = CodeGenerator::GetInt64ValueOf(constant); in RegisterOrInt32Constant()
69 return Location::ConstantLocation(constant); in RegisterOrInt32Constant()
76 HConstant* constant = instruction->AsConstant(); in FpuRegisterOrInt32Constant() local
77 if (constant != nullptr) { in FpuRegisterOrInt32Constant()
78 int64_t value = CodeGenerator::GetInt64ValueOf(constant); in FpuRegisterOrInt32Constant()
80 return Location::ConstantLocation(constant); in FpuRegisterOrInt32Constant()
Dcommon_arm64.h254 inline bool Arm64CanEncodeConstantAsImmediate(HConstant* constant, HInstruction* instr) { in Arm64CanEncodeConstantAsImmediate() argument
255 int64_t value = CodeGenerator::GetInt64ValueOf(constant); in Arm64CanEncodeConstantAsImmediate()
259 if (constant->IsLongConstant()) { in Arm64CanEncodeConstantAsImmediate()
261 } else if (constant->IsFloatConstant()) { in Arm64CanEncodeConstantAsImmediate()
262 return vixl::aarch64::Assembler::IsImmFP32(constant->AsFloatConstant()->GetValue()); in Arm64CanEncodeConstantAsImmediate()
263 } else if (constant->IsDoubleConstant()) { in Arm64CanEncodeConstantAsImmediate()
264 return vixl::aarch64::Assembler::IsImmFP64(constant->AsDoubleConstant()->GetValue()); in Arm64CanEncodeConstantAsImmediate()
273 if (constant->GetUses().HasExactlyOneElement()) { in Arm64CanEncodeConstantAsImmediate()
280 return constant->IsZeroBitPattern() || constant->IsOne() || constant->IsMinusOne(); in Arm64CanEncodeConstantAsImmediate()
285 if (constant->GetUses().HasExactlyOneElement()) { in Arm64CanEncodeConstantAsImmediate()
[all …]
Dconstant_folding.cc94 HConstant* constant = inst->TryStaticEvaluation(); in VisitUnaryOperation() local
95 if (constant != nullptr) { in VisitUnaryOperation()
96 inst->ReplaceWith(constant); in VisitUnaryOperation()
104 HConstant* constant = inst->TryStaticEvaluation(); in VisitBinaryOperation() local
105 if (constant != nullptr) { in VisitBinaryOperation()
106 inst->ReplaceWith(constant); in VisitBinaryOperation()
117 HConstant* constant = inst->TryStaticEvaluation(); in VisitTypeConversion() local
118 if (constant != nullptr) { in VisitTypeConversion()
119 inst->ReplaceWith(constant); in VisitTypeConversion()
Dcode_generator.h525 static int8_t GetInt8ValueOf(HConstant* constant) { in GetInt8ValueOf() argument
526 DCHECK(constant->IsIntConstant()); in GetInt8ValueOf()
527 return constant->AsIntConstant()->GetValue(); in GetInt8ValueOf()
530 static int16_t GetInt16ValueOf(HConstant* constant) { in GetInt16ValueOf() argument
531 DCHECK(constant->IsIntConstant()); in GetInt16ValueOf()
532 return constant->AsIntConstant()->GetValue(); in GetInt16ValueOf()
535 static int32_t GetInt32ValueOf(HConstant* constant) { in GetInt32ValueOf() argument
536 if (constant->IsIntConstant()) { in GetInt32ValueOf()
537 return constant->AsIntConstant()->GetValue(); in GetInt32ValueOf()
538 } else if (constant->IsNullConstant()) { in GetInt32ValueOf()
[all …]
Dssa_builder.cc606 HFloatConstant* SsaBuilder::GetFloatEquivalent(HIntConstant* constant) { in GetFloatEquivalent() argument
608 HFloatConstant* result = constant->GetNext()->AsFloatConstant(); in GetFloatEquivalent()
610 float value = bit_cast<float, int32_t>(constant->GetValue()); in GetFloatEquivalent()
612 constant->GetBlock()->InsertInstructionBefore(result, constant->GetNext()); in GetFloatEquivalent()
617 DCHECK_EQ((bit_cast<int32_t, float>(result->GetValue())), constant->GetValue()); in GetFloatEquivalent()
628 HDoubleConstant* SsaBuilder::GetDoubleEquivalent(HLongConstant* constant) { in GetDoubleEquivalent() argument
630 HDoubleConstant* result = constant->GetNext()->AsDoubleConstant(); in GetDoubleEquivalent()
632 double value = bit_cast<double, int64_t>(constant->GetValue()); in GetDoubleEquivalent()
634 constant->GetBlock()->InsertInstructionBefore(result, constant->GetNext()); in GetDoubleEquivalent()
639 DCHECK_EQ((bit_cast<int64_t, double>(result->GetValue())), constant->GetValue()); in GetDoubleEquivalent()
Dssa_test.cc57 void VisitIntConstant(HIntConstant* constant) override { in VisitIntConstant() argument
58 PrintPreInstruction(constant); in VisitIntConstant()
59 str_ += constant->DebugName(); in VisitIntConstant()
61 PrintInt(constant->GetValue()); in VisitIntConstant()
62 PrintPostInstruction(constant); in VisitIntConstant()
/art/test/957-methodhandle-transforms/src/
DMain.java553 MethodHandle constant = MethodHandles.constant(int.class, 56); in testConstant() local
554 int value = (int) constant.invoke(); in testConstant()
560 constant = MethodHandles.constant(int.class, (short) 52); in testConstant()
561 value = (int) constant.invoke(); in testConstant()
567 constant = MethodHandles.constant(int.class, (char) 'b'); in testConstant()
568 value = (int) constant.invoke(); in testConstant()
574 constant = MethodHandles.constant(int.class, (byte) 0x1); in testConstant()
575 value = (int) constant.invoke(); in testConstant()
583 MethodHandles.constant(int.class, false); in testConstant()
589 MethodHandles.constant(int.class, 0.1f); in testConstant()
[all …]
/art/test/302-float-conversion/
Dinfo.txt1 Tests whether constant conversions of double values to long values are
3 should not overflow under constant conversions.
/art/tools/dexfuzz/src/dexfuzz/rawdex/formats/
DFormat11n.java53 public void setConst(Instruction insn, long constant) { in setConst() argument
54 insn.vregB = constant; in setConst()
DFormat31i.java54 public void setConst(Instruction insn, long constant) { in setConst() argument
55 insn.vregB = constant; in setConst()
DFormat21s.java54 public void setConst(Instruction insn, long constant) { in setConst() argument
55 insn.vregB = constant; in setConst()
DFormat21h.java54 public void setConst(Instruction insn, long constant) { in setConst() argument
55 insn.vregB = constant; in setConst()
DFormat22b.java55 public void setConst(Instruction insn, long constant) { in setConst() argument
56 insn.vregC = constant; in setConst()
DFormat22s.java54 public void setConst(Instruction insn, long constant) { in setConst() argument
55 insn.vregC = constant; in setConst()
DFormat51l.java57 public void setConst(Instruction insn, long constant) { in setConst() argument
58 insn.vregB = constant; in setConst()
DContainsConst.java29 public void setConst(Instruction insn, long constant); in setConst() argument
/art/test/442-checker-constant-folding/
Dinfo.txt1 Tests constant folding in the optimizing compiler.
/art/test/685-shifts/
Dinfo.txt1 Tests for the compiler when shift instructions have 0 or 1 as constant shifts.
/art/test/475-simplify-mul-zero/
Dinfo.txt2 Mul should expect zero constant as input.
/art/test/646-checker-long-const-to-int/
Dinfo.txt1 Regression test for bogus checks that a constant input of long-to-int conversion fits into int.
/art/test/411-checker-hdiv-hrem-const/
Dinfo.txt2 the denominator is a constant, not power of 2.

123