mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-23 04:28:30 +00:00
00bdeb4c54
Summary: This directive is used for setting up $gp in the beginning of a function. It expands to three instructions if PIC is enabled: lui $gp, %hi(_gp_disp) addui $gp, $gp, %lo(_gp_disp) addu $gp, $gp, $reg _gp_disp is a special symbol that the linker sets to the distance between the lui instruction and the context pointer (_gp). Reviewers: dsanders Reviewed By: dsanders Differential Revision: http://reviews.llvm.org/D3480 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207637 91177308-0d34-0410-b5e6-96231b3b80d8
16 lines
520 B
ArmAsm
16 lines
520 B
ArmAsm
# RUN: not llvm-mc %s -arch=mips -mcpu=mips32r2 2>%t1
|
|
# RUN: FileCheck %s < %t1 -check-prefix=ASM
|
|
|
|
.text
|
|
.option pic2
|
|
.set reorder
|
|
.cpload $25
|
|
# ASM: :[[@LINE-1]]:9: warning: .cpload in reorder section
|
|
.set noreorder
|
|
.cpload $32
|
|
# ASM: :[[@LINE-1]]:17: error: invalid register
|
|
.cpload $foo
|
|
# ASM: :[[@LINE-1]]:17: error: expected register containing function address
|
|
.cpload bar
|
|
# ASM: :[[@LINE-1]]:17: error: expected register containing function address
|