aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/apx.cpp6
-rw-r--r--xbyak/xbyak.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/test/apx.cpp b/test/apx.cpp
index 3e0b0af..857b37d 100644
--- a/test/apx.cpp
+++ b/test/apx.cpp
@@ -1019,6 +1019,8 @@ CYBOZU_TEST_AUTO(base)
add(r30, r20);
add(r30, ptr[r20]);
cmp(r30, ptr[r20]);
+ push(r16);
+ pop(r16);
}
} c;
const uint8_t tbl[] = {
@@ -1029,6 +1031,10 @@ CYBOZU_TEST_AUTO(base)
0xd5, 0x5c, 0x03, 0x34, 0x24,
// cmp
0xd5, 0x5c, 0x3b, 0x34, 0x24,
+ // push
+ 0xd5, 0x10, 0x50,
+ // pop
+ 0xd5, 0x10, 0x58,
};
const size_t n = sizeof(tbl);
CYBOZU_TEST_EQUAL(c.getSize(), n);
diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h
index 3eea5ba..e02df10 100644
--- a/xbyak/xbyak.h
+++ b/xbyak/xbyak.h
@@ -2315,7 +2315,7 @@ private:
}
void opPushPop(const Operand& op, int code, int ext, int alt)
{
- if (op.isREG(64) && op.hasRex2()) {
+ if (op.isREG() && op.hasRex2()) {
const Reg& r = static_cast<const Reg&>(op);
rex2(0, rexRXB(3, 0, Reg(), r), Reg(), r);
db(alt);