diff options
Diffstat (limited to 'test/jmp.cpp')
-rw-r--r-- | test/jmp.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/jmp.cpp b/test/jmp.cpp index e9192b2..67882c7 100644 --- a/test/jmp.cpp +++ b/test/jmp.cpp @@ -1383,3 +1383,18 @@ CYBOZU_TEST_AUTO(setDefaultJmpNEAR) } } } + +CYBOZU_TEST_AUTO(ambiguousFarJmp) +{ + struct Code : Xbyak::CodeGenerator { +#ifdef XBYAK32 + void genJmp() { jmp(ptr[eax], T_FAR); } + void genCall() { call(ptr[eax], T_FAR); } +#else + void genJmp() { jmp(ptr[rax], T_FAR); } + void genCall() { call(ptr[rax], T_FAR); } +#endif + } code; + CYBOZU_TEST_EXCEPTION(code.genJmp(), std::exception); + CYBOZU_TEST_EXCEPTION(code.genCall(), std::exception); +} |