File: bad_address.cpp

package info (click to toggle)
xbyak 7.24.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,068 kB
  • sloc: cpp: 21,493; ansic: 2,981; python: 372; makefile: 306; sh: 204
file content (28 lines) | stat: -rw-r--r-- 1,099 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <xbyak/xbyak.h>
#include <cybozu/test.hpp>

struct Code : Xbyak::CodeGenerator {
	Code()
	{
		CYBOZU_TEST_EXCEPTION(mov(eax, ptr [esp + esp]), std::exception);
		CYBOZU_TEST_EXCEPTION(mov(eax, ptr [ax]), std::exception); // not support
		CYBOZU_TEST_EXCEPTION(mov(eax, ptr [esp * 4]), std::exception);
		CYBOZU_TEST_EXCEPTION(mov(eax, ptr [eax * 16]), std::exception);
		CYBOZU_TEST_EXCEPTION(mov(eax, ptr [eax + eax + eax]), std::exception);
		CYBOZU_TEST_EXCEPTION(mov(eax, ptr [eax * 2 + ecx * 4]), std::exception);
		CYBOZU_TEST_EXCEPTION(mov(eax, ptr [eax * 2 + ecx * 4]), std::exception);
		CYBOZU_TEST_EXCEPTION(mov(eax, ptr [xmm0]), std::exception);
		CYBOZU_TEST_EXCEPTION(fld(dword [xmm0]), std::exception);
		CYBOZU_TEST_EXCEPTION(vgatherdpd(xmm0, ptr [eax * 2], ymm3), std::exception);
		CYBOZU_TEST_EXCEPTION(vgatherdpd(xmm0, ptr [xmm0 + xmm1], ymm3), std::exception);
#ifdef XBYAK64
		CYBOZU_TEST_EXCEPTION(mov(eax, ptr [rax + eax]), std::exception);
		CYBOZU_TEST_EXCEPTION(mov(eax, ptr [xmm0 + ymm0]), std::exception);
#endif
	}
};

CYBOZU_TEST_AUTO(exception)
{
	Code c;
}