Discussion:
shld / shrd for dynasm
Peter Cawley
2014-09-21 15:54:06 UTC
Permalink
Hi Mike,

It seems that dynasm for x86/x64 doesn't currently know about the shld
and shrd instructions. I believe that the following patch correctly
teaches it about these instructions, and would appreciate the patch
being integrated upstream.

Regards,
Peter

diff --git a/dynasm/dasm_x86.lua b/dynasm/dasm_x86.lua
index 824c634..37024a7 100644
--- a/dynasm/dasm_x86.lua
+++ b/dynasm/dasm_x86.lua
@@ -1084,6 +1084,9 @@ local map_op = {
rdtsc_0 = "0F31", -- P1+
cpuid_0 = "0FA2", -- P1+

+ shld_3 = "mriqdw:0FA4RmU|mrCqdw:0FA5Rm",
+ shrd_3 = "mriqdw:0FACRmU|mrCqdw:0FADRm",
+
-- floating point ops
fst_1 = "ff:DDD0r|xd:D92m|xq:nDD2m",
fstp_1 = "ff:DDD8r|xd:D93m|xq:nDD3m|xt:DB7m",
Mike Pall
2014-09-21 16:06:03 UTC
Permalink
Post by Peter Cawley
It seems that dynasm for x86/x64 doesn't currently know about the shld
and shrd instructions. I believe that the following patch correctly
teaches it about these instructions, and would appreciate the patch
being integrated upstream.
Thank you for the patch! Added to the git repository.

--Mike
Cosmin Apreutesei
2014-09-21 22:03:10 UTC
Permalink
Hi,

I also added a few defs that made cbframe[1] easy to make, here they
are if you want to add those too:

fstenv_1 = "x.:9BD96m",
fldenv_1 = "x.:D94m",
fnstenv_1 = "x.:D96m",
fxsave_1 = "x.:0FAE0m",
fxrstor_1 = "x.:0FAE1m",


[1] http://luapower.com/cbframe
Mike Pall
2014-09-22 11:49:24 UTC
Permalink
Post by Cosmin Apreutesei
I also added a few defs that made cbframe[1] easy to make, here they
Thank you! Added to the git repository.

--Mike

Loading...