aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/make_nm.cpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2016-01-24 15:46:38 +0900
committerMITSUNARI Shigeo <[email protected]>2016-01-24 15:46:38 +0900
commit33a733a233c82efa69101bd7d53a42bd4e844c85 (patch)
tree25c862a3dfde40afb3c042c325a9b314d6e01495 /test/make_nm.cpp
parent966c06b914f42ef1e8e3348db9db0d2a3db8c900 (diff)
downloadxbyak-33a733a233c82efa69101bd7d53a42bd4e844c85.tar.gz
xbyak-33a733a233c82efa69101bd7d53a42bd4e844c85.zip
lea, cmov support 16-bit registersv4.88
Diffstat (limited to 'test/make_nm.cpp')
-rw-r--r--test/make_nm.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/test/make_nm.cpp b/test/make_nm.cpp
index 37d3080..4a1cc03 100644
--- a/test/make_nm.cpp
+++ b/test/make_nm.cpp
@@ -1,6 +1,7 @@
#include <stdio.h>
#include "xbyak/xbyak.h"
#include <stdlib.h>
+#include <string.h>
#define NUM_OF_ARRAY(x) (sizeof(x) / sizeof(x[0]))
using namespace Xbyak;
@@ -429,7 +430,7 @@ class Test {
}
put("bswap", REG32e);
- put("lea", REG32e, MEM);
+ put("lea", REG32e|REG16, MEM);
put("fldcw", MEM);
put("fstcw", MEM);
}
@@ -805,6 +806,7 @@ class Test {
for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) {
char buf[16];
sprintf(buf, "cmov%s", tbl[i]);
+ put(buf, REG16, REG16|MEM);
put(buf, REG32, REG32|MEM);
put(buf, REG64, REG64|MEM);
sprintf(buf, "set%s", tbl[i]);
@@ -2168,13 +2170,30 @@ public:
if (isXbyak_) {
printf("mov(%s, %s); dump();\n", op1, seg);
printf("mov(%s, %s); dump();\n", seg, op1);
- printf("push(%s); dump();\n", seg);
- if (strcmp(seg, "cs") != 0) printf("pop(%s); dump();\n", seg);
} else {
printf("mov %s, %s\n", op1, seg);
printf("mov %s, %s\n", seg, op1);
+ }
+ }
+ }
+ {
+ const char *segTbl[] = {
+#ifdef XBYAK32
+ "es",
+ "ss",
+ "ds",
+#endif
+ "fs",
+ "gs",
+ };
+ for (size_t i = 0; i < NUM_OF_ARRAY(segTbl); i++) {
+ const char *seg = segTbl[i];
+ if (isXbyak_) {
+ printf("push(%s); dump();\n", seg);
+ printf("pop(%s); dump();\n", seg);
+ } else {
printf("push %s\n", seg);
- if (strcmp(seg, "cs") != 0) printf("pop %s\n", seg);
+ printf("pop %s\n", seg);
}
}
}