mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-08 22:30:07 +00:00
LoongArch: Micro-optimize LD_PCREL
We are requiring Binutils >= 2.41, so explicit relocation syntax is always supported by the assembler. Use it to reduce one instruction. Signed-off-by: Xi Ruoyao <xry111@xry111.site>
This commit is contained in:
parent
aac842d0ed
commit
3efa26749e
@ -19,17 +19,15 @@
|
||||
#ifndef POINTER_GUARD_H
|
||||
#define POINTER_GUARD_H
|
||||
|
||||
/* Load a got-relative EXPR into G, using T.
|
||||
Note G and T are register names. */
|
||||
/* Load a got-relative EXPR into register G. */
|
||||
#define LD_GLOBAL(G, EXPR) \
|
||||
la.global G, EXPR; \
|
||||
REG_L G, G, 0;
|
||||
|
||||
/* Load a pc-relative EXPR into G, using T.
|
||||
Note G and T are register names. */
|
||||
/* Load a pc-relative EXPR into register G. */
|
||||
#define LD_PCREL(G, EXPR) \
|
||||
la.pcrel G, EXPR; \
|
||||
REG_L G, G, 0;
|
||||
pcalau12i G, %pc_hi20(EXPR); \
|
||||
REG_L G, G, %pc_lo12(EXPR);
|
||||
|
||||
#if (IS_IN (rtld) \
|
||||
|| (!defined SHARED && (IS_IN (libc) \
|
||||
|
Loading…
Reference in New Issue
Block a user