mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-23 22:06:19 +00:00

MC only needs to know if the output is PIC or not. It never has to decide about creating GOTs and PLTs for example. The only thing that MC itself uses this information for is expanding "macros" in sparc and mips. The rest I am pretty sure could be moved to CodeGen. This is a cleanup and isolates the code from future changes to Reloc::Model. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269909 91177308-0d34-0410-b5e6-96231b3b80d8
13 lines
457 B
LLVM
13 lines
457 B
LLVM
; RUN: llc -mtriple=mipsel-linux-gnu -relocation-model=pic -filetype=asm < %s | \
|
|
; RUN: llvm-mc -triple=mipsel-linux-gnu --position-independent -filetype=obj | \
|
|
; RUN: llvm-objdump -d - | FileCheck %s
|
|
; RUN: llc -mtriple=mipsel-linux-gnu -relocation-model=pic -filetype=obj < %s | \
|
|
; RUN: llvm-objdump -d - | FileCheck %s
|
|
|
|
define void @foo() {
|
|
call void asm sideeffect "\09.cprestore 512", "~{$1}"()
|
|
ret void
|
|
}
|
|
|
|
; CHECK: sw $gp, 512($sp)
|