github-actions[bot] commented on issue #4782:
Subscribe to Label Action
cc @fitzgen
<details>
This issue or pull request has been labeled: "cranelift", "fuzzing"Thus the following users have been cc'd because of the following labels:
- fitzgen: fuzzing
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
jameysharp commented on issue #4782:
Huh. I was going to suggest that if there are libcalls with undefined behavior on some inputs then we should be limiting what we pass them to ensure that we only use them in ways consistent with the semantics we want. But I went to check how libcalls like
UdivI64
orIshlI64
are used, and as far as I can tell, they aren't. We should probably remove them, yeah?These libcalls are constructed in Rust source:
ElfTlsGetAddr
ElfTlsGetOffset
Memcmp
Memcpy
Memmove
Memset
Probestack
While these are constructed in the x64 ISLE rules (but not any other backend?):
CeilF32
CeilF64
FloorF32
FloorF64
FmaF32
FmaF64
NearestF32
NearestF64
TruncF32
TruncF64
LibCall::for_inst
would construct some other libcalls, but apparently its only use was removed last year in bae4ec642798ff448ca88eab771b6fcea71e7884, so I've excluded it from the above lists.
afonso360 commented on issue #4782:
But I went to check how libcalls like UdivI64 or IshlI64 are used, and as far as I can tell, they aren't. We should probably remove them, yeah?
That sounds like a good idea.
While these are constructed in the x64 ISLE rules (but not any other backend?):
Yeah, x86 doesn't have native instructions for these without extensions, so we have to lower them as libcalls if some extensions are disabled. I only know about AArch64 but they have equivalents for these in the base ISA. Not sure about s390x but i assume its the same
We can emit something like
CeilF32
or any other really. The only downside being that it puts us in the "Changes fuzzer input do not merge" category. I'm okay with that.I think the float libcalls don't trap at all.
afonso360 commented on issue #4782:
I've changed this in a few ways, and since we are going to change the input of the fuzzer we might as well do it properly and generate multiple libcalls, so we now do that.
I've also removed the unused libcalls and a few accessory bits.
Last updated: Nov 22 2024 at 16:03 UTC