-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
unittest: Add jit compare for jit IR #18228
Conversation
Oh that's great for microbenching, yeah. |
Does look like the unittest is actually crashing on Linux, it's not the usual thing... |
3e8d08c
to
7d0f2e4
Compare
The unittest was using 0x89100000 as an address. At least on RISC-V, this was sign extending and crashing. Not sure why Linux is unhappy though (Windows is fine and I had a 7FFFFFFF mask there)... I cleaned up the displacements to be safer, though. -[Unknown] |
LI(SCRATCH2, constant); | ||
ADD(SCRATCH1, *reg, SCRATCH2); | ||
// It can't be this negative, must be a constant with top bit set. | ||
if ((constant & 0xC0000000) == 0x80000000) { |
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.
shouldn't this check be (constant & 0x80000000)
? or are we explicitly diallowing 0xC0000000 addresses (granted, you did mention previously that disabling the cache in kernel space is likely not allowed...)
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.
No, because the constant can be a negative offset. We end up turning absolute addresses into this constant offsets, but we also have signed offsets.
-[Unknown]
This makes it so you can easily compare a code block's codegen between:
Also adds a thread name for UnitTest so asserts don't break.
-[Unknown]