change error range of imm

This commit is contained in:
MITSUNARI Shigeo 2015-08-17 06:35:56 +09:00
parent 7a1ea1ed48
commit 762f40ffc3
2 changed files with 11 additions and 9 deletions

View file

@ -38,13 +38,12 @@ CYBOZU_TEST_AUTO(mov_const)
struct Code : Xbyak::CodeGenerator {
Code()
{
CYBOZU_TEST_NO_EXCEPTION(mov(dword[eax], -1));
CYBOZU_TEST_NO_EXCEPTION(mov(dword[eax], 0x7fffffff));
CYBOZU_TEST_NO_EXCEPTION(mov(dword[eax], -0x7fffffff));
CYBOZU_TEST_NO_EXCEPTION(mov(dword[eax], 0xabcd1234));
CYBOZU_TEST_NO_EXCEPTION(mov(dword[eax], 0xffffffff));
CYBOZU_TEST_EXCEPTION(mov(dword[eax], 0x100000000ull), Xbyak::Error);
CYBOZU_TEST_EXCEPTION(mov(dword[eax], -0x80000000ull), Xbyak::Error);
CYBOZU_TEST_NO_EXCEPTION(mov(qword[eax], 0x12345678));
CYBOZU_TEST_NO_EXCEPTION(mov(qword[eax], 0x7fffffff));
CYBOZU_TEST_NO_EXCEPTION(mov(qword[eax], -1));
CYBOZU_TEST_NO_EXCEPTION(mov(qword[eax], 0xffffffffffffffffull));
CYBOZU_TEST_EXCEPTION(mov(qword[eax], 0x80000000), Xbyak::Error);
CYBOZU_TEST_EXCEPTION(mov(qword[eax], 0xffffffff), Xbyak::Error);
}
} code;
}