slicc: fixes for the Address to Addr changeset (11025)

misc changes now that Address has become Addr including int to address util
function
This commit is contained in:
Tony Gutierrez 2015-11-13 17:30:58 -05:00
parent 5143d480f3
commit d10fac27bc
3 changed files with 12 additions and 1 deletions

View file

@ -36,6 +36,7 @@ Cycles zero_time();
NodeID intToID(int nodenum); NodeID intToID(int nodenum);
int IDToInt(NodeID id); int IDToInt(NodeID id);
int addressToInt(Addr addr); int addressToInt(Addr addr);
Addr intToAddress(int addr);
void procProfileCoherenceRequest(NodeID node, bool needCLB); void procProfileCoherenceRequest(NodeID node, bool needCLB);
void dirProfileCoherenceRequest(NodeID node, bool needCLB); void dirProfileCoherenceRequest(NodeID node, bool needCLB);
int max_tokens(); int max_tokens();
@ -43,6 +44,9 @@ Addr setOffset(Addr addr, int offset);
Addr makeLineAddress(Addr addr); Addr makeLineAddress(Addr addr);
int getOffset(Addr addr); int getOffset(Addr addr);
int mod(int val, int mod); int mod(int val, int mod);
Addr bitSelect(Addr addr, int small, int big);
Addr maskLowOrderBits(Addr addr, int number);
Addr makeNextStrideAddress(Addr addr, int stride);
structure(BoolVec, external="yes") { structure(BoolVec, external="yes") {
} }
int countBoolVec(BoolVec bVec); int countBoolVec(BoolVec bVec);

View file

@ -65,6 +65,13 @@ addressToInt(Addr addr)
return addr; return addr;
} }
inline Addr
intToAddress(int addr)
{
assert(!(addr & 0xffffffff00000000));
return addr;
}
inline int inline int
mod(int val, int mod) mod(int val, int mod)
{ {

View file

@ -40,7 +40,7 @@ class Transition(Symbol):
# check to make sure there is a getNextState function declared # check to make sure there is a getNextState function declared
found = False found = False
for func in machine.functions: for func in machine.functions:
if func.c_ident == 'getNextState_Address': if func.c_ident == 'getNextState_Addr':
found = True found = True
break break
if found == False: if found == False: