-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add hexagon implementations for compiler_rt builtins #22029
Conversation
I see these also referenced in LLVM:
Do we need these? |
These are not defined in
These were unintentionally omitted. I'll see about revising this PR to include these. I assume it's safe/permitted/expected for me to use |
Can you clarify what aliases you're referring to? |
The |
Hmm, I'm not sure if doing that in inline assembly is a good idea. 🤔 But if these are just aliases of the same symbol, perhaps you can just do multiple |
I thought such a thing might be possible, so yeah, that'll do. I will work on it. |
12d69ea
to
782529d
Compare
Signed-off-by: Brian Cain <[email protected]>
Signed-off-by: Brian Cain <[email protected]>
Signed-off-by: Brian Cain <[email protected]>
Signed-off-by: Brian Cain <[email protected]>
I was under the mistaken assumption I needed a `call` here but an extended jump will suffice. The call on its own would have failed without an allocframe/dealloc. Signed-off-by: Brian Cain <[email protected]>
782529d
to
9f43a34
Compare
Addressed review comments, fixed |
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.
Small nitpick for consistency.
This looks like an LLVM bug to me. They seem to be used for ❯ cat test.zig
export fn cvt(d: i128) f64 {
return @floatFromInt(d);
}
❯ zig4 build-lib test.zig -fno-compiler-rt -target hexagon-freestanding
❯ llvm-objdump -r --disassemble-symbols=cvt libtest.a
libtest.a(./libtest.a.o): file format elf32-hexagon
Disassembly of section .text:
00000000 <cvt>:
0: 02 c0 9d a0 a09dc002 { allocframe(#0x10) }
4: 04 c2 03 f5 f503c204 { r5:4 = combine(r3,r2) }
8: 04 c0 01 f5 f501c004 { r5:4 = combine(r1,r0) }
c: ff e2 de a7 a7dee2ff { memd(r30+#-0x8) = r3:2 }
10: fe e0 de a7 a7dee0fe { memd(r30+#-0x10) = r1:0 }
14: 00 c0 00 5a 5a00c000 { call 0x14 } 00000014: R_HEX_B22_PCREL __hexagon_floattidf
18: 1e c0 1e 96 961ec01e { dealloc_return } |
So, I think these calls should just all be deleted. That way, the code generator will emit calls to the usual |
I think this may be the case. I'll check and update the PR soon. |
Ok, given llvm/llvm-project#117423, I think this PR is good to go after the remaining |
Co-authored-by: Alex Rønne Petersen <[email protected]>
7f07faf
to
134f6e3
Compare
Ok - I've taken those, thanks. re: llvm/llvm-project#117423 -- if it turns out that it's not preferred to remove those, then I'll probably add the specializations to |
Some follow-up fixes for #22029
No description provided.