⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 semantics.cpp

📁 当前支持 16-bit, 32-bit and 64-bit 的二进制文件
💻 CPP
字号:
// semantics.cpp
// Copyright (C) 2008 Willow Schlanger

#include "semantics.h"

namespace x86s
{

#include "../x86s/out_semantics.h"

#include "out_enum_strings.h"

std::string get_node_size_text(U2 size)
{
	if(size == ns_word)
		return "word";
	if(size == ns_dword)
		return "dword";
	if(size == ns_qword)
		return "qword";
	if(size == ns_oword)
		return "oword";
	if(size == ns_byte)
		return "byte";
	if(size == ns_bit)
		return "bit";
	//if(size == ns_void)
	//	return "void";
	//std::cout << "<size=" << size << ">";
	throw std::runtime_error("internal error: can\'t convert tcode into text (bad size)");
	return "???";
}

const char *get_ll_cc_text(U1 x)
{
	switch(x)
	{
		case 0x0:	return "x86_of";
		case 0x1:	return "!x86_of";
		case 0x2:	return "x86_cf";
		case 0x3:	return "!x86_cf";
		case 0x4:	return "x86_zf";
		case 0x5:	return "!x86_zf";
		case 0x6:	return "(x86_cf || x86_zf)";
		case 0x7:	return "!(x86_cf || x86_zf)";
		case 0x8:	return "x86_sf";
		case 0x9:	return "!x86_sf";
		case 0xa:	return "x86_pf";
		case 0xb:	return "!x86_pf";
		case 0xc:	return "(x86_sf != x86_of)";
		case 0xd:	return "(x86_sf == x86_of)";
		case 0xe:	return "(x86_zf || x86_sf != x86_of)";
		case 0xf:	return "(!x86_zf && x86_sf == x86_of)";
		default:
			break;
	}
}

}	// namespace x86s

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -