-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Whamm intrinsification baseline (wasm to wasm call) #222
base: master
Are you sure you want to change the base?
Whamm intrinsification baseline (wasm to wasm call) #222
Conversation
OUT.puts("JIT code: "); | ||
masm.printCodeBytes(OUT); | ||
OUT.ln(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes debugging easier, since we can see the exact assembly generated for each opcode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good with minor suggestions.
@@ -106,6 +106,11 @@ component X86_64Runtime { | |||
if (ret != null) return stack.throw(ret); | |||
return ret; | |||
} | |||
def runtime_materialize_frame_accessor() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about calling this runtime_getFrameAccessorMetaRef()
and returning the metaref, since it's needed by the caller?
|
||
new(w, regConfig: RegConfig) super(Target.tagging, regConfig) { | ||
scratch = G(regConfig.scratch); | ||
} | ||
|
||
def printCodeBytes(sb: StringBuilder) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds a little more local state; how about keeping track of the offset of the bytecode start in the SPC? Partially because we should consider saving that for use at runtime, e.g. to compute the PC at frame walking instead of storing it as is done now.
@@ -39,6 +39,13 @@ component Target { | |||
if (Trace.compiler) { | |||
Trace.OUT.put2("func[%d].target_code: break *0x%x", f.func_index, addr - Pointer.NULL) | |||
.put2(" disass 0x%x, 0x%x", addr - Pointer.NULL, end - Pointer.NULL).ln(); | |||
var cur_byte = addr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about guarding this behind a new trace flag --trace-asm
?
No description provided.