1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-22 21:29:50 +00:00

Renamed non-relocatable variables to hardware/hardcoded. #712

This commit is contained in:
Jesper Gravgaard 2021-09-23 07:49:19 +02:00
parent 74cc8bd1f6
commit 1f91617ad1
2 changed files with 17 additions and 17 deletions

View File

@ -67,7 +67,7 @@ public class Registers {
int getBytes();
boolean isNonRelocatable();
boolean isAddressHardcoded();
boolean isHardware();
}
@ -82,13 +82,13 @@ public class Registers {
private Long address;
/** True if the address of the register is declared in the code (non-relocatable) */
private boolean nonRelocatable;
private boolean addressHardcoded;
public RegisterMainMem(VariableRef variableRef, int bytes, Long address, boolean nonRelocatable) {
public RegisterMainMem(VariableRef variableRef, int bytes, Long address, boolean addressHardcoded) {
this.variableRef = variableRef;
this.bytes = bytes;
this.address = address;
this.nonRelocatable = nonRelocatable;
this.addressHardcoded = addressHardcoded;
}
public VariableRef getVariableRef() {
@ -119,8 +119,8 @@ public class Registers {
}
@Override
public boolean isNonRelocatable() {
return nonRelocatable;
public boolean isAddressHardcoded() {
return addressHardcoded;
}
@Override
@ -164,12 +164,12 @@ public class Registers {
private int zp;
/** True if the address of the register is declared in the code (non-relocatable) */
private boolean nonRelocatable;
private boolean addressHardcoded;
public RegisterZpMem(int zp, int bytes, boolean nonRelocatable) {
public RegisterZpMem(int zp, int bytes, boolean addressHardcoded) {
this.zp = zp;
this.bytes = bytes;
this.nonRelocatable = nonRelocatable;
this.addressHardcoded = addressHardcoded;
}
public RegisterZpMem(int zp, int bytes) {
@ -194,8 +194,8 @@ public class Registers {
return bytes;
}
public boolean isNonRelocatable() {
return nonRelocatable;
public boolean isAddressHardcoded() {
return addressHardcoded;
}
@Override
@ -220,7 +220,7 @@ public class Registers {
RegisterZpMem that = (RegisterZpMem) o;
return zp == that.zp &&
bytes == that.bytes &&
nonRelocatable == that.nonRelocatable;
addressHardcoded == that.addressHardcoded;
}
@Override
@ -245,8 +245,8 @@ public class Registers {
}
@Override
public boolean isNonRelocatable() {
return true;
public boolean isAddressHardcoded() {
return false;
}
@Override
@ -367,7 +367,7 @@ public class Registers {
}
@Override
public boolean isNonRelocatable() {
public boolean isAddressHardcoded() {
return false;
}

View File

@ -170,8 +170,8 @@ public class Pass4RegistersFinalize extends Pass2Base {
if(register.isHardware()) {
// Do not allocate hardware registers
reallocate = false;
} else if(register.isNonRelocatable()) {
// Do not allocate non-relocatable ZP registers
} else if(register.isAddressHardcoded()) {
// Do not allocate registers with hardcoded address
reallocate = false;
}
}