From 3ef39ca6a119caced345e35204e170ee3ad9aa29 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 18 Dec 2006 11:07:09 +0000 Subject: [PATCH] macros -> Inline functions Lauros's patch git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32656 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMRegisterInfo.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/lib/Target/ARM/ARMRegisterInfo.cpp b/lib/Target/ARM/ARMRegisterInfo.cpp index 47090b2488c..73fd7a4899d 100644 --- a/lib/Target/ARM/ARMRegisterInfo.cpp +++ b/lib/Target/ARM/ARMRegisterInfo.cpp @@ -35,9 +35,13 @@ static bool hasFP(const MachineFunction &MF) { return NoFramePointerElim || MFI->hasVarSizedObjects(); } -#define ROTATE32L(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) +static inline unsigned rotateL(unsigned x, unsigned n){ + return ((x << n) | (x >> (32 - n))); +} -#define ROTATE32R(x, n) (((x) >> (n)) | ((x) << (32 - (n)))) +static inline unsigned rotateR(unsigned x, unsigned n){ + return ((x >> n) | (x << (32 - n))); +} // finds the end position of largest sequence of zeros in binary representation // of 'immediate'. @@ -50,19 +54,19 @@ static int findLargestZeroSequence(unsigned immediate){ int end_pos; while ((immediate & 0x3) == 0) { - immediate = ROTATE32R(immediate, 2); + immediate = rotateR(immediate, 2); pos+=2; } end_pos = pos+32; while (pos