Adjust ASM generation to account for c11 pointer arithmetic standards
This commit is contained in:
parent
a0d2575a83
commit
610c45e3e1
|
@ -449,8 +449,16 @@ void AsNewSymb(int ID) {
|
|||
|
||||
TypeSize = PrimitiveSize(Symbols[ID].Type);
|
||||
|
||||
fprintf(OutputFile, "\t.comm\t%s, %d, %d\n", Symbols[ID].Name, TypeSize, TypeSize);
|
||||
fprintf(OutputFile, "\t.data\n"
|
||||
"\t.globl\t%s\n",
|
||||
Symbols[ID].Name);
|
||||
|
||||
switch(TypeSize) {
|
||||
case 1: fprintf(OutputFile, "%s:\t.byte\t0\n", Symbols[ID].Name);
|
||||
case 4: fprintf(OutputFile, "%s:\t.long\t0\n", Symbols[ID].Name);
|
||||
case 8: fprintf(OutputFile, "%s:\t.quad\t0\n", Symbols[ID].Name);
|
||||
default: DieDecimal("Unknown type in AsNewSymbol", TypeSize);
|
||||
}
|
||||
}
|
||||
|
||||
int AsCall(int Register, int FuncID) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user