2009-09-08 23:54:48 +00:00
|
|
|
; RUN: llc < %s -march=x86-64 -relocation-model=pic -mtriple=x86_64-apple-darwin10 | FileCheck %s -check-prefix=PIC64
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -relocation-model=static | FileCheck %s -check-prefix=STATIC64
|
2009-03-14 02:33:41 +00:00
|
|
|
|
2009-08-20 18:23:44 +00:00
|
|
|
; Use %rip-relative addressing even in static mode on x86-64, because
|
|
|
|
; it has a smaller encoding.
|
|
|
|
|
2009-03-14 02:33:41 +00:00
|
|
|
@a = internal global double 3.4
|
|
|
|
define double @foo() nounwind {
|
|
|
|
%a = load double* @a
|
|
|
|
ret double %a
|
2009-07-11 22:30:05 +00:00
|
|
|
|
|
|
|
; PIC64: movsd _a(%rip), %xmm0
|
2009-08-20 18:23:44 +00:00
|
|
|
; STATIC64: movsd a(%rip), %xmm0
|
2009-03-14 02:33:41 +00:00
|
|
|
}
|