2009-09-09 07:54:48 +08: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 10:33:41 +08:00
|
|
|
|
2009-08-21 02:23:44 +08:00
|
|
|
; Use %rip-relative addressing even in static mode on x86-64, because
|
|
|
|
; it has a smaller encoding.
|
|
|
|
|
2009-03-14 10:33:41 +08:00
|
|
|
@a = internal global double 3.4
|
|
|
|
define double @foo() nounwind {
|
2015-02-28 05:17:42 +08:00
|
|
|
%a = load double, double* @a
|
2009-03-14 10:33:41 +08:00
|
|
|
ret double %a
|
2009-07-12 06:30:05 +08:00
|
|
|
|
|
|
|
; PIC64: movsd _a(%rip), %xmm0
|
2009-08-21 02:23:44 +08:00
|
|
|
; STATIC64: movsd a(%rip), %xmm0
|
2009-03-14 10:33:41 +08:00
|
|
|
}
|