llvm.org GIT mirror llvm / 6ecc260
Revert r72734. The Darwin assembler doesn't support the static relocation model on x86-64. Higher level logic should override the relocation model to PIC on x86_64-apple-darwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72746 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 10 years ago
5 changed file(s) with 8 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
13981398
13991399 def : Pat<(store (i64 (X86Wrapper tconstpool:$src)), addr:$dst),
14001400 (MOV64mi32 addr:$dst, tconstpool:$src)>,
1401 Requires<[SmallCode, IsStatic, IsNotDarwin]>;
1401 Requires<[SmallCode, IsStatic]>;
14021402 def : Pat<(store (i64 (X86Wrapper tjumptable:$src)), addr:$dst),
14031403 (MOV64mi32 addr:$dst, tjumptable:$src)>,
1404 Requires<[SmallCode, IsStatic, IsNotDarwin]>;
1404 Requires<[SmallCode, IsStatic]>;
14051405 def : Pat<(store (i64 (X86Wrapper tglobaladdr:$src)), addr:$dst),
14061406 (MOV64mi32 addr:$dst, tglobaladdr:$src)>,
1407 Requires<[SmallCode, IsStatic, IsNotDarwin]>;
1407 Requires<[SmallCode, IsStatic]>;
14081408 def : Pat<(store (i64 (X86Wrapper texternalsym:$src)), addr:$dst),
14091409 (MOV64mi32 addr:$dst, texternalsym:$src)>,
1410 Requires<[SmallCode, IsStatic, IsNotDarwin]>;
1410 Requires<[SmallCode, IsStatic]>;
14111411
14121412 // Calls
14131413 // Direct PC relative function call for small code model. 32-bit displacement
236236 def OptForSpeed : Predicate<"!OptForSize">;
237237 def FastBTMem : Predicate<"!Subtarget->isBTMemSlow()">;
238238 def CallImmAddr : Predicate<"Subtarget->IsLegalToCallImmediateAddr(TM)">;
239 def IsNotDarwin : Predicate<"!Subtarget->isTargetDarwin()">;
240239
241240 //===----------------------------------------------------------------------===//
242241 // X86 Instruction Format Definitions.
145145 ; RUN: grep movl %t | count 91
146146 ; RUN: not grep addl %t
147147 ; RUN: not grep subl %t
148 ; RUN: grep leaq %t | count 81
148 ; RUN: grep leaq %t | count 70
149149 ; RUN: grep movq %t | count 56
150150 ; RUN: grep addq %t | count 20
151151 ; RUN: grep subq %t | count 14
159159 ; RUN: not grep @PLT %t
160160 ; RUN: not grep @PLTOFF %t
161161 ; RUN: grep {call \\\*} %t | count 10
162 ; RUN: grep {%rip} %t | count 150
162 ; RUN: grep {%rip} %t | count 139
163163 ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin -march=x86-64 -relocation-model=dynamic-no-pic -code-model=small > %t
164164 ; RUN: not grep leal %t
165165 ; RUN: grep movl %t | count 95
11 ; RUN: not grep lea %t
22 ; RUN: not grep add %t
33 ; RUN: grep mov %t | count 1
4 ; RUN: llvm-as < %s | llc -mtriple=x86_64-unknown-linux-gnu -relocation-model=static > %t
4 ; RUN: llvm-as < %s | llc -march=x86-64 -relocation-model=static > %t
55 ; RUN: not grep lea %t
66 ; RUN: not grep add %t
77 ; RUN: grep mov %t | count 1
None ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin -relocation-model=static | grep lea
0 ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin -relocation-model=static | not grep lea
11 ; RUN: llvm-as < %s | llc -mtriple=x86_64-pc-linux-gnu -relocation-model=static | not grep lea
22
33 @v = external global i32, align 8