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