From 27ba61df9f9decc70124b7559f777ad596dfda29 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Sat, 12 May 2012 00:17:17 +0000 Subject: Insert instructions to the entry basic block which initializes the global pointer register. This is the first of the series of patches which clean up the way global pointer register is used. The patches will make the following improvements: - Make $gp an allocatable temporary register rather than reserving it. - Use a virtual register as the global pointer register and let the register allocator decide which register to assign to it or whether spill/reloads are needed. - Make sure $gp is valid at the entry of a called function, which is necessary for functions using lazy binding. - Remove the need for emitting .cprestore and .cpload directives. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156671 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/Mips/tls.ll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/CodeGen/Mips/tls.ll') diff --git a/test/CodeGen/Mips/tls.ll b/test/CodeGen/Mips/tls.ll index a3c4768bb4b..8ef3da0236b 100644 --- a/test/CodeGen/Mips/tls.ll +++ b/test/CodeGen/Mips/tls.ll @@ -43,8 +43,8 @@ entry: ; STATICGP: lui $[[R0:[0-9]+]], %hi(__gnu_local_gp) ; STATICGP: addiu $[[GP:[0-9]+]], $[[R0]], %lo(__gnu_local_gp) ; STATICGP: lw ${{[0-9]+}}, %gottprel(t2)($[[GP]]) -; STATIC: lui $gp, %hi(__gnu_local_gp) -; STATIC: addiu $gp, $gp, %lo(__gnu_local_gp) +; STATIC: lui $[[R0:[0-9]+]], %hi(__gnu_local_gp) +; STATIC: addiu ${{[a-z0-9]+}}, $[[R0]], %lo(__gnu_local_gp) ; STATIC: rdhwr $3, $29 ; STATIC: lw $[[R0:[0-9]+]], %gottprel(t2)($gp) ; STATIC: addu $[[R1:[0-9]+]], $3, $[[R0]] -- cgit v1.2.3