MCPcopy Create free account
hub / github.com/beefytech/Beef / ToString

Method ToString

IDEHelper/Backend/BeMCContext.cpp:1971–2153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1969}
1970
1971String BeMCContext::ToString(const BeMCOperand& operand)
1972{
1973 if (operand.mKind == BeMCOperandKind_NativeReg)
1974 {
1975 return String("%") + X64CPURegisters::GetRegisterName((int)operand.mReg);
1976 }
1977
1978 if (operand.IsVRegAny())
1979 {
1980 auto vregInfo = GetVRegInfo(operand);
1981
1982 String str;
1983 mModule->ToString(str, GetType(operand));
1984 str += " ";
1985
1986 if (operand.IsVRegAny())
1987 {
1988 auto vregInfo = GetVRegInfo(operand);
1989 if (operand.mKind == BeMCOperandKind_VRegAddr)
1990 str += "&";
1991 if (operand.mKind == BeMCOperandKind_VRegLoad)
1992 str += "*";
1993 if (vregInfo->mDbgVariable != NULL)
1994 str += "#" + vregInfo->mDbgVariable->mName + StrFormat("/%d", operand.mVRegIdx);
1995 else
1996 str += StrFormat("%%vreg%d", operand.mVRegIdx);
1997 }
1998
1999 if (vregInfo->mReg != X64Reg_None)
2000 {
2001 str += "<";
2002 str += X64CPURegisters::GetRegisterName((int)vregInfo->mReg);
2003 str += ">";
2004 }
2005 else if (vregInfo->mForceReg)
2006 {
2007 str += "<reg>";
2008 }
2009
2010 if (vregInfo->mDisableR11)
2011 {
2012 str += "<NoR11>";
2013 }
2014 if (vregInfo->mDisableR12)
2015 {
2016 str += "<NoR12>";
2017 }
2018 if (vregInfo->mDisableR13)
2019 {
2020 str += "<NoR13>";
2021 }
2022 if (vregInfo->mDisableRAX)
2023 {
2024 str += "<NoRAX>";
2025 }
2026 if (vregInfo->mDisableRDX)
2027 {
2028 str += "<NoRDX>";

Callers 2

FailMethod · 0.45
GetOperandMethod · 0.45

Calls 8

StringClass · 0.85
IsVRegAnyMethod · 0.80
IsDefMethod · 0.80
GetChangeMethod · 0.80
ToStringFunction · 0.50
IsImmediateMethod · 0.45
IsSetMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected