Skip to content

Commit

Permalink
Add a flag to indicate codegen support for byteswaps
Browse files Browse the repository at this point in the history
In order for language frontends to be able to make use of the new
byteswap opcodes, they need a way to determine whether the codegen for
the architecture they're running on supports these opcodes. To allow
this, a new flag has been added to indicate codegen support for
sbyteswap, ibyteswap, and lbyteswap.

Signed-off-by: Ben Thomas <ben@benthomas.ca>
  • Loading branch information
aviansie-ben committed Sep 14, 2020
1 parent cbacb9a commit 6df85c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/codegen/OMRCodeGenerator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1604,6 +1604,9 @@ class OMR_EXTENSIBLE CodeGenerator
bool considerAllAutosAsTacticalGlobalRegisterCandidates() {return _flags1.testAny(ConsiderAllAutosAsTacticalGlobalRegisterCandidates);}
void setConsiderAllAutosAsTacticalGlobalRegisterCandidates() {_flags1.set(ConsiderAllAutosAsTacticalGlobalRegisterCandidates);}

bool supportsByteswap() { return _flags1.testAny(SupportsByteswap); }
void setSupportsByteswap() { _flags1.set(SupportsByteswap); }

bool getSupportsScaledIndexAddressing() { return _flags1.testAny(SupportsScaledIndexAddressing); }
void setSupportsScaledIndexAddressing() { _flags1.set(SupportsScaledIndexAddressing); }

Expand Down Expand Up @@ -1719,7 +1722,7 @@ class OMR_EXTENSIBLE CodeGenerator
PerformsExplicitChecks = 0x00080000,
SpillsFPRegistersAcrossCalls = 0x00100000,
ConsiderAllAutosAsTacticalGlobalRegisterCandidates = 0x00200000,
// AVAILABLE = 0x00400000,
SupportsByteswap = 0x00400000,
SupportsScaledIndexAddressing = 0x00800000,
SupportsCompactedLocals = 0x01000000,
// AVAILABLE = 0x02000000,
Expand Down

0 comments on commit 6df85c1

Please sign in to comment.