Skip to content

Commit

Permalink
Merge pull request #7122 from Spencer-Comin/void-setters
Browse files Browse the repository at this point in the history
Z: Change CPU support flag setters to return void
  • Loading branch information
hzongaro authored Nov 30, 2023
2 parents 2d7eb9a + 1046181 commit 69bd284
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 67 deletions.
65 changes: 15 additions & 50 deletions compiler/z/env/OMRCPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,6 @@ OMR::Z::CPU::getSupportsArch(Architecture arch)
return _supportedArch >= arch;
}

bool
OMR::Z::CPU::setSupportsArch(Architecture arch)
{
return _supportedArch = _supportedArch >= arch ? _supportedArch : arch;
}

bool
OMR::Z::CPU::getSupportsHardwareSQRT()
{
Expand All @@ -290,7 +284,7 @@ OMR::Z::CPU::getSupportsHighWordFacility()
return _flags.testAny(S390SupportsHPR);
}

bool
void
OMR::Z::CPU::setSupportsHighWordFacility(bool value)
{
if (value)
Expand All @@ -301,8 +295,6 @@ OMR::Z::CPU::setSupportsHighWordFacility(bool value)
{
_flags.reset(S390SupportsHPR);
}

return value;
}

bool
Expand All @@ -311,7 +303,7 @@ OMR::Z::CPU::getSupportsDecimalFloatingPointFacility()
return _flags.testAny(S390SupportsDFP);
}

bool
void
OMR::Z::CPU::setSupportsDecimalFloatingPointFacility(bool value)
{
if (value)
Expand All @@ -322,8 +314,6 @@ OMR::Z::CPU::setSupportsDecimalFloatingPointFacility(bool value)
{
_flags.reset(S390SupportsDFP);
}

return value;
}

bool
Expand All @@ -332,7 +322,7 @@ OMR::Z::CPU::getSupportsFloatingPointExtensionFacility()
return _flags.testAny(S390SupportsFPE);
}

bool
void
OMR::Z::CPU::setSupportsFloatingPointExtensionFacility(bool value)
{
if (value)
Expand All @@ -343,8 +333,6 @@ OMR::Z::CPU::setSupportsFloatingPointExtensionFacility(bool value)
{
_flags.reset(S390SupportsFPE);
}

return value;
}

bool
Expand All @@ -360,7 +348,7 @@ OMR::Z::CPU::supportsTransactionalMemoryInstructions()
}


bool
void
OMR::Z::CPU::setSupportsTransactionalExecutionFacility(bool value)
{
if (value)
Expand All @@ -371,8 +359,6 @@ OMR::Z::CPU::setSupportsTransactionalExecutionFacility(bool value)
{
_flags.reset(OMR_FEATURE_S390_TRANSACTIONAL_EXECUTION_FACILITY);
}

return value;
}

bool
Expand All @@ -381,7 +367,7 @@ OMR::Z::CPU::getSupportsConstrainedTransactionalExecutionFacility()
return _flags.testAny(OMR_FEATURE_S390_CONSTRAINED_TRANSACTIONAL_EXECUTION_FACILITY);
}

bool
void
OMR::Z::CPU::setSupportsConstrainedTransactionalExecutionFacility(bool value)
{
if (value)
Expand All @@ -392,8 +378,6 @@ OMR::Z::CPU::setSupportsConstrainedTransactionalExecutionFacility(bool value)
{
_flags.reset(OMR_FEATURE_S390_CONSTRAINED_TRANSACTIONAL_EXECUTION_FACILITY);
}

return value;
}

bool
Expand All @@ -402,7 +386,7 @@ OMR::Z::CPU::getSupportsRuntimeInstrumentationFacility()
return _flags.testAny(S390SupportsRI);
}

bool
void
OMR::Z::CPU::setSupportsRuntimeInstrumentationFacility(bool value)
{
if (value)
Expand All @@ -413,8 +397,6 @@ OMR::Z::CPU::setSupportsRuntimeInstrumentationFacility(bool value)
{
_flags.reset(S390SupportsRI);
}

return value;
}

bool
Expand All @@ -423,7 +405,7 @@ OMR::Z::CPU::getSupportsVectorFacility()
return _flags.testAny(S390SupportsVectorFacility);
}

bool
void
OMR::Z::CPU::setSupportsVectorFacility(bool value)
{
if (value)
Expand All @@ -434,8 +416,6 @@ OMR::Z::CPU::setSupportsVectorFacility(bool value)
{
_flags.reset(S390SupportsVectorFacility);
}

return value;
}

