diff options
| author | 2015-07-23 10:44:35 +0100 | |
|---|---|---|
| committer | 2015-09-11 09:51:58 +0100 | |
| commit | 9ee23f4273efed8d6378f6ad8e63c65e30a17139 (patch) | |
| tree | 3b1bfb8a6260a57ccb2f025fcdc457464714701e /compiler/optimizing/intrinsics.cc | |
| parent | 62ba40149be3d1c65e4db1f455822a585149d32f (diff) | |
ARM/ARM64: Intrinsics - numberOfTrailingZeros, rotateLeft, rotateRight
Change-Id: I2a07c279756ee804fb7c129416bdc4a3962e93ed
Diffstat (limited to 'compiler/optimizing/intrinsics.cc')
| -rw-r--r-- | compiler/optimizing/intrinsics.cc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/compiler/optimizing/intrinsics.cc b/compiler/optimizing/intrinsics.cc index 075ec1ee2e..2dd4bbabdb 100644 --- a/compiler/optimizing/intrinsics.cc +++ b/compiler/optimizing/intrinsics.cc @@ -120,6 +120,28 @@ static Intrinsics GetIntrinsic(InlineMethod method, InstructionSet instruction_s LOG(FATAL) << "Unknown/unsupported op size " << method.d.data; UNREACHABLE(); } + case kIntrinsicRotateRight: + switch (GetType(method.d.data, true)) { + case Primitive::kPrimInt: + return Intrinsics::kIntegerRotateRight; + case Primitive::kPrimLong: + return Intrinsics::kLongRotateRight; + default: + LOG(FATAL) << "Unknown/unsupported op size " << method.d.data; + UNREACHABLE(); + } + case kIntrinsicRotateLeft: + switch (GetType(method.d.data, true)) { + case Primitive::kPrimInt: + return Intrinsics::kIntegerRotateLeft; + case Primitive::kPrimLong: + return Intrinsics::kLongRotateLeft; + default: + LOG(FATAL) << "Unknown/unsupported op size " << method.d.data; + UNREACHABLE(); + } + + // Misc data processing. case kIntrinsicNumberOfLeadingZeros: switch (GetType(method.d.data, true)) { case Primitive::kPrimInt: @@ -130,6 +152,16 @@ static Intrinsics GetIntrinsic(InlineMethod method, InstructionSet instruction_s LOG(FATAL) << "Unknown/unsupported op size " << method.d.data; UNREACHABLE(); } + case kIntrinsicNumberOfTrailingZeros: + switch (GetType(method.d.data, true)) { + case Primitive::kPrimInt: + return Intrinsics::kIntegerNumberOfTrailingZeros; + case Primitive::kPrimLong: + return Intrinsics::kLongNumberOfTrailingZeros; + default: + LOG(FATAL) << "Unknown/unsupported op size " << method.d.data; + UNREACHABLE(); + } // Abs. case kIntrinsicAbsDouble: |