Skip to content

Commit

Permalink
Merge pull request #5076 from WalterBright/AllocOff
Browse files Browse the repository at this point in the history
AllocOff should be targ_size_t
  • Loading branch information
rainers committed Sep 15, 2015
2 parents f39fd49 + ca18579 commit f79e353
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/backend/cgcod.c
Expand Up @@ -50,7 +50,7 @@ targ_size_t pushoff; // offset of saved registers
bool pushoffuse; // using pushoff
int BPoff; // offset from BP
int EBPtoESP; // add to EBP offset to get ESP offset
int AllocaOff; // offset of alloca temporary
targ_size_t AllocaOff; // offset of alloca temporary
LocalSection Para; // section of function parameters
LocalSection Auto; // section of automatics and registers
LocalSection Fast; // section of fastpar
Expand Down Expand Up @@ -796,6 +796,10 @@ code *prolog()

localsize = -pushoff;

//printf("AllocaOff = x%llx, cstop = x%llx, CSoff = x%llx, NDPoff = x%llx, localsize = x%llx\n",
//(long long)AllocaOff, (long long)cstop, (long long)CSoff, (long long)NDPoff, (long long)localsize);
assert((targ_ptrdiff_t)localsize >= 0);

// Keep the stack aligned by 8 for any subsequent function calls
if (!I16 && calledafunc &&
(STACKALIGN == 16 || config.flags4 & CFG4stackalign))
Expand Down
4 changes: 2 additions & 2 deletions src/backend/code.h
Expand Up @@ -395,9 +395,9 @@ extern targ_size_t CSoff; // offset of common sub expressions
extern targ_size_t NDPoff; // offset of saved 8087 registers
extern targ_size_t pushoff; // offset of saved registers
extern bool pushoffuse; // using pushoff
extern int BPoff; // offset from BP
extern int BPoff; // offset from BP
extern int EBPtoESP; // add to EBP offset to get ESP offset
extern int AllocaOff; // offset of alloca temporary
extern targ_size_t AllocaOff; // offset of alloca temporary

code* prolog_ifunc(tym_t* tyf);
code* prolog_ifunc2(tym_t tyf, tym_t tym, bool pushds);
Expand Down

0 comments on commit f79e353

Please sign in to comment.