Skip to content

Commit

Permalink
Delete TR_S390LinkageConventions enum
Browse files Browse the repository at this point in the history
This enum is redundant with the more general
TR_LinkageConventions. This commit combines the two.

Signed-off-by: Dhruv Chopra <Dhruv.C.Chopra@ibm.com>
  • Loading branch information
dchopra001 committed Jan 4, 2021
1 parent 481e344 commit ce0f8b1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 28 deletions.
2 changes: 1 addition & 1 deletion compiler/z/codegen/Linkage.hpp
Expand Up @@ -39,7 +39,7 @@ class OMR_EXTENSIBLE Linkage : public OMR::LinkageConnector
Linkage(TR::CodeGenerator *cg)
: OMR::LinkageConnector(cg) {}

Linkage(TR::CodeGenerator *cg, TR_S390LinkageConventions elc)
Linkage(TR::CodeGenerator *cg, TR_LinkageConventions elc)
: OMR::LinkageConnector(cg, elc) {}
};
}
Expand Down
6 changes: 4 additions & 2 deletions compiler/z/codegen/OMRLinkage.cpp
Expand Up @@ -135,7 +135,7 @@ OMR::Z::Linkage::Linkage(TR::CodeGenerator * codeGen)
* convention.
* Even though this method is common, its implementation is machine-specific.
*/
OMR::Z::Linkage::Linkage(TR::CodeGenerator * codeGen,TR_S390LinkageConventions elc)
OMR::Z::Linkage::Linkage(TR::CodeGenerator * codeGen,TR_LinkageConventions elc)
: OMR::Linkage(codeGen),
_explicitLinkageType(elc), _stackSizeCheckNeeded(true), _raContextSaveNeeded(true),
_integerReturnRegister(TR::RealRegister::NoReg),
Expand Down Expand Up @@ -2840,7 +2840,9 @@ OMR::Z::Linkage::getLastMaskedBit(int16_t mask)
bool
OMR::Z::Linkage::isOSLinkageType()
{
return (self()->getExplicitLinkageType() & TR_SystemOS_MASK) != 0;
// #define TR_SystemOS_MASK 0x40
// zOS Type 1 linkages (non-Java) - all have bit 0x40 set
return (self()->getExplicitLinkageType() & 0x40) != 0;
}

bool
Expand Down
27 changes: 4 additions & 23 deletions compiler/z/codegen/OMRLinkage.hpp
Expand Up @@ -62,25 +62,6 @@ template <class T> class List;
/**
* 390 Explicit linkage conventions
*/
enum TR_S390LinkageConventions
{
TR_S390LinkageDefault = 0, ///< reserved for default construction

// Java specific linkages
TR_JavaPrivate = 0x1, ///< Java private linkage
TR_JavaHelper = 0x2, ///< Java helper linkage

TR_SystemXPLink = 0x20, ///< (Java) zOS XPLink convention

// zOS Type 1 linkages (non-Java) - all have bit 0x40 set
#define TR_SystemOS_MASK 0x40

// zOS Type 1 linkage - C++ Fastlink
TR_SystemFastLink = 0x4D, ///< (non-Java) zOS (C++) FastLink convention

// Linux Platform Linkages
TR_SystemLinux = 60 ///< (Java) Linux convention
};

////////////////////////////////////////////////////////////////////////////////
// linkage properties
Expand Down Expand Up @@ -191,7 +172,7 @@ namespace Z
class OMR_EXTENSIBLE Linkage : public OMR::Linkage
{
private:
TR_S390LinkageConventions _explicitLinkageType;
TR_LinkageConventions _explicitLinkageType;
uint32_t _properties;
uint32_t _registerFlags[TR::RealRegister::NumRegisters];
uint8_t _numIntegerArgumentRegisters;
Expand Down Expand Up @@ -252,10 +233,10 @@ enum TR_DispatchType

Linkage(TR::CodeGenerator *);

Linkage(TR::CodeGenerator *, TR_S390LinkageConventions);
Linkage(TR::CodeGenerator *, TR_LinkageConventions);

TR_S390LinkageConventions getExplicitLinkageType() { return _explicitLinkageType; }
void setExplicitLinkageType(TR_S390LinkageConventions lc ) { _explicitLinkageType = lc; }
TR_LinkageConventions getExplicitLinkageType() { return _explicitLinkageType; }
void setExplicitLinkageType(TR_LinkageConventions lc ) { _explicitLinkageType = lc; }

bool isOSLinkageType();
bool isXPLinkLinkageType();
Expand Down
2 changes: 1 addition & 1 deletion compiler/z/codegen/SystemLinkage.cpp
Expand Up @@ -69,7 +69,7 @@
#include "z/codegen/S390Instruction.hpp"
#include "z/codegen/SystemLinkage.hpp"

TR::SystemLinkage::SystemLinkage(TR::CodeGenerator* cg, TR_S390LinkageConventions elc)
TR::SystemLinkage::SystemLinkage(TR::CodeGenerator* cg, TR_LinkageConventions elc)
:
TR::Linkage(cg, elc),
_GPRSaveMask(0),
Expand Down
2 changes: 1 addition & 1 deletion compiler/z/codegen/SystemLinkage.hpp
Expand Up @@ -56,7 +56,7 @@ class SystemLinkage : public TR::Linkage
{
public:

SystemLinkage(TR::CodeGenerator * cg, TR_S390LinkageConventions elc = TR_S390LinkageDefault);
SystemLinkage(TR::CodeGenerator * cg, TR_LinkageConventions elc = TR_S390LinkageDefault);

TR::SystemLinkage * self();

Expand Down

0 comments on commit ce0f8b1

Please sign in to comment.