aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanak@gmail.com>2011-08-18 20:07:42 +0000
committerAkira Hatanaka <ahatanak@gmail.com>2011-08-18 20:07:42 +0000
commitdbe9a316834c79a2a3404fd484424e6c4bf49f5f (patch)
treebe8f9988cef6a84df07cddab01965e3095240c3d
parent847a7ad8003aee177ed93a83c77c0e062fc46a34 (diff)
Make IsShiftedMask a static function rather than defining it in an
anonymous namespace. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137975 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/Mips/MipsISelLowering.cpp30
1 files changed, 14 insertions, 16 deletions
diff --git a/lib/Target/Mips/MipsISelLowering.cpp b/lib/Target/Mips/MipsISelLowering.cpp
index cbd1f3edc7..97b5a145ab 100644
--- a/lib/Target/Mips/MipsISelLowering.cpp
+++ b/lib/Target/Mips/MipsISelLowering.cpp
@@ -35,22 +35,20 @@
#include "llvm/Support/ErrorHandling.h"
using namespace llvm;
-namespace {
- // If I is a shifted mask, set the size (Size) and the first bit of the
- // mask (Pos), and return true.
- bool IsShiftedMask(uint64_t I, unsigned SizeInBits, uint64_t &Pos,
- uint64_t &Size) {
- assert(SizeInBits == 32 || SizeInBits == 64);
- bool Is32Bits = (SizeInBits == 32);
-
- if ((Is32Bits == 32 && !isShiftedMask_32(I)) ||
- (!Is32Bits && !isShiftedMask_64(I)))
- return false;
-
- Size = Is32Bits ? CountPopulation_32(I) : CountPopulation_64(I);
- Pos = Is32Bits ? CountTrailingZeros_32(I) : CountTrailingZeros_64(I);
- return true;
- }
+// If I is a shifted mask, set the size (Size) and the first bit of the
+// mask (Pos), and return true.
+static bool IsShiftedMask(uint64_t I, unsigned SizeInBits, uint64_t &Pos,
+ uint64_t &Size) {
+ assert(SizeInBits == 32 || SizeInBits == 64);
+ bool Is32Bits = (SizeInBits == 32);
+
+ if ((Is32Bits == 32 && !isShiftedMask_32(I)) ||
+ (!Is32Bits && !isShiftedMask_64(I)))
+ return false;
+
+ Size = Is32Bits ? CountPopulation_32(I) : CountPopulation_64(I);
+ Pos = Is32Bits ? CountTrailingZeros_32(I) : CountTrailingZeros_64(I);
+ return true;
}
const char *MipsTargetLowering::getTargetNodeName(unsigned Opcode) const {