mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 21:35:07 +00:00
X86: Make sure we account for the FMA4 register immediate value, otherwise rip-rel relocations will be off by one byte.
PR15040. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173176 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9dd2a3b1f2
commit
341c5fbe84
@ -570,7 +570,7 @@ class FMA3<bits<8> o, Format F, dag outs, dag ins, string asm,
|
||||
// FMA4 Instruction Templates
|
||||
class FMA4<bits<8> o, Format F, dag outs, dag ins, string asm,
|
||||
list<dag>pattern, InstrItinClass itin = IIC_DEFAULT>
|
||||
: I<o, F, outs, ins, asm, pattern, itin>, TA,
|
||||
: Ii8<o, F, outs, ins, asm, pattern, itin>, TA,
|
||||
OpSize, VEX_4V, VEX_I8IMM, Requires<[HasFMA4]>;
|
||||
|
||||
// XOP 2, 3 and 4 Operand Instruction Template
|
||||
|
@ -73,6 +73,67 @@
|
||||
// CHECK: encoding: [0xc4,0xe3,0xfd,0x69,0xc2,0x10]
|
||||
vfmaddpd %ymm2, %ymm1, %ymm0, %ymm0
|
||||
|
||||
// PR15040
|
||||
// CHECK: vfmaddss foo(%rip), %xmm1, %xmm0, %xmm0
|
||||
// CHECK: encoding: [0xc4,0xe3,0xf9,0x6a,0x05,A,A,A,A,0x10]
|
||||
// CHECK: fixup A - offset: 5, value: foo-5, kind: reloc_riprel_4byte
|
||||
vfmaddss foo(%rip), %xmm1, %xmm0, %xmm0
|
||||
|
||||
// CHECK: vfmaddss %xmm1, foo(%rip), %xmm0, %xmm0
|
||||
// CHECK: encoding: [0xc4,0xe3,0x79,0x6a,0x05,A,A,A,A,0x10]
|
||||
// CHECK: fixup A - offset: 5, value: foo-5, kind: reloc_riprel_4byte
|
||||
vfmaddss %xmm1, foo(%rip),%xmm0, %xmm0
|
||||
|
||||
// CHECK: vfmaddsd foo(%rip), %xmm1, %xmm0, %xmm0
|
||||
// CHECK: encoding: [0xc4,0xe3,0xf9,0x6b,0x05,A,A,A,A,0x10]
|
||||
// CHECK: fixup A - offset: 5, value: foo-5, kind: reloc_riprel_4byte
|
||||
vfmaddsd foo(%rip), %xmm1, %xmm0, %xmm0
|
||||
|
||||
// CHECK: vfmaddsd %xmm1, foo(%rip), %xmm0, %xmm0
|
||||
// CHECK: encoding: [0xc4,0xe3,0x79,0x6b,0x05,A,A,A,A,0x10]
|
||||
// CHECK: fixup A - offset: 5, value: foo-5, kind: reloc_riprel_4byte
|
||||
vfmaddsd %xmm1, foo(%rip),%xmm0, %xmm0
|
||||
|
||||
// CHECK: vfmaddps foo(%rip), %xmm1, %xmm0, %xmm0
|
||||
// CHECK: encoding: [0xc4,0xe3,0xf9,0x68,0x05,A,A,A,A,0x10]
|
||||
// CHECK: fixup A - offset: 5, value: foo-5, kind: reloc_riprel_4byte
|
||||
vfmaddps foo(%rip), %xmm1, %xmm0, %xmm0
|
||||
|
||||
// CHECK: vfmaddps %xmm1, foo(%rip), %xmm0, %xmm0
|
||||
// CHECK: encoding: [0xc4,0xe3,0x79,0x68,0x05,A,A,A,A,0x10]
|
||||
// CHECK: fixup A - offset: 5, value: foo-5, kind: reloc_riprel_4byte
|
||||
vfmaddps %xmm1, foo(%rip),%xmm0, %xmm0
|
||||
|
||||
// CHECK: vfmaddpd foo(%rip), %xmm1, %xmm0, %xmm0
|
||||
// CHECK: encoding: [0xc4,0xe3,0xf9,0x69,0x05,A,A,A,A,0x10]
|
||||
// CHECK: fixup A - offset: 5, value: foo-5, kind: reloc_riprel_4byte
|
||||
vfmaddpd foo(%rip), %xmm1, %xmm0, %xmm0
|
||||
|
||||
// CHECK: vfmaddpd %xmm1, foo(%rip), %xmm0, %xmm0
|
||||
// CHECK: encoding: [0xc4,0xe3,0x79,0x69,0x05,A,A,A,A,0x10]
|
||||
// CHECK: fixup A - offset: 5, value: foo-5, kind: reloc_riprel_4byte
|
||||
vfmaddpd %xmm1, foo(%rip),%xmm0, %xmm0
|
||||
|
||||
// CHECK: vfmaddps foo(%rip), %ymm1, %ymm0, %ymm0
|
||||
// CHECK: encoding: [0xc4,0xe3,0xfd,0x68,0x05,A,A,A,A,0x10]
|
||||
// CHECK: fixup A - offset: 5, value: foo-5, kind: reloc_riprel_4byte
|
||||
vfmaddps foo(%rip), %ymm1, %ymm0, %ymm0
|
||||
|
||||
// CHECK: vfmaddps %ymm1, foo(%rip), %ymm0, %ymm0
|
||||
// CHECK: encoding: [0xc4,0xe3,0x7d,0x68,0x05,A,A,A,A,0x10]
|
||||
// CHECK: fixup A - offset: 5, value: foo-5, kind: reloc_riprel_4byte
|
||||
vfmaddps %ymm1, foo(%rip),%ymm0, %ymm0
|
||||
|
||||
// CHECK: vfmaddpd foo(%rip), %ymm1, %ymm0, %ymm0
|
||||
// CHECK: encoding: [0xc4,0xe3,0xfd,0x69,0x05,A,A,A,A,0x10]
|
||||
// CHECK: fixup A - offset: 5, value: foo-5, kind: reloc_riprel_4byte
|
||||
vfmaddpd foo(%rip), %ymm1, %ymm0, %ymm0
|
||||
|
||||
// CHECK: vfmaddpd %ymm1, foo(%rip), %ymm0, %ymm0
|
||||
// CHECK: encoding: [0xc4,0xe3,0x7d,0x69,0x05,A,A,A,A,0x10]
|
||||
// CHECK: fixup A - offset: 5, value: foo-5, kind: reloc_riprel_4byte
|
||||
vfmaddpd %ymm1, foo(%rip),%ymm0, %ymm0
|
||||
|
||||
// vfmsub
|
||||
// CHECK: vfmsubss (%rcx), %xmm1, %xmm0, %xmm0
|
||||
// CHECK: encoding: [0xc4,0xe3,0xf9,0x6e,0x01,0x10]
|
||||
|
Loading…
x
Reference in New Issue
Block a user