Replies: 1 comment
-
From my understanding:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm implementing processor support for a stack based VM and I'm a bit stuck on how to model where the arguments to a function come from.
Architecture background
There is an
invocation stack
that pretty much serves as a stack frame. The contents of each entry is shown on the left side (in no fixed order).arguments
,local vars
andstatic fields
have a max size of 255 itemsevaluation_stack
has a max size of1024
which is where operands to instructions are pushed and results are storedWhat I've got
for code that at a high level looks like this (binary data:
5700017834034057000178119e40
)I get

As seen there are some issues with the output that have some questions about
The
INITSLOT
instruction has 2 operands that indicate the number of slots to reserve for respectively the number of local variables and the number of arguments.I have the following cspec
My understanding is that the
<input>
and<output>
tags indicate where the resources are located (e.g. stack/ram and the offsets there in). What I don't seem to see is how to indicate how many of these resources should be taken. I can see<pentry>
has properties formin/maxsize
in terms of data bytes to consume and analignment
to tell the size per item, but how can I tell there's onlyn
amount of items?what is causing the
<UNASSIGNED> <RETURN>
warnings?Either answers or a nudge into the right direction how I can find the answer myself is much appreciated.
slaspec
Beta Was this translation helpful? Give feedback.
All reactions