[llvm] r205134 - ARM64: uncopy/paste helper function
Tim Northover
tnorthover at apple.com
Sun Mar 30 01:30:30 PDT 2014
Author: tnorthover
Date: Sun Mar 30 03:30:28 2014
New Revision: 205134
URL: http://llvm.org/viewvc/llvm-project?rev=205134&view=rev
Log:
ARM64: uncopy/paste helper function
It was doing functional but highly suspect operations on bools due to
the more limited shifting operands supported by memory instructions.
Should fix some MSVC warnings.
Modified:
llvm/trunk/lib/Target/ARM64/MCTargetDesc/ARM64AddressingModes.h
Modified: llvm/trunk/lib/Target/ARM64/MCTargetDesc/ARM64AddressingModes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM64/MCTargetDesc/ARM64AddressingModes.h?rev=205134&r1=205133&r2=205134&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM64/MCTargetDesc/ARM64AddressingModes.h (original)
+++ llvm/trunk/lib/Target/ARM64/MCTargetDesc/ARM64AddressingModes.h Sun Mar 30 03:30:28 2014
@@ -149,7 +149,7 @@ static inline ARM64_AM::ExtendType getMe
}
/// getExtendImm - Encode the extend type and amount for a load/store inst:
-/// imm: 3-bit extend amount
+/// doshift: should the offset be scaled by the access size
/// shifter: 000 ==> uxtb
/// 001 ==> uxth
/// 010 ==> uxtw
@@ -159,10 +159,9 @@ static inline ARM64_AM::ExtendType getMe
/// 110 ==> sxtw
/// 111 ==> sxtx
/// {3-1} = shifter
-/// {0} = imm3
-static inline unsigned getMemExtendImm(ARM64_AM::ExtendType ET, bool Imm) {
- assert((Imm & 0x7) == Imm && "Illegal shifted immedate value!");
- return (unsigned(ET) << 1) | (Imm & 0x7);
+/// {0} = doshift
+static inline unsigned getMemExtendImm(ARM64_AM::ExtendType ET, bool DoShift) {
+ return (unsigned(ET) << 1) | unsigned(DoShift);
}
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list