Commit 0e834064 authored by Hongchen Zhang's avatar Hongchen Zhang
Browse files

LoongArch: change global registers to local registers

LoongArch inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5OHOB



--------------------------------

From gcc commit 3f13154553f8
("df-scan: remove ad-hoc handling of global regs in asms"),
global registers will no longer be forced to add to the def-use
chain for the following inline asm :
  __asm("" : "=r"(a) : "0"(c)); /* the case for RELOC_HIDE */
  __asm("" : "=r"(b));

So we change to use $r21 $tp $sp as local registers,this way
they can be forced to add to the def-use chain.

Signed-off-by: default avatarHongchen Zhang <zhanghongchen@loongson.cn>
Signed-off-by: default avatarXing Li <lixing@loongson.cn>
Change-Id: I8ab88684ba8093f5ab84dec837d10594128ee16b
parent 331b50c9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment