提交 1d688087 编写于 作者: P Paul Burton 提交者: Ralf Baechle

MIPS: Introduce _EXT assembler macro

This patch adds a simple macro to wrap the ext instruction which was
introduced with MIPSR2, and fall back to a shift & and pair for
pre-MIPSR2 CPUs. This will be used in a subsequent patch.
Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6358/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 6d9727a7
...@@ -169,6 +169,17 @@ ...@@ -169,6 +169,17 @@
fpu_restore_16even \thread \tmp fpu_restore_16even \thread \tmp
.endm .endm
#ifdef CONFIG_CPU_MIPSR2
.macro _EXT rd, rs, p, s
ext \rd, \rs, \p, \s
.endm
#else /* !CONFIG_CPU_MIPSR2 */
.macro _EXT rd, rs, p, s
srl \rd, \rs, \p
andi \rd, \rd, (1 << \s) - 1
.endm
#endif /* !CONFIG_CPU_MIPSR2 */
/* /*
* Temporary until all gas have MT ASE support * Temporary until all gas have MT ASE support
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册