diff mbox series

[4/8] MIPS: asmmacro: Restore fp macro after undef

Message ID 20230409104309.13887-5-jiaxun.yang@flygoat.com (mailing list archive)
State Superseded
Headers show
Series MIPS: LLVM build fixes | expand

Commit Message

Jiaxun Yang April 9, 2023, 10:43 a.m. UTC
fp macro is used by several place to reference frame pointer.
Restore macro at end of file with {push,pop}_macro pragma to
avoid break other assembly files.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
 arch/mips/include/asm/asmmacro.h | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/arch/mips/include/asm/asmmacro.h b/arch/mips/include/asm/asmmacro.h
index 2491a6c68390..de9688911cae 100644
--- a/arch/mips/include/asm/asmmacro.h
+++ b/arch/mips/include/asm/asmmacro.h
@@ -20,6 +20,7 @@ 
 #endif
 
 /* preprocessor replaces the fp in ".set fp=64" with $30 otherwise */
+#pragma push_macro("fp")
 #undef fp
 
 /*
@@ -655,4 +656,6 @@ 
 	.set	pop
 	.endm
 
+#pragma pop_macro("fp")
+
 #endif /* _ASM_ASMMACRO_H */