MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / test_mnemo_text

Function test_mnemo_text

src/cputest.cpp:6683–6828  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6681}
6682
6683static void test_mnemo_text(const TCHAR *path, const TCHAR *mode)
6684{
6685 TCHAR modetxt[100];
6686 int mnemo = -1;
6687 int fpuopcode = -1;
6688 int sizes = -1;
6689
6690 extra_and = 0;
6691 extra_or = 0;
6692
6693 _tcscpy(modetxt, mode);
6694 my_trim(modetxt);
6695 TCHAR *s = _tcschr(modetxt, '.');
6696 if (s || feature_instruction_size) {
6697 TCHAR c = 0;
6698 if (s) {
6699 *s = 0;
6700 c = _totupper(s[1]);
6701 }
6702 if (c == 'B')
6703 sizes = 6;
6704 if (c == 'W')
6705 sizes = 4;
6706 if (c == 'L')
6707 sizes = 0;
6708 if (c == 'U')
6709 sizes = 8;
6710 if (c == 'S')
6711 sizes = 1;
6712 if (c == 'X')
6713 sizes = 2;
6714 if (c == 'P')
6715 sizes = 3;
6716 if (c == 'D')
6717 sizes = 5;
6718 }
6719
6720 const TCHAR *ovrname = NULL;
6721 if (!_tcsicmp(modetxt, _T("DIVUL"))) {
6722 _tcscpy(modetxt, _T("DIVL"));
6723 extra_and = 0x0800;
6724 extra_and |= 0x0400;
6725 ovrname = _T("DIVUL");
6726 } else if (!_tcsicmp(modetxt, _T("DIVSL"))) {
6727 _tcscpy(modetxt, _T("DIVL"));
6728 extra_or = 0x0800;
6729 extra_and = 0x0400;
6730 ovrname = _T("DIVSL");
6731 } else if (!_tcsicmp(modetxt, _T("DIVS")) && sizes == 0) {
6732 _tcscpy(modetxt, _T("DIVL"));
6733 extra_or = 0x0800;
6734 extra_or |= 0x0400;
6735 ovrname = _T("DIVS");
6736 } else if (!_tcsicmp(modetxt, _T("DIVU")) && sizes == 0) {
6737 _tcscpy(modetxt, _T("DIVL"));
6738 extra_and = 0x0800;
6739 extra_or |= 0x0400;
6740 ovrname = _T("DIVU");

Callers 1

testFunction · 0.85

Calls 2

my_trimFunction · 0.70
test_mnemoFunction · 0.70

Tested by

no test coverage detected