More work on 64 bit support
git-svn-id: http://picoc.googlecode.com/svn/trunk@382 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
9ea0dcee28
commit
064c64d202
|
@ -461,6 +461,8 @@ void ExpressionPrefixOperator(struct ParseState *Parser, struct ExpressionStack
|
|||
/* pointer prefix arithmetic */
|
||||
int Size = TypeSize(TopValue->Typ->FromType, 0, TRUE);
|
||||
struct Value *StackValue;
|
||||
void *ResultPtr;
|
||||
|
||||
if (TopValue->Val->NativePointer == NULL)
|
||||
ProgramFail(Parser, "invalid use of a NULL pointer");
|
||||
|
||||
|
@ -474,8 +476,9 @@ void ExpressionPrefixOperator(struct ParseState *Parser, struct ExpressionStack
|
|||
default: ProgramFail(Parser, "invalid operation"); break;
|
||||
}
|
||||
|
||||
ResultPtr = TopValue->Val->NativePointer;
|
||||
StackValue = ExpressionStackPushValueByType(Parser, StackTop, TopValue->Typ);
|
||||
StackValue->Val->NativePointer = TopValue->Val->NativePointer;
|
||||
StackValue->Val->NativePointer = ResultPtr;
|
||||
}
|
||||
else
|
||||
ProgramFail(Parser, "invalid operation");
|
||||
|
|
2
heap.c
2
heap.c
|
@ -99,7 +99,7 @@ void HeapPushStackFrame()
|
|||
#endif
|
||||
*(void **)HeapStackTop = StackFrame;
|
||||
StackFrame = HeapStackTop;
|
||||
HeapStackTop = (void *)((char *)HeapStackTop + MEM_ALIGN(sizeof(void *)));
|
||||
HeapStackTop = (void *)((char *)HeapStackTop + MEM_ALIGN(sizeof(ALIGN_TYPE)));
|
||||
}
|
||||
|
||||
/* pop the current stack frame, freeing all memory in the frame. can return NULL */
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
#define HEAP_SIZE 16384 /* default space for the heap and the stack */
|
||||
#endif
|
||||
#define LARGE_INT_POWER_OF_TEN 1000000000 /* the largest power of ten which fits in an int on this architecture */
|
||||
#define ARCH_ALIGN_WORDSIZE sizeof(void *) /* memory alignment boundary on this architecture */
|
||||
#define ALIGN_TYPE void * /* the data type to use for alignment */
|
||||
#define ARCH_ALIGN_WORDSIZE sizeof(ALIGN_TYPE) /* memory alignment boundary on this architecture */
|
||||
|
||||
#define GLOBAL_TABLE_SIZE 97 /* global variable table */
|
||||
#define STRING_TABLE_SIZE 97 /* shared string table size */
|
||||
|
|
Loading…
Reference in a new issue