bool
Expand All @@ -444,7 +424,7 @@ OMR::Z::CPU::getSupportsVectorPackedDecimalFacility()
return _flags.testAny(S390SupportsVectorPackedDecimalFacility);
}

bool
void
OMR::Z::CPU::setSupportsVectorPackedDecimalFacility(bool value)
{
if (value)
Expand All @@ -455,8 +435,6 @@ OMR::Z::CPU::setSupportsVectorPackedDecimalFacility(bool value)
{
_flags.reset(S390SupportsVectorPackedDecimalFacility);
}

return value;
}

bool
Expand All @@ -465,7 +443,7 @@ OMR::Z::CPU::getSupportsGuardedStorageFacility()
return _flags.testAny(S390SupportsGuardedStorageFacility);
}

bool
void
OMR::Z::CPU::setSupportsGuardedStorageFacility(bool value)
{
if (value)
Expand All @@ -476,8 +454,6 @@ OMR::Z::CPU::setSupportsGuardedStorageFacility(bool value)
{
_flags.reset(S390SupportsGuardedStorageFacility);
}

return value;
}

bool
Expand All @@ -486,7 +462,7 @@ OMR::Z::CPU::getSupportsMiscellaneousInstructionExtensions2Facility()
return _flags.testAny(S390SupportsMIE2);
}

bool
void
OMR::Z::CPU::setSupportsMiscellaneousInstructionExtensions2Facility(bool value)
{
if (value)
Expand All @@ -497,8 +473,6 @@ OMR::Z::CPU::setSupportsMiscellaneousInstructionExtensions2Facility(bool value)
{
_flags.reset(S390SupportsMIE2);
}

return value;
}

bool
Expand All @@ -507,7 +481,7 @@ OMR::Z::CPU::getSupportsMiscellaneousInstructionExtensions3Facility()
return _flags.testAny(S390SupportsMIE3);
}

bool
void
OMR::Z::CPU::setSupportsMiscellaneousInstructionExtensions3Facility(bool value)
{
if (value)
Expand All @@ -518,8 +492,6 @@ OMR::Z::CPU::setSupportsMiscellaneousInstructionExtensions3Facility(bool value)
{
_flags.reset(S390SupportsMIE3);
}

return value;
}

bool
Expand All @@ -528,7 +500,7 @@ OMR::Z::CPU::getSupportsVectorFacilityEnhancement2()
return _flags.testAny(S390SupportsVectorFacilityEnhancement2);
}

bool
void
OMR::Z::CPU::setSupportsVectorFacilityEnhancement2(bool value)
{
if (value)
Expand All @@ -539,8 +511,6 @@ OMR::Z::CPU::setSupportsVectorFacilityEnhancement2(bool value)
{
_flags.reset(S390SupportsVectorFacilityEnhancement2);
}

return value;
}

bool
Expand All @@ -549,7 +519,7 @@ OMR::Z::CPU::getSupportsVectorFacilityEnhancement1()
return _flags.testAny(S390SupportsVectorFacilityEnhancement1);
}

bool
void
OMR::Z::CPU::setSupportsVectorFacilityEnhancement1(bool value)
{
if (value)
Expand All @@ -560,8 +530,6 @@ OMR::Z::CPU::setSupportsVectorFacilityEnhancement1(bool value)
{
_flags.reset(S390SupportsVectorFacilityEnhancement1);
}

return value;
}

bool
Expand All @@ -570,7 +538,7 @@ OMR::Z::CPU::getSupportsVectorPackedDecimalEnhancementFacility()
return _flags.testAny(S390SupportsVectorPDEnhancementFacility);
}

bool
void
OMR::Z::CPU::setSupportsVectorPackedDecimalEnhancementFacility(bool value)
{
if (value)
Expand All @@ -581,8 +549,6 @@ OMR::Z::CPU::setSupportsVectorPackedDecimalEnhancementFacility(bool value)
{
_flags.reset(S390SupportsVectorPDEnhancementFacility);
}

return value;
}

bool
Expand All @@ -598,7 +564,7 @@ OMR::Z::CPU::getSupportsVectorPackedDecimalEnhancementFacility2()
return _flags.testAny(S390SupportsVectorPDEnhancementFacility2);
}

bool
void
OMR::Z::CPU::setSupportsVectorPackedDecimalEnhancementFacility2(bool value)
{
if (value)
Expand All @@ -609,6 +575,5 @@ OMR::Z::CPU::setSupportsVectorPackedDecimalEnhancementFacility2(bool value)
{
_flags.reset(S390SupportsVectorPDEnhancementFacility2);
}
return value;
}

Loading

0 comments on commit 69bd284

Please sign in to comment.