Rename the narrow shift right immediate operands to "shr_imm*" operands. Also

expand the testing of the narrowing shift right instructions.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127193 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2011-03-07 23:38:41 +00:00
parent 0d8ccaa5c8
commit 3116dce338
6 changed files with 53 additions and 32 deletions

View File

@@ -221,20 +221,25 @@ def neg_zero : Operand<i32> {
let PrintMethod = "printNegZeroOperand";
}
// Narrow Shift Right Immediate - A narrow shift right immediate is encoded
// differently from other shift immediates. The imm6 field is encoded like so:
// Shift Right Immediate - A shift right immediate is encoded differently from
// other shift immediates. The imm6 field is encoded like so:
//
// 16-bit: imm6<5:3> = '001', 8 - <imm> is encded in imm6<2:0>
// 32-bit: imm6<5:4> = '01',16 - <imm> is encded in imm6<3:0>
// 64-bit: imm6<5> = '1', 32 - <imm> is encded in imm6<4:0>
def nsr16_imm : Operand<i32> {
let EncoderMethod = "getNarrowShiftRight16Imm";
// Offset Encoding
// 8 imm6<5:3> = '001', 8 - <imm> is encoded in imm6<2:0>
// 16 imm6<5:4> = '01', 16 - <imm> is encoded in imm6<3:0>
// 32 imm6<5> = '1', 32 - <imm> is encoded in imm6<4:0>
// 64 64 - <imm> is encoded in imm6<5:0>
def shr_imm8 : Operand<i32> {
let EncoderMethod = "getShiftRight8Imm";
}
def nsr32_imm : Operand<i32> {
let EncoderMethod = "getNarrowShiftRight32Imm";
def shr_imm16 : Operand<i32> {
let EncoderMethod = "getShiftRight16Imm";
}
def nsr64_imm : Operand<i32> {
let EncoderMethod = "getNarrowShiftRight64Imm";
def shr_imm32 : Operand<i32> {
let EncoderMethod = "getShiftRight32Imm";
}
def shr_imm64 : Operand<i32> {
let EncoderMethod = "getShiftRight64Imm";
}
//===----------------------------------------------------------------------===//