[SystemZ] Add MC support for LEDBRA, LEXBRA and LDXBRA

These instructions aren't used for codegen since the original L*DB instructions
are suitable for fround.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212703 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Richard Sandiford 2014-07-10 11:00:55 +00:00
parent beefa3ada0
commit 9aa8beb9d6
5 changed files with 172 additions and 0 deletions

View File

@ -133,6 +133,13 @@ def LEDBR : UnaryRRE<"ledb", 0xB344, fround, FP32, FP64>;
def LEXBR : UnaryRRE<"lexb", 0xB346, null_frag, FP128, FP128>;
def LDXBR : UnaryRRE<"ldxb", 0xB345, null_frag, FP128, FP128>;
def LEDBRA : UnaryRRF4<"ledbra", 0xB344, FP32, FP64>,
Requires<[FeatureFPExtension]>;
def LEXBRA : UnaryRRF4<"lexbra", 0xB346, FP128, FP128>,
Requires<[FeatureFPExtension]>;
def LDXBRA : UnaryRRF4<"ldxbra", 0xB345, FP128, FP128>,
Requires<[FeatureFPExtension]>;
def : Pat<(f32 (fround FP128:$src)),
(EXTRACT_SUBREG (LEXBR FP128:$src), subreg_hh32)>;
def : Pat<(f64 (fround FP128:$src)),

View File

@ -3355,6 +3355,24 @@
# CHECK: ldxbr %f13, %f13
0xb3 0x45 0x00 0xdd
# CHECK: ldxbra %f0, 0, %f0, 1
0xb3 0x45 0x01 0x00
# CHECK: ldxbra %f0, 0, %f0, 15
0xb3 0x45 0x0f 0x00
# CHECK: ldxbra %f0, 0, %f13, 1
0xb3 0x45 0x01 0x0d
# CHECK: ldxbra %f0, 15, %f0, 1
0xb3 0x45 0xf1 0x00
# CHECK: ldxbra %f4, 5, %f8, 9
0xb3 0x45 0x59 0x48
# CHECK: ldxbra %f13, 0, %f0, 1
0xb3 0x45 0x01 0xd0
# CHECK: ldy %f0, -524288
0xed 0x00 0x00 0x00 0x80 0x65
@ -3400,6 +3418,24 @@
# CHECK: ledbr %f15, %f15
0xb3 0x44 0x00 0xff
# CHECK: ledbra %f0, 0, %f0, 1
0xb3 0x44 0x01 0x00
# CHECK: ledbra %f0, 0, %f0, 15
0xb3 0x44 0x0f 0x00
# CHECK: ledbra %f0, 0, %f15, 1
0xb3 0x44 0x01 0x0f
# CHECK: ledbra %f0, 15, %f0, 1
0xb3 0x44 0xf1 0x00
# CHECK: ledbra %f4, 5, %f6, 7
0xb3 0x44 0x57 0x46
# CHECK: ledbra %f15, 0, %f0, 1
0xb3 0x44 0x01 0xf0
# CHECK: ler %f0, %f9
0x38 0x09
@ -3448,6 +3484,24 @@
# CHECK: lexbr %f13, %f13
0xb3 0x46 0x00 0xdd
# CHECK: lexbra %f0, 0, %f0, 1
0xb3 0x46 0x01 0x00
# CHECK: lexbra %f0, 0, %f0, 15
0xb3 0x46 0x0f 0x00
# CHECK: lexbra %f0, 0, %f13, 1
0xb3 0x46 0x01 0x0d
# CHECK: lexbra %f0, 15, %f0, 1
0xb3 0x46 0xf1 0x00
# CHECK: lexbra %f4, 5, %f8, 9
0xb3 0x46 0x59 0x48
# CHECK: lexbra %f13, 0, %f0, 1
0xb3 0x46 0x01 0xd0
# CHECK: ley %f0, -524288
0xed 0x00 0x00 0x00 0x80 0x64

View File

@ -410,6 +410,60 @@
lbh %r0, -524289
lbh %r0, 524288
#CHECK: error: invalid operand
#CHECK: ldxbra %f0, 0, %f0, -1
#CHECK: error: invalid operand
#CHECK: ldxbra %f0, 0, %f0, 16
#CHECK: error: invalid operand
#CHECK: ldxbra %f0, -1, %f0, 0
#CHECK: error: invalid operand
#CHECK: ldxbra %f0, 16, %f0, 0
#CHECK: error: invalid register pair
#CHECK: ldxbra %f0, 0, %f2, 0
#CHECK: error: invalid register pair
#CHECK: ldxbra %f2, 0, %f0, 0
ldxbra %f0, 0, %f0, -1
ldxbra %f0, 0, %f0, 16
ldxbra %f0, -1, %f0, 0
ldxbra %f0, 16, %f0, 0
ldxbra %f0, 0, %f2, 0
ldxbra %f2, 0, %f0, 0
#CHECK: error: invalid operand
#CHECK: ledbra %f0, 0, %f0, -1
#CHECK: error: invalid operand
#CHECK: ledbra %f0, 0, %f0, 16
#CHECK: error: invalid operand
#CHECK: ledbra %f0, -1, %f0, 0
#CHECK: error: invalid operand
#CHECK: ledbra %f0, 16, %f0, 0
ledbra %f0, 0, %f0, -1
ledbra %f0, 0, %f0, 16
ledbra %f0, -1, %f0, 0
ledbra %f0, 16, %f0, 0
#CHECK: error: invalid operand
#CHECK: lexbra %f0, 0, %f0, -1
#CHECK: error: invalid operand
#CHECK: lexbra %f0, 0, %f0, 16
#CHECK: error: invalid operand
#CHECK: lexbra %f0, -1, %f0, 0
#CHECK: error: invalid operand
#CHECK: lexbra %f0, 16, %f0, 0
#CHECK: error: invalid register pair
#CHECK: lexbra %f0, 0, %f2, 0
#CHECK: error: invalid register pair
#CHECK: lexbra %f2, 0, %f0, 0
lexbra %f0, 0, %f0, -1
lexbra %f0, 0, %f0, 16
lexbra %f0, -1, %f0, 0
lexbra %f0, 16, %f0, 0
lexbra %f0, 0, %f2, 0
lexbra %f2, 0, %f0, 0
#CHECK: error: invalid operand
#CHECK: lfh %r0, -524289
#CHECK: error: invalid operand

