mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-09-08 17:54:40 +00:00
Fixed > & < for pointers.
This commit is contained in:
parent
b3537e3b66
commit
028fd75878
@ -88,7 +88,7 @@ public class AsmFormat {
|
|||||||
SymbolType operandType = SymbolTypeInference.inferType(program.getScope(), operand);
|
SymbolType operandType = SymbolTypeInference.inferType(program.getScope(), operand);
|
||||||
if(SymbolType.isByte(operandType) || SymbolType.isSByte(operandType)) {
|
if(SymbolType.isByte(operandType) || SymbolType.isSByte(operandType)) {
|
||||||
return getAsmConstant(program, operand, outerPrecedence, codeScope);
|
return getAsmConstant(program, operand, outerPrecedence, codeScope);
|
||||||
} else if(SymbolType.isWord(operandType) || SymbolType.isSWord(operandType)) {
|
} else if(SymbolType.isWord(operandType) || SymbolType.isSWord(operandType) || operandType instanceof SymbolTypePointer) {
|
||||||
return "<" + getAsmConstant(program, operand, outerPrecedence, codeScope);
|
return "<" + getAsmConstant(program, operand, outerPrecedence, codeScope);
|
||||||
} else if(SymbolType.isDWord(operandType) || SymbolType.isSDWord(operandType)) {
|
} else if(SymbolType.isDWord(operandType) || SymbolType.isSDWord(operandType)) {
|
||||||
return getAsmConstant(program, operand, outerPrecedence, codeScope) + "&$ffff";
|
return getAsmConstant(program, operand, outerPrecedence, codeScope) + "&$ffff";
|
||||||
@ -99,7 +99,7 @@ public class AsmFormat {
|
|||||||
SymbolType operandType = SymbolTypeInference.inferType(program.getScope(), operand);
|
SymbolType operandType = SymbolTypeInference.inferType(program.getScope(), operand);
|
||||||
if(SymbolType.isByte(operandType) || SymbolType.isSByte(operandType)) {
|
if(SymbolType.isByte(operandType) || SymbolType.isSByte(operandType)) {
|
||||||
return getAsmConstant(program, operand, outerPrecedence, codeScope);
|
return getAsmConstant(program, operand, outerPrecedence, codeScope);
|
||||||
} else if(SymbolType.isWord(operandType) || SymbolType.isSWord(operandType)) {
|
} else if(SymbolType.isWord(operandType) || SymbolType.isSWord(operandType) || operandType instanceof SymbolTypePointer) {
|
||||||
return ">" + getAsmConstant(program, operand, outerPrecedence, codeScope);
|
return ">" + getAsmConstant(program, operand, outerPrecedence, codeScope);
|
||||||
} else if(SymbolType.isDWord(operandType) || SymbolType.isSDWord(operandType)) {
|
} else if(SymbolType.isDWord(operandType) || SymbolType.isSDWord(operandType)) {
|
||||||
return getAsmConstant(program, operand, outerPrecedence, codeScope) + ">>16";
|
return getAsmConstant(program, operand, outerPrecedence, codeScope) + ">>16";
|
||||||
|
Loading…
Reference in New Issue
Block a user