[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] [PATCH] Add Support of SSE Instructions ldmxcsr and stmxc
From: |
Ziyao |
Subject: |
[Tinycc-devel] [PATCH] Add Support of SSE Instructions ldmxcsr and stmxcsr |
Date: |
Tue, 5 Apr 2022 19:21:20 +0800 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
Hi list,
I have made a patch which adds the support of two SEE instructions to TinyCC
--ldmxcsr and stmxcsr.Both x86_64 and i386 build have been tested on Ubuntu
18.04LTS and they generate proper machine code which is the same as what
GNU as does.It only includes 4 lines.
Best wishes,
Ziyao
----
diff --git a/i386-asm.h b/i386-asm.h
index 65d5179..dfc5183 100644
--- a/i386-asm.h
+++ b/i386-asm.h
@@ -447,6 +447,8 @@ ALT(DEF_ASM_OP2(psrlq, 0x0f73, 2, OPC_MODRM, OPT_IM8,
OPT_MMXSSE ))
DEF_ASM_OP2(pxor, 0x0fef, 0, OPC_MODRM, OPT_EA | OPT_MMXSSE, OPT_MMXSSE )
/* sse */
+ DEF_ASM_OP1(ldmxcsr, 0x0fae, 2, OPC_MODRM, OPT_EA)
+ DEF_ASM_OP1(stmxcsr, 0x0fae, 3, OPC_MODRM, OPT_EA)
DEF_ASM_OP2(movups, 0x0f10, 0, OPC_MODRM, OPT_EA | OPT_REG32, OPT_SSE )
ALT(DEF_ASM_OP2(movups, 0x0f11, 0, OPC_MODRM, OPT_SSE, OPT_EA | OPT_REG32 ))
DEF_ASM_OP2(movaps, 0x0f28, 0, OPC_MODRM, OPT_EA | OPT_REG32, OPT_SSE )
diff --git a/x86_64-asm.h b/x86_64-asm.h
index cb9eb16..4e03773 100644
--- a/x86_64-asm.h
+++ b/x86_64-asm.h
@@ -483,6 +483,8 @@ ALT(DEF_ASM_OP2(psrlq, 0x0f73, 2, OPC_MODRM, OPT_IM8,
OPT_MMXSSE ))
DEF_ASM_OP2(pxor, 0x0fef, 0, OPC_MODRM, OPT_EA | OPT_MMXSSE, OPT_MMXSSE )
/* sse */
+ DEF_ASM_OP1(ldmxcsr, 0x0fae, 2, OPC_MODRM, OPT_EA)
+ DEF_ASM_OP1(stmxcsr, 0x0fae, 3, OPC_MODRM, OPT_EA)
DEF_ASM_OP2(movups, 0x0f10, 0, OPC_MODRM, OPT_EA | OPT_REG32, OPT_SSE )
ALT(DEF_ASM_OP2(movups, 0x0f11, 0, OPC_MODRM, OPT_SSE, OPT_EA | OPT_REG32 ))
DEF_ASM_OP2(movaps, 0x0f28, 0, OPC_MODRM, OPT_EA | OPT_REG32, OPT_SSE )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Tinycc-devel] [PATCH] Add Support of SSE Instructions ldmxcsr and stmxcsr,
Ziyao <=