View File

@ -1560,6 +1560,11 @@
ldxbr %f0, %f2
ldxbr %f2, %f0
#CHECK: error: {{(instruction requires: fp-extension)?}}
#CHECK: ldxbra %f0, 0, %f0, 0
ldxbra %f0, 0, %f0, 0
#CHECK: error: invalid operand
#CHECK: ldy %f0, -524289
#CHECK: error: invalid operand
@ -1576,6 +1581,11 @@
le %f0, -1
le %f0, 4096
#CHECK: error: {{(instruction requires: fp-extension)?}}
#CHECK: ledbra %f0, 0, %f0, 0
ledbra %f0, 0, %f0, 0
#CHECK: error: invalid register pair
#CHECK: lexbr %f0, %f2
#CHECK: error: invalid register pair
@ -1584,6 +1594,11 @@
lexbr %f0, %f2
lexbr %f2, %f0
#CHECK: error: {{(instruction requires: fp-extension)?}}
#CHECK: lexbra %f0, 0, %f0, 0
lexbra %f0, 0, %f0, 0
#CHECK: error: invalid operand
#CHECK: ley %f0, -524289
#CHECK: error: invalid operand

View File

@ -675,6 +675,48 @@
lbh %r0, 524287(%r15,%r1)
lbh %r15, 0
#CHECK: ldxbra %f0, 0, %f0, 0 # encoding: [0xb3,0x45,0x00,0x00]
#CHECK: ldxbra %f0, 0, %f0, 15 # encoding: [0xb3,0x45,0x0f,0x00]
#CHECK: ldxbra %f0, 0, %f13, 0 # encoding: [0xb3,0x45,0x00,0x0d]
#CHECK: ldxbra %f0, 15, %f0, 0 # encoding: [0xb3,0x45,0xf0,0x00]
#CHECK: ldxbra %f4, 5, %f8, 9 # encoding: [0xb3,0x45,0x59,0x48]
#CHECK: ldxbra %f13, 0, %f0, 0 # encoding: [0xb3,0x45,0x00,0xd0]
ldxbra %f0, 0, %f0, 0
ldxbra %f0, 0, %f0, 15
ldxbra %f0, 0, %f13, 0
ldxbra %f0, 15, %f0, 0
ldxbra %f4, 5, %f8, 9
ldxbra %f13, 0, %f0, 0
#CHECK: ledbra %f0, 0, %f0, 0 # encoding: [0xb3,0x44,0x00,0x00]
#CHECK: ledbra %f0, 0, %f0, 15 # encoding: [0xb3,0x44,0x0f,0x00]
#CHECK: ledbra %f0, 0, %f15, 0 # encoding: [0xb3,0x44,0x00,0x0f]
#CHECK: ledbra %f0, 15, %f0, 0 # encoding: [0xb3,0x44,0xf0,0x00]
#CHECK: ledbra %f4, 5, %f6, 7 # encoding: [0xb3,0x44,0x57,0x46]
#CHECK: ledbra %f15, 0, %f0, 0 # encoding: [0xb3,0x44,0x00,0xf0]
ledbra %f0, 0, %f0, 0
ledbra %f0, 0, %f0, 15
ledbra %f0, 0, %f15, 0
ledbra %f0, 15, %f0, 0
ledbra %f4, 5, %f6, 7
ledbra %f15, 0, %f0, 0
#CHECK: lexbra %f0, 0, %f0, 0 # encoding: [0xb3,0x46,0x00,0x00]
#CHECK: lexbra %f0, 0, %f0, 15 # encoding: [0xb3,0x46,0x0f,0x00]
#CHECK: lexbra %f0, 0, %f13, 0 # encoding: [0xb3,0x46,0x00,0x0d]
#CHECK: lexbra %f0, 15, %f0, 0 # encoding: [0xb3,0x46,0xf0,0x00]
#CHECK: lexbra %f4, 5, %f8, 9 # encoding: [0xb3,0x46,0x59,0x48]
#CHECK: lexbra %f13, 0, %f0, 0 # encoding: [0xb3,0x46,0x00,0xd0]
lexbra %f0, 0, %f0, 0
lexbra %f0, 0, %f0, 15
lexbra %f0, 0, %f13, 0
lexbra %f0, 15, %f0, 0
lexbra %f4, 5, %f8, 9
lexbra %f13, 0, %f0, 0
#CHECK: lfh %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0xca]
#CHECK: lfh %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0xca]
#CHECK: lfh %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0xca]