1 /* support for the simulated micro-architecture */
4 #include "assertions.h"
9 void initArchitecture(int stackSize
, int regsCount
)
11 MAX_STACK_SIZE
= stackSize
;
12 stack
= (int*)malloc( stackSize
* sizeof(int) );
16 r
= (int*)malloc( regsCount
* sizeof(int) );
21 ASSERT_ALWAYS(sp
< MAX_STACK_SIZE
,"");
28 ASSERT_ALWAYS(sp
> 0,"");