157b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe/* 257b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe * Copyright (C) 2014 The Android Open Source Project 357b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe * 457b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe * Licensed under the Apache License, Version 2.0 (the "License"); 557b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe * you may not use this file except in compliance with the License. 657b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe * You may obtain a copy of the License at 757b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe * 857b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe * http://www.apache.org/licenses/LICENSE-2.0 957b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe * 1057b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe * Unless required by applicable law or agreed to in writing, software 1157b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe * distributed under the License is distributed on an "AS IS" BASIS, 1257b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1357b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe * See the License for the specific language governing permissions and 1457b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe * limitations under the License. 1557b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe */ 1657b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe 1757b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe#include "instruction_set_features_mips64.h" 1857b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe 1957b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe#include <gtest/gtest.h> 2057b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe 2157b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampenamespace art { 2257b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe 2357b34294758e9c00993913ebe43c7ee4698a5cc6Andreas GampeTEST(Mips64InstructionSetFeaturesTest, Mips64Features) { 2457b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe std::string error_msg; 2557b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe std::unique_ptr<const InstructionSetFeatures> mips64_features( 2657b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe InstructionSetFeatures::FromVariant(kMips64, "default", &error_msg)); 2757b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe ASSERT_TRUE(mips64_features.get() != nullptr) << error_msg; 2857b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe EXPECT_EQ(mips64_features->GetInstructionSet(), kMips64); 2957b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe EXPECT_TRUE(mips64_features->Equals(mips64_features.get())); 3057b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe EXPECT_STREQ("smp", mips64_features->GetFeatureString().c_str()); 3157b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe EXPECT_EQ(mips64_features->AsBitmap(), 1U); 3257b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe} 3357b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe 3457b34294758e9c00993913ebe43c7ee4698a5cc6Andreas Gampe} // namespace art 35